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

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

Response example

{
"error": 0,
"error_text": "",
"profile_id": "abcdefghijklmnqrstuvwxyz"
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text