The Delete User Attribute API allows you to delete your customer attribute as needed. You can either delete the whole attribute from the user or 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
Visit our Postman collection to test this request.
Headers
| Header | Sample Value | Description |
|---|---|---|
| X-PARTNER-NAME | mybrand | This is your partner name. Navigate to InOne > Inone Settings > Account Settings 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 the identifiers object that you decide on. You can use the default identifiers, such as email, phone number, or UUID, as well as custom identifiers 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 |
| static_segment_id | Attribute. Static segment IDs (users are added directly). | Numbers (Number array) | No |
Sample Request
The sample below displays a request to delete user attributes. This allows both complete removal of attributes and partial removal of individual values.
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@useinsider.com",
"uuid": "1x2y3z",
"custom": {
"custom_identifier": "xyz123"
}
},
"whole": [
"name",
"surname",
"email_optin"
],
"partial": {
"static_segment_id": [
1,
2
]
},
"custom": {
"whole": [
"custom_string_attribute",
"custom_array_attribute"
],
"partial": {
"custom_array_attribute": [
"value1",
"value2",
"value3"
]
}
}
}
]
}'The sample below shows a request to delete user attributes with the insider_id, an internal ID maintained by Insider for each user, which is available as the Profile ID on the User Profiles page.
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": {
"static_segment_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
If the request returns this response, you need to check the partner value in the request. For example, if your panel name is "mypanel" but you use it as "my panel", you can receive this error.
{
"success": false,
"message": "Partner is invalid."
}403 Forbidden
This response indicates that you have no access to use this endpoint. It might be due to various reasons, such as using the wrong API key.
{
"success": false,
"message": "Access Denied. You do not have sufficient access to perform this action."
}429 Too Many Requests
The rate limit is shared with the User Upsert API with a total of 25,000 requests per minute. This response indicates that you have reached the limit. You need to check your request and wait for some time to send new requests.
{
"error": "rejected: too many requests"
}500 Internal Server Error
If the request returns this response, Insider One receives alerts via the alert mechanism.
{
"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 in 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).
- The rate limit is shared with the 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.
The default limit shown here is a standard baseline. If your use case requires higher capacity, feel free to reach out to the Insider One team — we can adjust it to fit your needs.