Docs
Tours

Publish a version (roll back)

POST/tours/{id}/versions/{versionId}/publishNeedscontent.edit

Serves this version in an environment without touching the draft — the one-step rollback. Same permission and approval rules as publishing.

Authorization

secretKey
headerAuthorizationBearer <sk_…>

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

Path Parameters

id*integer

The tour's id.

Range1 <= value
versionId*integer

The version's id (from the versions list).

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"

Response Body

OK

application/json
  1. response
version*

An immutable published snapshot of an item.

publication*

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

Shell
curl -X POST 'https://app.cueston.com/api/tours/1/versions/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"
    ]
  },
  "publication": {
    "production": {
      "versionId": 7,
      "version": 3,
      "publishedAt": "2026-10-26T09:30:00Z"
    },
    "staging": {
      "versionId": 7,
      "version": 3,
      "publishedAt": "2026-10-26T09:30:00Z"
    }
  }
}