Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange. Only a 401 means it is spent; not_a_member (403) is about the organization named in X-Organization-Id and leaves the token good for the others.

Headers

X-Organization-Id
string

The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing: the answer is not_a_member (403), which does not mean the session is over. Absent, the session's default organization answers, or — if that membership was revoked while the session was open — any other one the caller still holds.

Query Parameters

environment
enum<string>
default:live

Which environment to act in. A view parameter, valid only on the staff surface — a machine credential never chooses its environment, it is resolved from the key.

Available options:
live,
test

Body

application/json

A banner on the way in. kind and slot are required on create and kind is refused on update. The fields of the kind you are not writing are ignored and stored empty — a row carrying both kinds' content is one whose appearance would depend on which branch of the widget read it first.

kind
enum<string>

Required on create, immutable afterwards.

Available options:
text,
image
slot
string

Lowercase letters, digits, hyphens, underscores. Matched by string against the slot prop in your app.

Maximum string length: 60
active
boolean
default:false
starts_at
string<date-time> | null

RFC 3339 with an offset. null clears the lower bound.

ends_at
string<date-time> | null

RFC 3339 with an offset. null means it never stops.

priority
integer
default:0
Required range: -1000 <= x <= 1000
dismissible
boolean
default:true
title
string

Required for text.

Maximum string length: 120
body
string
Maximum string length: 500
icon
string

One of the names in icons, or empty.

tone
enum<string>
default:info
Available options:
info,
success,
warning,
danger
cta_label
string

Needs cta_url alongside it — a button with no destination does nothing when it is clicked.

Maximum string length: 40
cta_url
string

Both kinds: the button's destination, or the whole picture's link. Empty means it goes nowhere.

A path rooted at / (/plans) or an absolute http/https URL — the same two shapes an in-app notification's url takes, and for the same reason. A path is if anything the more natural half here, since a banner is drawn inside your own product. Anything else is a 400, javascript: and the protocol-relative //host/path included: this value ends up in an href on your own page.

image_url
string

Required for image. An absolute http(s) URL.

image_alt
string
Maximum string length: 300
segment_id
string<uuid> | null

The audience, or null for everybody. Must belong to the same environment.

Response

The banner.

banner
object

A message on your users' screens, in a slot your own developer left room for. kind decides which fields carry the content — text is drawn by the widget in your palette, image is a picture you made and the widget only frames — and it cannot change, because the two fill different columns and turning one into the other would discard what somebody wrote.