Delete profile
Description
This request deletes customer profile data, including its events history and relations.
Request URL
Method: POST
https://example.com/api/v1.1/profiles/delete
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
db_id | int | 1 | Yes | Database ID |
Profile matching mode | ||||
matching | string | "email" "phone" "profile_id" "custom" | No, if matched by email | Profile matching mode By default - email |
string | "john@example.com" | "matching":"email" | Email address | |
phone | string | "+79000000000" | "matching":"phone" | Phone number |
profile_id | string | "abcdefghijklmnqrstuvwxyz" | "matching":"profile_id" | Profile ID |
field_name | string | "CRM_ID" | "matching":"custom" | Custom profile data field name |
field_value | int/string | "123420" | "matching":"custom" | Custom profile data field value. tip Searching by combination of tags is available for tag type profile fields. Values are recorded as a string: "tag-1, tag-2". |
resource_id | int | 24 | No | Resource ID for email and phone matching |
caution
Special permission is necessary for deleting profiles. It can be configured in user role, and this role can be selected for the token. You can read more about roles in this article.
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"db_id": 1,
"matching": "email",
"email": "example@example.com"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<db_id>1</db_id>
<matching>email</matching>
<email>example@example.com</email>
</xml>
Response example
- JSON
- XML
{
"data": {
"profile_id": "5f33d33ece94481aa9382110"
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<profile_id>5f33d33ece94481aa9382110</profile_id>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
data | JSON object | Profile data |
error | int | Error code |
error_text | string | Error text |
profile_id | string | Profile identifier |