Skip to content

Smart banners (management API)

View as Markdown

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.

MethodPathWhat it doesPermission
GET/v1/manage/bannersList bannersRead
POST/v1/manage/bannersCreate a bannerRead and write
GET/v1/manage/banners/{banner}Get a bannerRead
PATCH/v1/manage/banners/{banner}Change a bannerRead and write
DELETE/v1/manage/banners/{banner}Delete a bannerRead and write
GET/v1/manage/banners/{banner}/previewPreview a bannerRead
POST/v1/manage/banners/{banner}/activateTurn a banner onRead and write
POST/v1/manage/banners/{banner}/deactivateTurn a banner offRead and write
POST/v1/manage/banners/{banner}/restoreRestore a deleted bannerRead and write
GET/v1/manage/banners

Permission: 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:

ParameterTypeRequiredDescription
labelwebsite, promo, announcement, infoNoOnly banners with this label.
activetrue, falseNoOnly banners that are on (true) or off (false).
limitintegerNoHow many to return, 1 to 100 (default 50).
cursorstringNoFrom 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:

FieldTypeDescription
idstringThe banner’s id. Any endpoint taking {banner} also takes its title.
titlestring
labelwebsite, promo, announcement, infowebsite: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners).
bodystring or null
action_urlstring or null
cta_textstring or null
background_colorstring
text_colorstring
positionstring or null
stylestring or null
shadowstring or null
radiusnumber or null
marginnumber or null
dismiss_daysnumber or null
prioritynumber
starts_atstring or null
ends_atstring or null
audience_idstring or null
audience_namestring or null
ab_eligibleboolean
activebooleanOn or off (POST /activate, /deactivate).
showing_nowbooleanOn, and within its schedule.
statestringIn words: on and showing now, waiting for its start, ended, or off.
createdstring
updated_atstringSend as expected_updated_at when changing it, so a change made since isn’t overwritten.
POST/v1/manage/banners

Permission: 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:

ParameterTypeRequiredDescription
dry_runtrue, falseNotrue: check and preview the change without making it (the same as dry_run in the body).

Request body (JSON):

FieldTypeRequiredDescription
titlestringYesThe main line on the banner, such as “Open in the app”.
labelwebsite, promo, announcement, infoNoWhere 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.
bodystring or nullNoThe second line, under the title.
action_urlstring or nullNoWhere the button goes. Empty: your install link (/install), which opens the app or sends people to the store.
cta_textstring or nullNoThe button’s words, such as “Open”. Empty: “Open”.
background_colorstring or nullNoThe banner’s colour (default #ffffff). A hex colour such as #15130F. Empty: the default.
text_colorstring or nullNoThe text colour (default #000000). The button uses the two colours the other way round. A hex colour such as #15130F. Empty: the default.
positiontop, bottom or nullNotop (default) or bottom of the screen.
stylepinned, floating, stacked or nullNopinned (default): edge to edge. floating: a card with space around it. stacked: in the page, before your header.
shadownone, sm, md, lg or nullNoFloating only: none, sm (default), md or lg.
radiusinteger or nullNoFloating only: corner radius in px, 0 to 24 (default 12).
margininteger or nullNoFloating only: space around it in px, 0 to 24 (default 12).
dismiss_daysinteger or nullNoAfter someone closes it, hide it from them for this many days. Empty or 0: it comes back on their next visit.
priorityintegerNoWhen several banners qualify, the highest shows. Default 0. Not on Free.
starts_atstring or nullNoWhen it starts showing (not on Free). ISO 8601, such as 2026-12-01T09:00:00Z. Empty: none.
ends_atstring or nullNoWhen it stops showing (not on Free). ISO 8601, such as 2026-12-01T09:00:00Z. Empty: none.
audience_idstring or nullNoOnly 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_eligiblebooleanNoWhether A/B tests may use this banner. Default false.
activebooleanNoWhether 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.

FieldTypeDescription
idstringThe banner’s id. Any endpoint taking {banner} also takes its title.
titlestring
labelwebsite, promo, announcement, infowebsite: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners).
bodystring or null
action_urlstring or null
cta_textstring or null
background_colorstring
text_colorstring
positionstring or null
stylestring or null
shadowstring or null
radiusnumber or null
marginnumber or null
dismiss_daysnumber or null
prioritynumber
starts_atstring or null
ends_atstring or null
audience_idstring or null
audience_namestring or null
ab_eligibleboolean
activebooleanOn or off (POST /activate, /deactivate).
showing_nowbooleanOn, and within its schedule.
statestringIn words: on and showing now, waiting for its start, ended, or off.
createdstring
updated_atstringSend as expected_updated_at when changing it, so a change made since isn’t overwritten.
GET/v1/manage/banners/{banner}

Permission: Read.

One banner: every field a change takes, by the same names, and whether it shows now.

Path parameters:

ParameterDescription
bannerThe banner: its id or its title. URL-encode a title.

Response 200: the result in data, with preview.

FieldTypeDescription
idstringThe banner’s id. Any endpoint taking {banner} also takes its title.
titlestring
labelwebsite, promo, announcement, infowebsite: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners).
bodystring or null
action_urlstring or null
cta_textstring or null
background_colorstring
text_colorstring
positionstring or null
stylestring or null
shadowstring or null
radiusnumber or null
marginnumber or null
dismiss_daysnumber or null
prioritynumber
starts_atstring or null
ends_atstring or null
audience_idstring or null
audience_namestring or null
ab_eligibleboolean
activebooleanOn or off (POST /activate, /deactivate).
showing_nowbooleanOn, and within its schedule.
statestringIn words: on and showing now, waiting for its start, ended, or off.
createdstring
updated_atstringSend as expected_updated_at when changing it, so a change made since isn’t overwritten.
PATCH/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:

