Phone Number/Email Lists API

The Phone Number/Email Lists API allows you to manage the Opt-Out list(s) by providing documentation for adding or deleting contacts through the API.

To view the API documentation for each list, go to the List Management > Phone Number/Email Opt-out Lists section.

1-Aug-13-2024-10-50-39-0410-AM

Click the “API Doc” button in the “Actions” column. The system will show the API documentation for the respective Phone Number/Email Opt-out List.

API 0

The document contains the following information:

  • Authentication
    • 1. Adding contacts to Opt-Out Lists
      • 1.1 PHP Sample
      • 1.2 Response Samples
    • 2. Removing contacts from Opt-Out Lists
      • 2.1 PHP Sample
      • 2.2 Response Samples

    To download the documentation in PDF format, click the “Get as PDF” button.

    Authentication

    The Authentication block allows you to view a short guide on where to find the API Key to add or delete contacts from the Phone Number/Email Opt-out Lists through the API.

    API 01

    1. Adding contacts to Opt-Out Lists

    The Adding contacts to Opt-Out Lists section contains all the information on how to add contacts to the Phone Number/Email Opt-out Lists through the API. 

    You can view the link to which a POST request should be made to add a Phone Number or Email to the list. To add a Phone Number, append "/phones-add" to the end of the link. To add an Email, append "/emails-add" to the end of the link.

    Use the table provided below to view the Phone Number or Email List(s) API specifications for request fields:

    • Field Name: The name of the field.
    • Required (YES/NO): Displays if the field is required.
    • Description: The description of the information in the field.
    • Example: The data examples.
    • Format: Displays the data format that should be used in the field.

    API 1

    1.1 PHP Sample

    The PHP Sample block allows you to view examples of requests.

    API 1.1

    1.2 Response Samples

    The Response Samples block contains the templates of responses for a successful contact addition or an error.

    API 1.2

    The information is separated into four blocks:

      • Success: Example of a response when a phone number or email is successfully added to the list.
      • API Key Error: Example of a response when the List API Key is invalid.
      • HTTP Method Error: Example of a response when the HTTP method is not allowed.
    • Missing Required Param Error: Example of a response when a required parameter was not entered.

    2. Removing contacts from Opt-Out Lists

    The Removing contacts from Opt-Out Lists section contains all the information on how to remove contacts from the Phone Number/Email Opt-out Lists through the API. 

    The section is divided into the same four blocks as the Adding contacts to Opt-Out Lists section, with the difference in the POST URL string being "/phones-delete" and "/emails-delete".

    API 2

    2.1 PHP Sample

    The PHP Sample block allows you to view examples of removal requests.

    API 2.1

    2.2 Response Samples

    The Response Samples block contains the templates of responses for a successful contact removal or an error.

    API 2.2

    The information is separated into four blocks:

    • Success: Example of a response when a phone number or email is successfully removed from the list.
    • API Key Error: Example of a response when the List API Key is invalid.
    • HTTP Method Error: Example of a response when the HTTP method is not allowed.
    • Missing Required Param Error: Example of a response when a required parameter was not entered.