Skip to content

Customers – get consent lists  

This GET method retrieves a complete list of marketing consents configured in your business unit, including each consent’s unique identifier, name, and channel type.

Endpoint

GET customerconsents

Host: https://api.ecdp.app

Request parameters

ParameterLocationTypeRequiredDescriptionAllowed values / Notes
x-api-keyheaderstringyesAPI key for authenticationLocated in Settings > API. Send as request header.

This endpoint does not accept query parameters. The request retrieves all consent lists for the authenticated business unit.

Response

ParameterTypeDescription
statusintegerResponse status code. Returns 0 for successful requests.
dataarrayArray of Customer consent objects. See customer consent data structure below.

Each object in the data array represents a single consent list with the following parameters:

ParameterTypeDescription
idintegerUnique identifier for the consent list. Corresponds to the ID displayed in Settings > Consents > Consents.
namestringDisplay name assigned to the consent list in Settings > Consents > Consents.
typestringCommunication channel type for the consent. Allowed values: General, Email, Sms.

Example request and response

Get all consent lists

Response (200 OK):

{
  "status": 0,
  "data": [
    {
      "id": 1,
      "name": "Newsletter subscription",
      "type": "Email"
    },
    {
      "id": 2,
      "name": "SMS marketing",
      "type": "Sms"
    },
    {
      "id": 3,
      "name": "Terms and conditions",
      "type": "General"
    }
  ]
}

Empty consent list

When no consents are configured, the endpoint returns an empty data array:

Response (200 OK):

{
  "status": 0,
  "data": []
}

Response codes#

CodeStatusDescription
200OKRequest processed successfully. Returns the consent list data.
401UnauthorizedMissing or invalid API key, or insufficient permissions to access this resource.

Validation and behavior rules#

  • Only consents visible in Settings > Consents > Consents are returned.
  • System-defined consents and user-created consents are both included in the response.
  • The type field indicates the communication channel: General (non-channel-specific), Email (email marketing), or SMS (SMS marketing).

Reference documentation#

Swagger – Customer consents

https://api.ecdp.app/swagger/index.html