Creates or updates a contact. A new contact only requires either a valid email address or valid mobile phone number. All other fields are optional.
See also the Find or Create a Contact API.
Updating custom fields
DailyStory supports custom fields to allow you to store virtually any data with a contact.
RecommendedWhile custom fields comes with their own benefits you can add/remove data using API even if you haven't created the custom field.
To update a contact's custom fields, include the custom field data in the JSON body of your POST:
{
"email":"example@example.com",
"extendedProperties":{
"some_custom_field":"hello world"
}
}
While not required, we recommend custom field key is lower case, contain no spaces, and are limited to alphanumeric characters. This ensures that if the custom field were used for API access, such as personalization, the customer field could be accessed. For example, {{profile.some_custom_field}}.
{
"email": "rob@example.com",
"firstName": "Rob",
"lastName": "Howard",
"mobilePhone": "+15557140059",
"city": "Dallas",
"region": "Texas",
"extendedProperties": {
"stripe_customer_id": "cus_DRvE6c5V9jp",
"class_of_license": "Premium"
}
}
{
"dsId": "43aaf5af35f866b1edba7",
"firstName": "Rob",
"lastName": "Howard",
"title": "Founder, CEO"
}
The dsid of an existing contact to update. Omit when creating a new contact.
Contact email address. Either email or mobilePhone is required when creating a new contact.
Contact mobile number (E.164 format recommended). Either email or mobilePhone is required when creating a new contact.
Optional name and title fields.
Contact status. One of: Active, Inactive, Spam, Deleted.
Optional location fields.
Additional phone numbers.
Optional company/firmographic fields.
Subscription flags. Setting these opts the contact out of the corresponding channel.
Maximum number of days between contacts. Set to 0 to disable.
Dictionary of custom field values. Keys should be lowercase with underscores, values are strings. See the Updating custom fields section above.
{
"Status": true,
"Message": "",
"Response": {
"id": "43aaf5af35f866b1edba7"
}
}
The dsid of the created or updated contact.