- 04 Mar 2024
- 4 Minutes to read
Delete User Attribute
- Updated on 04 Mar 2024
- 4 Minutes to read
Overview
This API enables you to delete your customer attribute when you need to. You can either delete the whole attribute from the user, or delete a specific value from an array typed attribute.
For example, your customer might have selected GDPR’s “right-to-be-forgotten” option and you need to delete some attributes that capture such customer information.
Endpoint and Headers
POST https://unification.useinsider.com/api/user/v1/attribute/delete
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 custom identifier to define a unifier.
Parameter | Description | Data Type | Required |
---|---|---|---|
users | Array of user information such as identifiers, attributes and values to be deleted | Array | Yes |
identifiers | User's identifier information. | Object | Yes |
custom | User's custom identifier information. | Object | No |
whole | Array of attributes that are going to be deleted fully from the corresponding user | Array | No |
partial | Attributes that are going to be deleted partially. (Ex. removing one of the values from an array attribute) | Object | No |
custom | Custom attributes that are going to be deleted either whole or partially | 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 |
email_optin | Attribute. User's permission for marketing emails: True = emails allowed; False = email not allowed | Boolean | No |
gdpr_optin | Attribute. User's permission for Insider campaigns, data collection and processing: False = user will not see any Insider campaign or receive any message from any channel; True or empty = Insider may interact with the user through personalization campaigns | Boolean | No |
sms_optin | Attribute. User's permission for SMS: True = SMS allowed; False = SMS not allowed | Boolean | 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 |
language | Language information of the user. | String | 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 |
list_id | Attribute. Newsletter contact list IDs (users are added directly). | Numbers (Number array) | No |
Sample Example
Sample Request
curl --location --request POST 'https://unification.useinsider.com/api/user/v1/attribute/delete' \
--header 'X-PARTNER-NAME: mybrand' \
--header 'X-REQUEST-TOKEN: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--data-raw '{
"users": [
{
"identifiers": {
"email": "sample@mail.com",
"uuid": "1x2y3z",
"custom": {
"custom_identifier": "xyz123"
}
},
"whole": [
"name",
"surname",
"email_optin"
],
"partial": {
"list_id": [
1,
2
]
},
"custom": {
"whole": [
"custom_string_attribute",
"custom_array_attribute"
],
"partial": {
"custom_array_attribute": [
"value1",
"value2",
"value3"
]
}
}
}
]
}'
The sample below displays a request to get user data with insider_id.
curl --location --request POST 'https://unification.useinsider.com/api/user/v1/attribute/delete' \
--header 'X-PARTNER-NAME: mybrand' \
--header 'X-REQUEST-TOKEN: 1a2b3c4d5e6f' \
--header 'Content-Type: application/json' \
--data-raw '{
"users": [
{
"insider_id": "sampleinsiderid",
"whole": [
"name",
"surname",
"email_optin"
],
"partial": {
"list_id": [
1,
2
]
},
"custom": {
"whole": [
"custom_string_attribute",
"custom_array_attribute"
],
"partial": {
"custom_array_attribute": [
"value1",
"value2",
"value3"
]
}
}
}
]
}'
Sample Responses
200 OK
{}
400 Bad Request
{
"success": false,
"message": "Partner is invalid."
}
403 Forbidden
{
"success": false,
"message": "Access Denied. You do not have sufficient access to perform this action."
}
429 Too Many Requests
If you exceed the rate limits, you receive an error shown below:
{
"error": "rejected: too many requests"
}
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 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.
- A single HTTPS POST request can pass only 1,000 records (users).
- Rate limit is shared with User Upsert API with a total of 25,000 requests per minute.
- The entire request must not exceed 5 MB.
- The value of X-PARTNER-NAME header should be lowercase.