Docs
Banners

Publish a banner

POST/banners/{id}/publishNeedscontent.edit

Publishes the working draft as a new version (or re-serves the latest version when nothing changed). Production needs content.publish and fails with approval_required when the workspace requires review — then request a review (POST /banners/{id}/publish-requests). Staging needs content.edit.

Authorization

secretKey
headerAuthorizationBearer <sk_…>

A secret API key from Settings → API keys. It acts with its creator's role.

Path Parameters

id*integer

The banner's id.

Range1 <= value

Request Body

application/json
  1. body
environment*string

production (everyone matching sees it) or staging (only pages using the staging key).

Value in"production""staging"
note?|

What changed, for the version history ("New step for exports").

Response Body

Published

application/json
  1. response
version*

An immutable published snapshot of an item.

versionCreated*boolean

False when the draft matched an existing version, which is served again.

publication*

Which version each environment serves. null = not published there.

Shell
curl -X POST 'https://app.cueston.com/api/banners/1/publish' \
  -H 'Content-Type: application/json' \
  -d '{
  "environment": "production"
}'
Example Response
JSON
{
  "version": {
    "id": 42,
    "version": 3,
    "note": "Clearer copy on step 2",
    "hash": "7090a4327d58d501f1d2894b7f5148994c165ad4c232de0e817493669e4e9a59",
    "createdBy": {
      "id": 42,
      "name": "Ada Lovelace",
      "email": "ada@acme.com"
    },
    "createdAt": "2026-10-26T09:30:00Z",
    "environments": [
      "production"
    ]
  },
  "versionCreated": true,
  "publication": {
    "production": {
      "versionId": 7,
      "version": 3,
      "publishedAt": "2026-10-26T09:30:00Z"
    },
    "staging": {
      "versionId": 7,
      "version": 3,
      "publishedAt": "2026-10-26T09:30:00Z"
    }
  }
}