ParameterDescription
bannerThe banner: its id or its title. URL-encode a title.

Query parameters:

ParameterTypeRequiredDescription
dry_runtrue, falseNotrue: check and preview the change without making it (the same as dry_run in the body).

Request body (JSON):

FieldTypeRequiredDescription
titlestringNoA new title.
labelwebsite, promo, announcement, infoNoWhere 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.
bodystring or nullNoThe second line, under the title.
action_urlstring or nullNoWhere the button goes. Empty: your install link (/install), which opens the app or sends people to the store.
cta_textstring or nullNoThe button’s words, such as “Open”. Empty: “Open”.
background_colorstring or nullNoThe banner’s colour (default #ffffff). A hex colour such as #15130F. Empty: the default.
text_colorstring or nullNoThe text colour (default #000000). The button uses the two colours the other way round. A hex colour such as #15130F. Empty: the default.
positiontop, bottom or nullNotop (default) or bottom of the screen.
stylepinned, floating, stacked or nullNopinned (default): edge to edge. floating: a card with space around it. stacked: in the page, before your header.
shadownone, sm, md, lg or nullNoFloating only: none, sm (default), md or lg.
radiusinteger or nullNoFloating only: corner radius in px, 0 to 24 (default 12).
margininteger or nullNoFloating only: space around it in px, 0 to 24 (default 12).
dismiss_daysinteger or nullNoAfter someone closes it, hide it from them for this many days. Empty or 0: it comes back on their next visit.
priorityintegerNoWhen several banners qualify, the highest shows. Default 0. Not on Free.
starts_atstring or nullNoWhen it starts showing (not on Free). ISO 8601, such as 2026-12-01T09:00:00Z. Empty: none.
ends_atstring or nullNoWhen it stops showing (not on Free). ISO 8601, such as 2026-12-01T09:00:00Z. Empty: none.
audience_idstring or nullNoOnly 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_eligiblebooleanNoWhether A/B tests may use this banner. Default false.
expected_updated_atstringNoThe 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.

FieldTypeDescription
idstringThe banner’s id. Any endpoint taking {banner} also takes its title.
titlestring
labelwebsite, promo, announcement, infowebsite: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners).
bodystring or null
action_urlstring or null
cta_textstring or null
background_colorstring
text_colorstring
positionstring or null
stylestring or null
shadowstring or null
radiusnumber or null
marginnumber or null
dismiss_daysnumber or null
prioritynumber
starts_atstring or null
ends_atstring or null
audience_idstring or null
audience_namestring or null
ab_eligibleboolean
activebooleanOn or off (POST /activate, /deactivate).
showing_nowbooleanOn, and within its schedule.
statestringIn words: on and showing now, waiting for its start, ended, or off.
createdstring
updated_atstringSend as expected_updated_at when changing it, so a change made since isn’t overwritten.
DELETE/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:

ParameterDescription
bannerThe banner: its id or its title. URL-encode a title.

Query parameters:

ParameterTypeRequiredDescription
dry_runtrue, falseNotrue: 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.

FieldTypeDescription
deletedtrue
idstring
namestring
trash_idstringThe trash entry: POST /trash/{id}/restore, or POST /banners/{banner}/restore, brings it back.
restorable_untilstring
GET/v1/manage/banners/{banner}/preview

Permission: 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:

ParameterDescription
bannerThe banner: its id or its title. URL-encode a title.

Response 200: the result in data.

FieldTypeDescription
htmlstringA whole HTML document; open it in a browser or a phone-sized frame.
summarystring
showing_nowboolean
pngnullNo screenshot: the HTML is the preview.
POST/v1/manage/banners/{banner}/activate

Permission: 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:

ParameterDescription
bannerThe banner: its id or its title. URL-encode a title.

Query parameters:

ParameterTypeRequiredDescription
dry_runtrue, falseNotrue: 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.

FieldTypeDescription
idstringThe banner’s id. Any endpoint taking {banner} also takes its title.
titlestring
labelwebsite, promo, announcement, infowebsite: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners).
bodystring or null
action_urlstring or null
cta_textstring or null
background_colorstring
text_colorstring
positionstring or null
stylestring or null
shadowstring or null
radiusnumber or null
marginnumber or null
dismiss_daysnumber or null
prioritynumber
starts_atstring or null
ends_atstring or null
audience_idstring or null
audience_namestring or null
ab_eligibleboolean
activebooleanOn or off (POST /activate, /deactivate).
showing_nowbooleanOn, and within its schedule.
statestringIn words: on and showing now, waiting for its start, ended, or off.
createdstring
updated_atstringSend as expected_updated_at when changing it, so a change made since isn’t overwritten.
POST/v1/manage/banners/{banner}/deactivate

