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
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
db_id | int | 1 | Yes | Database ID |
data | JSON object | { | Yes | Profile fields data |
skip_triggers | bool | true | No | Skip import trigger events. By default – false |
skip_invalid_subscriptions | bool | true | No | Skip invalid subscriptions. By default – false |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"db_id": 1,
"data": {
"_fname": "Fillipp",
"_lname": "Doe"
},
"skip_triggers": true
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<db_id>1</db_id>
<skip_triggers>true</skip_triggers>
<data>
<_fname>Fillipp</_fname>
<_lname>Doe</_lname>
</data>
</xml>
Response example
- JSON
- XML
{
"error": 0,
"error_text": "",
"profile_id": "6638e1e8ee44bb50a67115c4"
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
<profile_id>6638e1e8ee44bb50a67115c4</profile_id>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |