Delete User Attribute

Prev Next

This API enables you to delete your customer attribute when you need to. 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.

Your title goes here
This deletion action cannot be undone. Please carefully consider before proceeding.
Your title goes here
An attribute defined as an identifier cannot be deleted with this request. To delete this type of attribute (since it functions as an identifier), you must use the Delete Identifiers API.

Endpoint and Headers

POST https://unification.useinsider.com/api/user/v1/attribute/delete

Headers

HeaderSample ValueDescription
X-PARTNER-NAMEmybrandThis is your partner name. Navigate to InOne > Inone Settings > Account Preferences to copy your partner name. The partner name should be lowercase.
X-REQUEST-TOKEN1a2b3c4d5e6fThis key is required to authorize your request. Refer to API Authentication Tokens to generate your token.
Content-Typeapplication/jsonThis 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, and also the custom identifier to define a unifier.

 

ParameterDescriptionData TypeRequired
usersArray of user information, such as identifiers, attributes, and values to be deletedArrayYes
identifiersUser's identifier information.ObjectYes
customUser's custom identifier information.ObjectNo
wholeArray of attributes that are going to be deleted fully from the corresponding userArrayNo
partialAttributes that are going to be deleted partially. (Ex. removing one of the values from an array attribute)ObjectNo
customCustom attributes that are going to be deleted either whole or partiallyObjectNo
emailUser's email address.StringNo
phone_numberUser's phone number in E.164 format (e.g. +6598765432)StringNo
uuidUser's unique user identifier.StringNo
email_optinAttribute. User's permission for marketing emails:
True = emails allowed;
False = email not allowed
BooleanNo
gdpr_optinAttribute. 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
BooleanNo
sms_optinAttribute. User's permission for SMS:
True = SMS allowed;
False = SMS not allowed
BooleanNo
nameAttribute. User's name.StringNo
surnameAttribute. User's surname.StringNo
birthdayAttribute. User's birthday in RFC 3339 format (e.g., 1993-03-12T00:00:00Z).
Note: Send the birthdays without the time offset.
DatetimeNo
genderAttribute. Gender of the user.StringNo
ageAttribute. Age of the userNumberNo
languageLanguage information of the user.StringNo
countryAttribute. Country information of the user in ISO 3166-1 alpha-2 format.StringNo
cityAttribute. City information of the user.StringNo
list_idAttribute. Newsletter contact list IDs (users are added directly).Numbers (Number array)No

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@useinsider.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.

Your title goes here
insider_id is an internal ID maintained by the Insider for each user. To find the insider_id, you can refer to the Profile ID on the User Profile.
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 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.