Delete User Profile
Overview
This endpoint enables you to delete a user profile.
Rate Limit
You can pass a maximum of 100 IDs or globally unique identifiers (GUIDs) per request.
For more information on rate limit, refer to API Rate Limit.
Base URL
Here is an example base URL from the account in the India region:
https://in1.api.clevertap.com/1/delete/profiles.json
Region
Refer Region for more details.
HTTP Method
POST
Headers
Refer Headers for more details.
Body Parameters
The body is uploaded as a JSON payload.
Parameter | Description | Required | Type | Example Value |
---|---|---|---|---|
identity | Custom user identity defined by you. | optional | string/array | ["client-19827239", "abc"] |
guid | CleverTap ID. | optional | string/array | ["ctid123", "ctid456"] |
Note
For a successful API request, make sure one of the optional parameters, either
identity
orguid
is present in the body parameter.
Below is an example payload.
{
"identity": ["client-19827239", "abc"]
}
OR
{
"identity": "client-19827239"
}
OR
{
"guid": ["ctid123", "ctid456"]
}
OR
{
"guid": "clientid123"
}
Example Request
Here is an example cURL request to the Delete User Profile API showing the headers needed to authenticate the request from the account in the India region:
curl -X POST -d '{"guid":"df2e224d90874887b4d61153ef3a2508"}' "https://in1.api.clevertap.com/1/delete/profiles.json" \
-H "X-CleverTap-Account-Id: ACCOUNT_ID" \
-H "X-CleverTap-Passcode: PASSCODE" \
-H "Content-Type: application/json; charset=utf-8"
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://in1.api.clevertap.com/1/delete/profiles.json")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/json; charset=utf-8"
request["X-Clevertap-Account-Id"] = "ACCOUNT_ID"
request["X-Clevertap-Passcode"] = "PASSCODE"
request.body = JSON.dump({
"guid" => "df2e224d90874887b4d61153ef3a2508"
})
req_options = {
use_ssl: uri.scheme == "https",
}
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(request)
end
import requests
headers = {
'X-CleverTap-Account-Id': 'ACCOUNT_ID',
'X-CleverTap-Passcode': 'PASSCODE',
'Content-Type': 'application/json; charset=utf-8',
}
data = '{"guid":"df2e224d90874887b4d61153ef3a2508"}'
response = requests.post('https://in1.api.clevertap.com/1/delete/profiles.json', headers=headers, data=data)
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'X-CleverTap-Account-Id' => 'ACCOUNT_ID',
'X-CleverTap-Passcode' => 'PASSCODE',
'Content-Type' => 'application/json; charset=utf-8'
);
$data = '{"guid":"df2e224d90874887b4d61153ef3a2508"}';
$response = Requests::post('https://in1.api.clevertap.com/1/delete/profiles.json', $headers, $data);
var request = require('request');
var headers = {
'X-CleverTap-Account-Id': 'ACCOUNT_ID',
'X-CleverTap-Passcode': 'PASSCODE',
'Content-Type': 'application/json; charset=utf-8'
};
var dataString = '{"guid":"df2e224d90874887b4d61153ef3a2508"}';
var options = {
url: 'https://in1.api.clevertap.com/1/delete/profiles.json',
method: 'POST',
headers: headers,
body: dataString
};
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
}
request(options, callback);
type Payload struct {
GUID string `json:"guid"`
}
data := Payload{
// fill struct
}
payloadBytes, err := json.Marshal(data)
if err != nil {
// handle err
}
body := bytes.NewReader(payloadBytes)
req, err := http.NewRequest("POST", "https://in1.api.clevertap.com/1/delete/profiles.json", body)
if err != nil {
// handle err
}
req.Header.Set("X-Clevertap-Account-Id", "ACCOUNT_ID")
req.Header.Set("X-Clevertap-Passcode", "PASSCODE")
req.Header.Set("Content-Type", "application/json; charset=utf-8")
resp, err := http.DefaultClient.Do(req)
if err != nil {
// handle err
}
defer resp.Body.Close()
Example Response
{
"status": "success"
}
FAQs
Q. How much time CleverTap takes to delete a profile?
A. Once the profile is marked for deletion, CleverTap takes up to 48 hours to delete a profile from the dashboard.
Q. How can I confirm that the profile will be deleted?
A. You can go to the User Profile by navigating to Segment > Find People > By identity and confirm there is a banner on the top of the profile.
The profile marked for deletion appears with a red banner, and a message The profile has been marked for deletion as shown below:

Updated about 1 month ago