Creating an Account
Creating an account can be done via the following endpoint.
POST https://driftapi.com/accounts/create
Provide an account model object described in the previous section as the body of the request.
{
"ownerId": 21995, // owner id (required). Often mapped from Salesforce or other CRM
"name": "Company Name",
"domain": "www.domain.com",
"customProperties": [
{
"label": "My Number", // human readable label of property
"name": " my number", // name of property
"value": 1, // custom property value
"type": "NUMBER" // type of custom property
}
],
"targeted": true
}
Note that fields like ID, creation time, update time, and deleted will be controlled/assigned by Drift.
If successful, the account object will be returned with an assigned accountId
value which can be used for later retrieval:
{
"data": {
"ownerId": 21995, // Drift owner id (required). Often mapped from Salesforce or other CRM
"name": "Company Name",
"domain": "www.domain.com",
"accountId": "123458_domain.com",
"customProperties": [
{
"label": "My Number", // human readable label of property
"name": " my number", // name of property
"value": 1, // custom property value
"type": "NUMBER" // type of custom property
}
],
"deleted": false,
"createDateTime": 1531159572668, // timestamp when the account was created
"updateDateTime": 1533243683493, // last updated timestamp of the account
"targeted": true
}
}
Note that accounts must have a unique domain
Accounts are split by domain as a unique identifier - attempting to create an account with an identical domain will result in an API error. To modify or delete an existing account, use the
delete
orupdate
endpoints.
Create accounts requires the account_write
scope.
Updated almost 3 years ago