Permission: 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:

ParameterDescription
bannerThe banner: its id or its title. URL-encode a title.

Query parameters:

ParameterTypeRequiredDescription
dry_runtrue, falseNotrue: 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.

FieldTypeDescription
idstringThe banner’s id. Any endpoint taking {banner} also takes its title.
titlestring
labelwebsite, promo, announcement, infowebsite: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners).
bodystring or null
action_urlstring or null
cta_textstring or null
background_colorstring
text_colorstring
positionstring or null
stylestring or null
shadowstring or null
radiusnumber or null
marginnumber or null
dismiss_daysnumber or null
prioritynumber
starts_atstring or null
ends_atstring or null
audience_idstring or null
audience_namestring or null
ab_eligibleboolean
activebooleanOn or off (POST /activate, /deactivate).
showing_nowbooleanOn, and within its schedule.
statestringIn words: on and showing now, waiting for its start, ended, or off.
createdstring
updated_atstringSend as expected_updated_at when changing it, so a change made since isn’t overwritten.
POST/v1/manage/banners/{banner}/restore

Permission: 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:

ParameterDescription
bannerThe deleted banner: its old id or title, or the trash entry’s id.

Query parameters:

ParameterTypeRequiredDescription
dry_runtrue, falseNotrue: 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.

FieldTypeDescription
idstringThe banner’s id. Any endpoint taking {banner} also takes its title.
titlestring
labelwebsite, promo, announcement, infowebsite: the smart banner banner.js and the web SDK show. promo, announcement, info: in-app, for your own code (GET /v1/api/banners).
bodystring or null
action_urlstring or null
cta_textstring or null
background_colorstring
text_colorstring
positionstring or null
stylestring or null
shadowstring or null
radiusnumber or null
marginnumber or null
dismiss_daysnumber or null
prioritynumber
starts_atstring or null
ends_atstring or null
audience_idstring or null
audience_namestring or null
ab_eligibleboolean
activebooleanOn or off (POST /activate, /deactivate).
showing_nowbooleanOn, and within its schedule.
statestringIn words: on and showing now, waiting for its start, ended, or off.
createdstring
updated_atstringSend as expected_updated_at when changing it, so a change made since isn’t overwritten.
Was this page helpful?