Unsubscribe Email Users from Database
  • 07 Aug 2023
  • 1 Minute to read

    Unsubscribe Email Users from Database


      Article Summary

      Overview

      This API enables you to unsubscribe users from Insider's email platform. 

      Your title goes here
      If you want to unsubscribe users from a specific group, you need to use V2 endpoint.

      Endpoint and Headers

      POST https://contact.useinsider.com/email/v1/unsubscribe

      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-TOKEN1a2b3c4e5d6fThis key is required to authorize your request. Refer to API Authentication Tokens to generate your Global Unsubscribe token.
      Content-Typeapplication/jsonThis header specifies the media type of the resource.

      Body Parameters

      ParameterDescriptionData TypeRequired
      emailUser's email addressStringYes

      Sample Example

      Sample Request

      Every request made to the request endpoint requires a request body formatted in JSON and containing your email's content and metadata. This includes the subscriber's email address.

      curl --location --request POST 'https://contact.useinsider.com/email/v1/unsubscribe' \
      --header 'X-PARTNER-NAME: mybrand' \
      --header 'X-REQUEST-TOKEN: a1b2c3d4e5f6' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "email": "sample@useinsider.com"
      }'

      Sample Responses

      200 OK

      {
        "statusMessage": "OK"
      }

      400 Bad Request

      {
        "statusMessage": "Bad request"
      }

      401 Unauthorized

      {
        "statusMessage": "Unauthorized"
      }

      Limitations

      • All functions must be executed with a simple HTTPS POST request.
      • Only global unsubscribers can be sent via this API. No data can be retrieved.
      • The API Key should be provided as the authorization key on the request header. If the key is incorrect, the operation will not be executed and an authorization error will return in the response.
      • The value of X-PARTNER-NAME header should be lowercase.

      Was this article helpful?

      ESC

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