List banners
GET
/bannersUse this endpoint to retrieve every collection point configured for your organization, along with each collection point’s associated purposes, data elements, and legal entities. Each purpose includes a default consented value of "declined" — this represents no recorded user interaction.
To retrieve banners with a specific user’s consent status overlaid, use GET /banners/user/:user_id instead.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-API-Key | string | Yes | Your tenant API key |
Response
200 OK — an array of BannerMeta objects, one per collection point.
| Field | Type | Description |
|---|---|---|
banner_id | string | UUID of the collection point |
collection_point | string | UUID of the collection point. Identical to banner_id. |
title | string | Display name of the collection point |
asset | object or null | The asset associated with this collection point, or null if none is configured |
purposes | array | Purposes linked to this collection point |
data_elements | array | Data elements linked across all purposes on this collection point |
legal_entities | array | Legal entities linked across all purposes on this collection point |
asset fields:
| Field | Type | Description |
|---|---|---|
id | string | UUID of the asset |
name | string | Display name |
description | string or null | Description |
asset_type | string or null | Classification (for example, "website" or "mobile_app") |
purposes[] fields:
| Field | Type | Description |
|---|---|---|
id | string | UUID of the purpose |
name | string | Display name |
is_mandatory | boolean | Whether the purpose is mandatory |
expiry_period | string or null | Human-readable expiry period (for example, "1 Year") |
relationships | object | Raw relationship maps to data elements, legal entities, and other entities by UUID |
consented | string | Default consent status. Always "declined" on this endpoint. |
Errors
| Status | Description |
|---|---|
400 | Tenant context could not be resolved from the provided API key |
500 | Unexpected server error |
Example
curl --request GET \ --url https://api.truConsent.io/banners \ --header "X-API-Key: YOUR_API_KEY"[ { "banner_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "collection_point": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "title": "Website Sign-up Consent", "asset": { "id": "f1e2d3c4-b5a6-7890-abcd-123456789012", "name": "Marketing Website", "description": "Public-facing marketing site", "asset_type": "website" }, "purposes": [ { "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "name": "Marketing Communications", "is_mandatory": false, "expiry_period": "1 Year", "consented": "declined", "relationships": { "data_elements": ["de-uuid-1"], "legal_entities": ["le-uuid-1"] } } ], "data_elements": [ { "id": "de-uuid-1", "name": "Email Address", "description": "User's primary email" } ], "legal_entities": [ { "id": "le-uuid-1", "name": "Acme Corp Ltd", "display_id": "LE-001" } ] }]