Smart banners (management API)
Smart banners on your website, with their targeting and schedules. Any endpoint that takes {banner} accepts its ID or its title. For what each setting does, see the user guide.
Every path also works under /v1/manage/appspaces/{appspace}, which you need when an OAuth token reaches more than one Appspace. See the management API overview for signing in, errors, dry runs and paging.
| Method | Path | What it does | Permission |
|---|---|---|---|
GET | /v1/manage/banners | List banners | Read |
POST | /v1/manage/banners | Create a banner | Read and write |
GET | /v1/manage/banners/{banner} | Get a banner | Read |
PATCH | /v1/manage/banners/{banner} | Change a banner | Read and write |
DELETE | /v1/manage/banners/{banner} | Delete a banner | Read and write |
GET | /v1/manage/banners/{banner}/preview | Preview a banner | Read |
POST | /v1/manage/banners/{banner}/activate | Turn a banner on | Read and write |
POST | /v1/manage/banners/{banner}/deactivate | Turn a banner off | Read and write |
POST | /v1/manage/banners/{banner}/restore | Restore a deleted banner | Read and write |
List banners
Section titled “List banners”/v1/manage/bannersPermission: Read.
The Appspace’s smart banners, highest priority first, paged with cursor: each with every field a change takes, and whether it shows now.
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
label | website, promo, announcement, info | No | Only banners with this label. |
active | true, false | No | Only banners that are on (true) or off (false). |
limit | integer | No | How many to return, 1 to 100 (default 50). |
cursor | string | No | From the previous page’s next_cursor, to get the page after it. |
Response 200: a page of results in data, and next_cursor for the next page (see Paging). Each item:
| Field | Type | Description |
|---|---|---|
id | string | The banner’s id. Any endpoint taking {banner} also takes its title. |
title | string | |
label | website, promo, announcement, info | website: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners). |
body | string or null | |
action_url | string or null | |
cta_text | string or null | |
background_color | string | |
text_color | string | |
position | string or null | |
style | string or null | |
shadow | string or null | |
radius | number or null | |
margin | number or null | |
dismiss_days | number or null | |
priority | number | |
starts_at | string or null | |
ends_at | string or null | |
audience_id | string or null | |
audience_name | string or null | |
ab_eligible | boolean | |
active | boolean | On or off (POST /activate, /deactivate). |
showing_now | boolean | On, and within its schedule. |
state | string | In words: on and showing now, waiting for its start, ended, or off. |
created | string | |
updated_at | string | Send as expected_updated_at when changing it, so a change made since isn’t overwritten. |
Create a banner
Section titled “Create a banner”/v1/manage/bannersPermission: Read and write. Changes something: takes dry_run and Idempotency-Key, and needs the Standard plan or above.
The dashboard’s rules apply: a title, Free’s one banner (403 plan_limit), the fixed choices for label, position, style and shadow, and an audience of this Appspace. A new banner is on unless active is false. Send Idempotency-Key so a retry never makes two. With dry_run, nothing changes: the answer is { dry_run: true, before, after, changes, warnings }.
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run | true, false | No | true: check and preview the change without making it (the same as dry_run in the body). |
Request body (JSON):
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | The main line on the banner, such as “Open in the app”. |
label | website, promo, announcement, info | No | Where it shows. website: the smart banner on your website, shown by banner.js and the web SDK to phone visitors (the usual choice). promo, announcement, info: in-app banners, only returned by GET /v1/api/banners for your own code to show. Default info. |
body | string or null | No | The second line, under the title. |
action_url | string or null | No | Where the button goes. Empty: your install link (/install), which opens the app or sends people to the store. |
cta_text | string or null | No | The button’s words, such as “Open”. Empty: “Open”. |
background_color | string or null | No | The banner’s colour (default #ffffff). A hex colour such as #15130F. Empty: the default. |
text_color | string or null | No | The text colour (default #000000). The button uses the two colours the other way round. A hex colour such as #15130F. Empty: the default. |
position | top, bottom or null | No | top (default) or bottom of the screen. |
style | pinned, floating, stacked or null | No | pinned (default): edge to edge. floating: a card with space around it. stacked: in the page, before your header. |
shadow | none, sm, md, lg or null | No | Floating only: none, sm (default), md or lg. |
radius | integer or null | No | Floating only: corner radius in px, 0 to 24 (default 12). |
margin | integer or null | No | Floating only: space around it in px, 0 to 24 (default 12). |
dismiss_days | integer or null | No | After someone closes it, hide it from them for this many days. Empty or 0: it comes back on their next visit. |
priority | integer | No | When several banners qualify, the highest shows. Default 0. Not on Free. |
starts_at | string or null | No | When it starts showing (not on Free). ISO 8601, such as 2026-12-01T09:00:00Z. Empty: none. |
ends_at | string or null | No | When it stops showing (not on Free). ISO 8601, such as 2026-12-01T09:00:00Z. Empty: none. |
audience_id | string or null | No | Only show it to people in this audience: its id or its name (an audience of this Appspace). Empty: everyone. Not on Free. Needs the visitor’s user ID: the web SDK with a user set; banner.js doesn’t send one. |
ab_eligible | boolean | No | Whether A/B tests may use this banner. Default false. |
active | boolean | No | Whether it shows straight away. Default true, as in the dashboard; send false to create it switched off, preview it, then turn it on. |
Response 201: the result in data, with preview and warnings. With dry_run, a preview instead.
| Field | Type | Description |
|---|---|---|
id | string | The banner’s id. Any endpoint taking {banner} also takes its title. |
title | string | |
label | website, promo, announcement, info | website: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners). |
body | string or null | |
action_url | string or null | |
cta_text | string or null | |
background_color | string | |
text_color | string | |
position | string or null | |
style | string or null | |
shadow | string or null | |
radius | number or null | |
margin | number or null | |
dismiss_days | number or null | |
priority | number | |
starts_at | string or null | |
ends_at | string or null | |
audience_id | string or null | |
audience_name | string or null | |
ab_eligible | boolean | |
active | boolean | On or off (POST /activate, /deactivate). |
showing_now | boolean | On, and within its schedule. |
state | string | In words: on and showing now, waiting for its start, ended, or off. |
created | string | |
updated_at | string | Send as expected_updated_at when changing it, so a change made since isn’t overwritten. |
Get a banner
Section titled “Get a banner”/v1/manage/banners/{banner}Permission: Read.
One banner: every field a change takes, by the same names, and whether it shows now.
Path parameters:
| Parameter | Description |
|---|---|
banner | The banner: its id or its title. URL-encode a title. |
Response 200: the result in data, with preview.
| Field | Type | Description |
|---|---|---|
id | string | The banner’s id. Any endpoint taking {banner} also takes its title. |
title | string | |
label | website, promo, announcement, info | website: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners). |
body | string or null | |
action_url | string or null | |
cta_text | string or null | |
background_color | string | |
text_color | string | |
position | string or null | |
style | string or null | |
shadow | string or null | |
radius | number or null | |
margin | number or null | |
dismiss_days | number or null | |
priority | number | |
starts_at | string or null | |
ends_at | string or null | |
audience_id | string or null | |
audience_name | string or null | |
ab_eligible | boolean | |
active | boolean | On or off (POST /activate, /deactivate). |
showing_now | boolean | On, and within its schedule. |
state | string | In words: on and showing now, waiting for its start, ended, or off. |
created | string | |
updated_at | string | Send as expected_updated_at when changing it, so a change made since isn’t overwritten. |
Change a banner
Section titled “Change a banner”/v1/manage/banners/{banner}Permission: Read and write. Changes something: takes dry_run and Idempotency-Key, and needs the Standard plan or above.
Only the fields sent change; null clears one. Send expected_updated_at (the updated_at you read) and a change made in the meantime is refused with 412 instead of overwritten. With dry_run, nothing changes: the answer is { dry_run: true, before, after, changes, warnings }.
Path parameters:
| Parameter | Description |
|---|---|
banner | The banner: its id or its title. URL-encode a title. |
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run | true, false | No | true: check and preview the change without making it (the same as dry_run in the body). |
Request body (JSON):
| Field | Type | Required | Description |
|---|---|---|---|
title | string | No | A new title. |
label | website, promo, announcement, info | No | Where it shows. website: the smart banner on your website, shown by banner.js and the web SDK to phone visitors (the usual choice). promo, announcement, info: in-app banners, only returned by GET /v1/api/banners for your own code to show. Default info. |
body | string or null | No | The second line, under the title. |
action_url | string or null | No | Where the button goes. Empty: your install link (/install), which opens the app or sends people to the store. |
cta_text | string or null | No | The button’s words, such as “Open”. Empty: “Open”. |
background_color | string or null | No | The banner’s colour (default #ffffff). A hex colour such as #15130F. Empty: the default. |
text_color | string or null | No | The text colour (default #000000). The button uses the two colours the other way round. A hex colour such as #15130F. Empty: the default. |
position | top, bottom or null | No | top (default) or bottom of the screen. |
style | pinned, floating, stacked or null | No | pinned (default): edge to edge. floating: a card with space around it. stacked: in the page, before your header. |
shadow | none, sm, md, lg or null | No | Floating only: none, sm (default), md or lg. |
radius | integer or null | No | Floating only: corner radius in px, 0 to 24 (default 12). |
margin | integer or null | No | Floating only: space around it in px, 0 to 24 (default 12). |
dismiss_days | integer or null | No | After someone closes it, hide it from them for this many days. Empty or 0: it comes back on their next visit. |
priority | integer | No | When several banners qualify, the highest shows. Default 0. Not on Free. |
starts_at | string or null | No | When it starts showing (not on Free). ISO 8601, such as 2026-12-01T09:00:00Z. Empty: none. |
ends_at | string or null | No | When it stops showing (not on Free). ISO 8601, such as 2026-12-01T09:00:00Z. Empty: none. |
audience_id | string or null | No | Only show it to people in this audience: its id or its name (an audience of this Appspace). Empty: everyone. Not on Free. Needs the visitor’s user ID: the web SDK with a user set; banner.js doesn’t send one. |
ab_eligible | boolean | No | Whether A/B tests may use this banner. Default false. |
expected_updated_at | string | No | The updated_at you read. If the thing has changed since, nothing is saved and the answer is 412 precondition_failed: read it again and retry. |
Response 200: the result in data, with preview and warnings. With dry_run, a preview instead.
| Field | Type | Description |
|---|---|---|
id | string | The banner’s id. Any endpoint taking {banner} also takes its title. |
title | string | |
label | website, promo, announcement, info | website: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners). |
body | string or null | |
action_url | string or null | |
cta_text | string or null | |
background_color | string | |
text_color | string | |
position | string or null | |
style | string or null | |
shadow | string or null | |
radius | number or null | |
margin | number or null | |
dismiss_days | number or null | |
priority | number | |
starts_at | string or null | |
ends_at | string or null | |
audience_id | string or null | |
audience_name | string or null | |
ab_eligible | boolean | |
active | boolean | On or off (POST /activate, /deactivate). |
showing_now | boolean | On, and within its schedule. |
state | string | In words: on and showing now, waiting for its start, ended, or off. |
created | string | |
updated_at | string | Send as expected_updated_at when changing it, so a change made since isn’t overwritten. |
Delete a banner
Section titled “Delete a banner”/v1/manage/banners/{banner}Permission: Read and write. Changes something: takes dry_run and Idempotency-Key, and needs the Standard plan or above.
It stops showing at once. It goes to the trash and can be restored for 30 days. With dry_run, nothing changes: the answer is { dry_run: true, before, after, changes, warnings }.
Path parameters:
| Parameter | Description |
|---|---|
banner | The banner: its id or its title. URL-encode a title. |
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run | true, false | No | true: check and preview the change without making it (the same as dry_run in the body). |
Response 200: the result in data, with warnings. With dry_run, a preview instead.
| Field | Type | Description |
|---|---|---|
deleted | true | |
id | string | |
name | string | |
trash_id | string | The trash entry: POST /trash/{id}/restore, or POST /banners/{banner}/restore, brings it back. |
restorable_until | string |
Preview a banner
Section titled “Preview a banner”/v1/manage/banners/{banner}/previewPermission: Read.
The banner drawn as a phone visitor sees it, as an HTML document (the dashboard’s own drawing, which follows banner.js), with a summary in words. Send Accept: text/html for the page itself. There is no PNG.
Path parameters:
| Parameter | Description |
|---|---|
banner | The banner: its id or its title. URL-encode a title. |
Response 200: the result in data.
| Field | Type | Description |
|---|---|---|
html | string | A whole HTML document; open it in a browser or a phone-sized frame. |
summary | string | |
showing_now | boolean | |
png | null | No screenshot: the HTML is the preview. |
Turn a banner on
Section titled “Turn a banner on”/v1/manage/banners/{banner}/activatePermission: Read and write. Changes something: takes dry_run and Idempotency-Key, and needs the Standard plan or above.
It shows from now, within its schedule. Already on: nothing changes. With dry_run, nothing changes: the answer is { dry_run: true, before, after, changes, warnings }.
Path parameters:
| Parameter | Description |
|---|---|
banner | The banner: its id or its title. URL-encode a title. |
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run | true, false | No | true: check and preview the change without making it (the same as dry_run in the body). |
Response 200: the result in data, with preview and warnings. With dry_run, a preview instead.
| Field | Type | Description |
|---|---|---|
id | string | The banner’s id. Any endpoint taking {banner} also takes its title. |
title | string | |
label | website, promo, announcement, info | website: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners). |
body | string or null | |
action_url | string or null | |
cta_text | string or null | |
background_color | string | |
text_color | string | |
position | string or null | |
style | string or null | |
shadow | string or null | |
radius | number or null | |
margin | number or null | |
dismiss_days | number or null | |
priority | number | |
starts_at | string or null | |
ends_at | string or null | |
audience_id | string or null | |
audience_name | string or null | |
ab_eligible | boolean | |
active | boolean | On or off (POST /activate, /deactivate). |
showing_now | boolean | On, and within its schedule. |
state | string | In words: on and showing now, waiting for its start, ended, or off. |
created | string | |
updated_at | string | Send as expected_updated_at when changing it, so a change made since isn’t overwritten. |
Turn a banner off
Section titled “Turn a banner off”/v1/manage/banners/{banner}/deactivatePermission: Read and write. Changes something: takes dry_run and Idempotency-Key, and needs the Standard plan or above.
It stops showing at once; nothing else changes. Already off: nothing changes. With dry_run, nothing changes: the answer is { dry_run: true, before, after, changes, warnings }.
Path parameters:
| Parameter | Description |
|---|---|
banner | The banner: its id or its title. URL-encode a title. |
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run | true, false | No | true: check and preview the change without making it (the same as dry_run in the body). |
Response 200: the result in data, with preview and warnings. With dry_run, a preview instead.
| Field | Type | Description |
|---|---|---|
id | string | The banner’s id. Any endpoint taking {banner} also takes its title. |
title | string | |
label | website, promo, announcement, info | website: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners). |
body | string or null | |
action_url | string or null | |
cta_text | string or null | |
background_color | string | |
text_color | string | |
position | string or null | |
style | string or null | |
shadow | string or null | |
radius | number or null | |
margin | number or null | |
dismiss_days | number or null | |
priority | number | |
starts_at | string or null | |
ends_at | string or null | |
audience_id | string or null | |
audience_name | string or null | |
ab_eligible | boolean | |
active | boolean | On or off (POST /activate, /deactivate). |
showing_now | boolean | On, and within its schedule. |
state | string | In words: on and showing now, waiting for its start, ended, or off. |
created | string | |
updated_at | string | Send as expected_updated_at when changing it, so a change made since isn’t overwritten. |
Restore a deleted banner
Section titled “Restore a deleted banner”/v1/manage/banners/{banner}/restorePermission: Read and write. Changes something: takes dry_run and Idempotency-Key, and needs the Standard plan or above.
Brings back a banner deleted in the last 30 days, with the same id, on or off as it was. {banner} is its old id or title, or the trash entry’s id. On Free, refused with 409 conflict while there’s another banner. With dry_run, nothing changes: the answer is { dry_run: true, before, after, changes, warnings }.
Path parameters:
| Parameter | Description |
|---|---|
banner | The deleted banner: its old id or title, or the trash entry’s id. |
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run | true, false | No | true: check and preview the change without making it (the same as dry_run in the body). |
Response 200: the result in data, with preview and warnings. With dry_run, a preview instead.
| Field | Type | Description |
|---|---|---|
id | string | The banner’s id. Any endpoint taking {banner} also takes its title. |
title | string | |
label | website, promo, announcement, info | website: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners). |
body | string or null | |
action_url | string or null | |
cta_text | string or null | |
background_color | string | |
text_color | string | |
position | string or null | |
style | string or null | |
shadow | string or null | |
radius | number or null | |
margin | number or null | |
dismiss_days | number or null | |
priority | number | |
starts_at | string or null | |
ends_at | string or null | |
audience_id | string or null | |
audience_name | string or null | |
ab_eligible | boolean | |
active | boolean | On or off (POST /activate, /deactivate). |
showing_now | boolean | On, and within its schedule. |
state | string | In words: on and showing now, waiting for its start, ended, or off. |
created | string | |
updated_at | string | Send as expected_updated_at when changing it, so a change made since isn’t overwritten. |