GET
/api/public/campaign-configCampaign config
Returns runtime config for a campaign: show/hide decision and campaign content fields. Use this when your frontend needs both targeting rules and campaign-specific text/image values.
Query parameters
| Parameter | Required | Description |
|---|---|---|
| bannerId | Yes | Banner UUID from the dashboard |
| campaignId | Yes | Campaign ID (e.g. bnrflx-xxxxxxxx or raw UUID) |
| country | No | ISO 3166-1 alpha-2 override for geo testing |
| date | No | Date/time override for schedule testing |
Response
{
"show": true,
"campaignId": "6f8d...uuid",
"contentFields": [
{ "id": "1", "key": "headline", "label": "Headline", "type": "text", "value": "Summer Sale" },
{ "id": "2", "key": "subcopy", "label": "Subcopy", "type": "text", "value": "Up to 40% off" }
]
}Example
const res = await fetch(
`${baseUrl}/api/public/campaign-config?bannerId=${bannerId}&campaignId=${campaignId}`
);
const { show, contentFields } = await res.json();
if (show) {
const headline = contentFields.find((f) => f.key === 'headline')?.value;
// render popup/banner with campaign-specific content
}