Skip to main content

Add profile to database

tip

The request does not look for existing records and adds any data other than those that duplicate the profile's unique field (email). We recommend using the Import profile request in most cases.

Description

Adds a new customer profile to a database.

caution

If no data is specified — an empty profile will be created.

Request URL

Method: POST

https://example.com/api/v1.1/profiles/add

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
db_idint1YesDatabase ID
dataJSON object
{
"_fname": "John",
"_lname": "Doe"
}
YesProfile fields data
skip_triggersbooltrueNoSkip import trigger events.
By default – false
skip_invalid_subscriptionsbooltrueNoSkip invalid subscriptions.
By default – false

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"db_id": 1,
"data": {
"_fname": "Fillipp",
"_lname": "Doe"
},
"skip_triggers": true
}

Response example

{
"error": 0,
"error_text": "",
"profile_id": "6638e1e8ee44bb50a67115c4"
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text