- 16 Apr 2024
- 2 Minutes to read
Delete User Profile
- Updated on 16 Apr 2024
- 2 Minutes to read
Overview
This API enables you to delete your customer and their data when you need to.
For example, your customer might have selected GDPR’s “right-to-be-forgotten” option and you need to delete that customer's data. This is where Delete API comes in. You can call this API with the related identifier for Insider to find that customer’s data, then delete it.
Endpoint and Headers
Headers
Header | Sample Value | Description |
---|---|---|
X-PARTNER-NAME | mybrand | This is your partner name. Navigate to Inone > Inone Settings > Account Preferences to copy your partner name. The partner name should be lowercase. |
X-REQUEST-TOKEN | 1a2b3c4d5e6f | This key is required to authorize your request. Refer to API Authentication Tokens to generate your token. |
Content-Type | application/json | This header specifies the media type of the resource. |
Body Parameters
Each POST body must have a unifier field under identifiers object, which is decided by customer. You can use the default identifiers such as email, phone number, or uuid and also the new custom identifier to define a unifier. For example, if a customer decides email field as unifier, data without email field will not be accepted.
Parameter | Description | Data Type | Required |
---|---|---|---|
identifiers | User's identifier information. | Object | Yes |
custom | User's custom identifier information. | Object | No |
User's email address. | String | No | |
phone_number | User's phone number in E.164 format (e.g. +6598765432) | String | No |
uuid | User's unique user identifier. | String | No |
Sample Example
Sample Request (Without Custom Object)
curl --location --request POST 'https://unification.useinsider.com/api/user/v1/delete' \
--header 'X-PARTNER-NAME: mybrand' \
--header 'X-REQUEST-TOKEN: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--header 'Cookie: __cfduid=d1a0bc0c8335c7fecbd3485839787329b1615112066' \
--data-raw '{
"identifiers":{
"email":"example@useinsider.com"
}
}'
Sample Request (With Custom Object)
curl --location --request POST 'https://unification.useinsider.com/api/user/v1/delete' \
--header 'X-PARTNER-NAME: mybrand' \
--header 'X-REQUEST-TOKEN: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--header 'Cookie: __cfduid=d1a0bc0c8335c7fecbd3485839787329b1615112066' \
--data-raw '{
"identifiers": {
"custom": {
"custom_identifier": "xyz123"
}
}
}'
Sample Request (with insider_id)
If you want to delete a user with their profile id (insider_id), you can use this payload.
curl --location --request POST 'https://unification.useinsider.com/api/user/v1/delete' \
--header 'X-PARTNER-NAME: mybrand' \
--header 'X-REQUEST-TOKEN: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--header 'Cookie: __cfduid=d1a0bc0c8335c7fecbd3485839787329b1615112066' \
--data-raw '{
"insider_id":"hereisasampleinsiderid"
}'
Sample Responses
200 OK
{}
403 Forbidden
{
"success": false,
"message": "Access Denied. You do not have sufficient access to perform this action."
}
404 Not Found
You receive this response if the identifier doesn't exist, which means there is no user with that identifier.
{}
500 Internal Server Error
{
"success": false,
"message": "The request processing has failed because of an unknown error."
}
Limitations
- All functions must be executed with a simple HTTPS POST request.
- Only delete request can be sent via this API. No data can be retrieved.
- The request token should be provided on the request header. If the token is incorrect, the operation will not be executed.
- A single HTTPS POST request can pass only 1 record (user).
- Maximum 1,000 requests can be sent per minute.
- The entire request must not exceed 5 MB.
- The value of X-PARTNER-NAME header should be lowercase.