Get banner
GET
/banners/{banner_id}Use this endpoint to fetch the complete configuration for a single consent banner. The banner_id path parameter corresponds to the collection point’s display_id — a human-readable identifier set when the collection point is created. The response includes full purpose details, cookie configuration, organization branding, and banner display settings.
This is the primary endpoint for rendering a consent banner in your UI.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
banner_id | string | Yes | The display_id of the collection point. Distinct from the internal UUID. |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-API-Key | string | Yes | Your tenant API key |
Response
200 OK
| Field | Type | Description |
|---|---|---|
banner_id | string | Internal UUID of the collection point |
collection_point | string | Internal UUID of the collection point. Identical to banner_id. |
version | string | Schema version string. Currently "1". |
title | string | Display name of the collection point |
consent_type | string or null | The consent collection mechanism (for example, "opt_in" or "opt_out") |
cookie_config | object or null | Cookie-specific configuration. null if this is not a cookie banner. |
purposes | array | Full purpose objects for this collection point |
organization | object | Branding and identity information for your organization |
organization_name | string | The resolved display name — identical to organization.name |
banner_settings | object | Global display settings for the banner |
show_processors | boolean | Whether data processors should be displayed |
cookie_data_elements | array | Data elements from cookie config. Empty if not configured. |
processing_activities | array | Processing activities from cookie config. Empty if not configured. |
purposes[] fields:
| Field | Type | Description |
|---|---|---|
id | string | UUID of the purpose |
name | string | Display name |
is_mandatory | boolean | Whether acceptance is mandatory |
expiry_period | string or null | Human-readable expiry period |
consented | string | Default consent status. Always "declined" on this endpoint. |
data_elements | array | Data elements linked to this purpose |
processing_activities | array | Processing activities linked to this purpose |
legal_entities | array | Legal entities linked to this purpose |
tools | array | Data processor tools linked to this purpose |
organization fields:
| Field | Type | Description |
|---|---|---|
name | string | Display name — trade_name if set, otherwise org_name |
legal_name | string | Legal registered name |
trade_name | string or null | Trading name if configured |
logo_url | string or null | URL of the organization’s logo |
banner_settings fields:
| Field | Type | Description |
|---|---|---|
font_type | string or null | Font family used in the banner UI |
font_size | string or null | Base font size |
primary_color | string or null | Primary brand color as a hex string |
secondary_color | string or null | Secondary brand color as a hex string |
action_button_text | string or null | Label for the primary accept button |
reject_all_text | string or null | Label for the reject all button |
banner_title | string or null | Title text shown at the top of the banner |
footer_text | string or null | Footer copy rendered beneath the purpose list |
show_processors | boolean | Whether data processors should be displayed |
suppression_enabled | boolean or null | Whether banner suppression is active |
suppression_threshold | number or null | Days after which a previously consented user sees the banner again |
dynamic_consent_display | boolean or null | Whether the banner adjusts displayed purposes based on user history |
Errors
| Status | Description |
|---|---|
400 | Tenant context could not be resolved from the provided API key |
404 | No collection point with the given display_id exists for your organization |
500 | Unexpected server error |
Example
curl --request GET \ --url https://api.truConsent.io/banners/CP-SIGNUP-001 \ --header "X-API-Key: YOUR_API_KEY"{ "banner_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "collection_point": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "version": "1", "title": "Website Sign-up Consent", "consent_type": "opt_in", "cookie_config": null, "purposes": [ { "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "name": "Marketing Communications", "is_mandatory": false, "expiry_period": "1 Year", "consented": "declined", "data_elements": [ { "id": "de-uuid-1", "name": "Email Address", "display_id": "DE-001" } ], "processing_activities": [], "legal_entities": [ { "id": "le-uuid-1", "name": "Acme Corp Ltd", "display_id": "LE-001" } ], "tools": [] } ], "organization": { "name": "Acme", "legal_name": "Acme Corp Ltd", "trade_name": "Acme", "logo_url": "https://cdn.example.com/logo.png" }, "organization_name": "Acme", "banner_settings": { "font_type": "Inter", "font_size": "14px", "primary_color": "#0F4FF0", "secondary_color": "#F5F5F5", "action_button_text": "Accept All", "reject_all_text": "Reject All", "banner_title": "Your Privacy Choices", "footer_text": "You can change your preferences at any time.", "show_processors": true, "suppression_enabled": true, "suppression_threshold": 180, "dynamic_consent_display": false }, "show_processors": true, "cookie_data_elements": [], "processing_activities": []}