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
The endpoint (server address) for this request is https://api.ecdp.app/customerconsents
Request parameters
| Parameter | Location | Type | Required | Description | Allowed values / Notes |
| x-api-key | header | string | yes | API key for authentication | Located 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
| Parameter | Type | Description |
| status | integer | Response status code. Returns 0 for successful requests. |
| data | array | Array of Customer consent objects. See customer consent data structure below. |
Customer consent#
Each object in the data array represents a single consent list with the following parameters:
| Parameter | Type | Description |
| id | integer | Unique identifier for the consent list. Corresponds to the ID displayed in Settings > Consents > Consents. |
| name | string | Display name assigned to the consent list in Settings > Consents > Consents. |
| type | string | Communication 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#
| Code | Status | Description |
| 200 | OK | Request processed successfully. Returns the consent list data. |
| 401 | Unauthorized | Missing or invalid API key, or insufficient permissions to access this resource. |
| 403 | Forbidden | Access denied to the requested business unit. |
| 500 | Internal Server Error | Unexpected server error. Retry the request or contact support. |
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