cdp menu

Customerlabs CDP Documentation

User Deletion (via API)

You are here:

CustomerLabs provides you with an option to delete or remove the end users from the system permanently to keep in line with GDPR and other similar privacy regulations.

You can use the following features to delete or remove the user details from CustomerLabs systems.

Note: After initiating the deletion request, you can cancel the request within 24 hours. After 24 hours, you won’t be able to cancel the request. Data once deleted cannot be retrieved.

User Deletion requests can be initiated using any one of the following:

Identifier NameIdentifier Key (external_id_key)
CustomerLabs User IDcustomerlabs_user_id
Emailidentify_by_email
Phoneidentify_by_phone
Facebook fbpfacebook___fbp
Google Analytics client IDgoogle_analytics__client_id
External IDs (Hubspot ID, Intercom Visitor ID, etc)
You have configured in any connected Source to identify a user
hubspot_user_id, intercom__visitor_id, etc

API Key

API Key is a unique identifier for your account that is needed to authenticate the requests sent using API endpoints. This API Key enables you to modify (delete, edit or remove) the data in that particular account.

Generate API Key

You have to generate your API Key in your CustomerLabs account before initiating the deletion request using API endpoints. API Key can only be generated by the user who has the admin level permission.

This API Key once generated can be used to initiate a request and also cancel a request.

1. Go to Settings → API Key

2. Click Generate Key

3. Copy and use the API Key generated.

Make sure you keep the API key secured during storage and transmission. Exposing your API Key may cause unauthorized access to your account.

Reset API Key

If you would want to block the existing API Key and use a new API Key, you can regenerate it from your CustomerLabs Account.

1. Go to Settings → API Key

2. Click Reset Key

3. Copy and use the new API Key generated.

User Deletion Initiation request

To initiate the user deletion, use the following endpoint URL, request method, request header and body

Endpoint URL & Method

URL: https://api.customerlabs.co/user-deletion/

Request Method: POST

Request Header:

KeyValue
X-API-KeyAPI_KEY
API key generated from the CustomerLabs account
Content-Typeapplication/json

Request Body (JSON):

{
    "identify_by_key":"external_id_key",
    "identify_by_value":"external_id_value"
}

Example request:

curl -X POST https://api.customerlabs.co/user-deletion/
	 -H "X-API-Key: {API_KEY}"
     -H "Content-Type: application/json"
   	 -d '{
          "identify_by_key":"customerlabs_user_id",
          "identify_by_value":"cl124dbnfnjkdhnfj-1njndf"
         }'

Responses

Responses that you should expect if:

1. The authentication is done successfully, the response from the API gateway should be 

  • Success Response:
{
   "success": true,
   "message": "User Deletion has been added to queue "
}
  • Error Response:
{
   "success": false,
   "message": "No delete record found for this query"
}

2. The authentication is failed, the response from the API gateway should be

  • Error Response (If header key is not passed correctly) or invalid key is passed:
{
   "message": "Forbidden"
}

Cancel User Deletion request

To cancel User deletion request, use the following endpoint URL, request method, request header and body

Endpoint URL & method

URL: https://api.customerlabs.co/user-deletion/cancel-request/

Request Method: POST

Request Header:

KeyValue
X-API-KeyAPI_KEY
API key generated from the CustomerLabs account
Content-Typeapplication/json

Request Body (JSON):

{
   "identify_by_key":"external_id_key",
   "identify_by_value":"external_id_value"
}

Example Request:

curl -X POST https://api.customerlabs.co/user-deletion/cancel-request/
	 -H "X-API-Key: {API_KEY}"
     -H "Content-Type: application/json"
   	 -d 
     ‘{
       "identify_by_key":"customerlabs_user_id",
       "identify_by_value":"cl124dbnfnjkdhnfj-1njndf"
      }'

Responses

Responses that you should expect if:

1. The authentication is done successfully, the response from the API gateway should be

  • Success Response:
{
   "success": true,
   "message": "User deletion request has been cancelled"
}
  • Error Response:
{
   "success": false,
   "message": "No delete record found for this query"
}

2. The authentication is failed, the response from the API gateway should be

  • Error Response(If header key is not passed correctly) or invalid key is passed
{
   "message": "Forbidden"
}

If you have any questions, you can reach out to us.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
How Can We Improve This Article?
Table of Contents
CustomerLabs gives freedom, flexibility and wings to digital marketers.
Sign Up
© 2022, Customer Labs Inc. All rights reserved.

Schedule 1-1 meeting with first-party audience expert