Skip to content

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

ParameterTypeRequiredDescription
banner_idstringYesThe display_id of the collection point. Distinct from the internal UUID.

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour tenant API key

Response

200 OK

FieldTypeDescription
banner_idstringInternal UUID of the collection point
collection_pointstringInternal UUID of the collection point. Identical to banner_id.
versionstringSchema version string. Currently "1".
titlestringDisplay name of the collection point
consent_typestring or nullThe consent collection mechanism (for example, "opt_in" or "opt_out")
cookie_configobject or nullCookie-specific configuration. null if this is not a cookie banner.
purposesarrayFull purpose objects for this collection point
organizationobjectBranding and identity information for your organization
organization_namestringThe resolved display name — identical to organization.name
banner_settingsobjectGlobal display settings for the banner
show_processorsbooleanWhether data processors should be displayed
cookie_data_elementsarrayData elements from cookie config. Empty if not configured.
processing_activitiesarrayProcessing activities from cookie config. Empty if not configured.

purposes[] fields:

FieldTypeDescription
idstringUUID of the purpose
namestringDisplay name
is_mandatorybooleanWhether acceptance is mandatory
expiry_periodstring or nullHuman-readable expiry period
consentedstringDefault consent status. Always "declined" on this endpoint.
data_elementsarrayData elements linked to this purpose
processing_activitiesarrayProcessing activities linked to this purpose
legal_entitiesarrayLegal entities linked to this purpose
toolsarrayData processor tools linked to this purpose

organization fields:

FieldTypeDescription
namestringDisplay name — trade_name if set, otherwise org_name
legal_namestringLegal registered name
trade_namestring or nullTrading name if configured
logo_urlstring or nullURL of the organization’s logo

banner_settings fields:

FieldTypeDescription
font_typestring or nullFont family used in the banner UI
font_sizestring or nullBase font size
primary_colorstring or nullPrimary brand color as a hex string
secondary_colorstring or nullSecondary brand color as a hex string
action_button_textstring or nullLabel for the primary accept button
reject_all_textstring or nullLabel for the reject all button
banner_titlestring or nullTitle text shown at the top of the banner
footer_textstring or nullFooter copy rendered beneath the purpose list
show_processorsbooleanWhether data processors should be displayed
suppression_enabledboolean or nullWhether banner suppression is active
suppression_thresholdnumber or nullDays after which a previously consented user sees the banner again
dynamic_consent_displayboolean or nullWhether the banner adjusts displayed purposes based on user history

Errors

StatusDescription
400Tenant context could not be resolved from the provided API key
404No collection point with the given display_id exists for your organization
500Unexpected server error

Example

Terminal window
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": []
}