- 04 Mar 2024
- 2 Minutes to read
Delete User's PII Data
- Updated on 04 Mar 2024
- 2 Minutes to read
Overview
This API is used to delete users' PII data. Insider does not allow to delete the user's last remaining identifier. In addition, if this value is a PII (Personally Identifiable Information) data such as email, phone number, it would not be deleted. Thanks to this endpoint, you can delete these values associated with users; if they are a known user and their only identifier is email or phone number, then, the user becomes anonymous. For example, you can delete all PII data of registered users when they revoke their data-sharing permissions.
The user attributes that are gender, birthday, name, surname, age, email, phone number, city, country, uuid are unconditionally deleted with this API.
Endpoint and Headers
Two different endpoints are available for this API.
- You can convert the user into anonymous using insider_id (profile id).
POST https://unification.useinsider.com/api/contact/v1/anonymize
- You can convert the user into anonymous using its identifier.
POST https://unification.useinsider.com/api/user/v1/anonymize
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
Parameter | Description | Data Type | Required |
---|---|---|---|
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 |
name | Attribute. User's name. | String | No |
surname | Attribute. User's surname. | String | No |
birthday | Attribute. User's birthday in RFC 3339 format (e.g. 1993-03-12T00:00:00Z). Note: Send the birthdays without the time offset. | Datetime | No |
gender | Attribute. Gender of the user. | String | No |
age | Attribute. Age of the user | Number | No |
country | Attribute. Country information of the user in ISO 3166-1 alpha-2 format. | String | No |
city | Attribute. City information of the user. | String | No |
Sample Example
Sample Request
Below is a request to convert the user into anonymous using insider_id (profile id).
curl --location --request POST 'https://unification.useinsider.com/api/user/v1/anonymize' \
--header 'X-PARTNER-NAME: mybrand' \
--header 'X-REQUEST-TOKEN: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--data-raw '{
“insider_id”: “111ab184-f77e-4cba-123e-9abca4332211"
}'
Sample Request
Below is a request to convert the user into anonymous using its identifier.
curl --location --request POST 'https://unification.useinsider.com/api/user/v1/anonymize' \
--header 'X-PARTNER-NAME: mybrand' \
--header 'X-REQUEST-TOKEN: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--data-raw '{
"identifiers": {
"email": "example@useinsider.com"
}
}'
Sample Responses
200 OK
This response returns when the request is successful.
404 Not Found
Below response returns when you send the wrong identifiers.
{"error":"no such user for these identifiers: no data"}
Limitations
- All functions must be executed with a simple HTTPS POST request.
- Only PII data delete requests 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
- Rate limit is 500 requests per minute.
- A single HTTPS POST request can pass only 1 record (users).
- The value of X-PARTNER-NAME header should be lowercase.