Delete User Profile
  • 16 Apr 2024
  • 2 Minutes to read

    Delete User Profile


      Article Summary

      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.

      Your title goes here
      This deletion action is cannot be undone. We highly suggest you take a backup before initiating the deletion process.

      Endpoint and Headers

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

      your title goes here
      We recommend that you use the new endpoint for this API. If you are using the old or existing endpoint https://crm.api.useinsider.com/delete, you can still use the API.

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

      ParameterDescriptionData TypeRequired
      identifiersUser's identifier information.ObjectYes
      customUser's custom identifier information.ObjectNo
      emailUser's email address.StringNo
      phone_numberUser's phone number in E.164 format (e.g. +6598765432)StringNo
      uuidUser's unique user identifier.StringNo

      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.

      Was this article helpful?

      What's Next
      ESC

      Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses