Updating a Contact
You can update a contact record in Drift by providing the contactId of the desired contact in Drift, with the appropriate properties to update in the patch body.
PATCH https://driftapi.com/contacts/{contactId}
Updating Attributes
PATCH https://driftapi.com/contacts/{contactId}
body:
{
"attributes": {"attribute_name": attribute_val}
}
-------------------------------------------------
response-success:
{
data: Contact
}
Note
- We will only return success if an update occurred
Example update
PATCH https://driftapi.com/contacts/444406191
// Response
{
"data": {
"attributes": {
"email": "[email protected]",
"events": {},
"name": "Basic Contact",
"socialProfiles": {},
"start_date": 1618623390
},
"createdAt": 1618623390,
"id": 444406191
}
}
Updating Custom Attributes
To create and maintain custom attributes, just perform a PATCH with the new attribute and we will respect the attribute.
{
"attributes":{
"super_important": "not really"
}
}
// Response
{
"data": {
"attributes": {
"email": "[email protected]",
"events": {},
"name": "Basic Contact",
"socialProfiles": {},
"start_date": 1618623390,
"super_important": "not really"
},
"createdAt": 1618623390,
"id": 444406191
}
}
Updated over 3 years ago