Skip to main content

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

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
db_idint1YesDatabase ID
Profile matching mode
matchingstring"email"
"phone"
"profile_id"
"custom"
No, if matched by emailProfile matching mode
By default - email
emailstring"john@example.com""matching":"email"Email address
phonestring"+79000000000""matching":"phone"Phone number
profile_idstring"abcdefghijklmnqrstuvwxyz""matching":"profile_id"Profile ID
field_namestring"CRM_ID""matching":"custom"Custom profile data field name
field_valueint/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_idint24NoResource 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

{
"token": "abcdefghijklmnqrstuvwxyz",
"db_id": 1,
"matching": "email",
"email": "example@example.com"
}

Response example

{
"data": {
"profile_id": "5f33d33ece94481aa9382110"
},
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
dataJSON objectProfile data
errorintError code
error_textstringError text
profile_idstringProfile identifier