Skip to main content
POST
Publish the working draft as an immutable StructVersion
Snapshots the draft into an immutable version and makes it available to batches and Apply schema. 422 if the draft violates a hard contract (field id, field cap for the mode, table with no columns). An API key cannot satisfy the role gate on publish — call this as a signed-in user.

Authorizations

Authorization
string
header
required

Organisation API key from Settings → API / /api/keys/. The secret is shown once. Send Authorization: Bearer sk-abacus-…. One active key per organisation. Ingest (/api/v2/ingest/*) refuses API keys — that surface is Auth0-only with ingest:read / ingest:write scopes.

Path Parameters

slug
string
required

Body

application/json

Body for POST /structs/{slug}/publish/.

publish_note
string
Maximum string length: 500

Response

Detail shape for a single StructVersion — adds full JSON bodies.

version_number
integer
required
Required range: 0 <= x <= 2147483647
published_at
string<date-time>
required
read-only
published_by
object | null
required

Compact projection of the user who published / deprecated a version.

field_count
integer
required
read-only
is_deprecated
boolean
required
read-only
deprecated_by
object | null
required

Compact projection of the user who published / deprecated a version.

schema_json
any
required
annotations_json
any
required
publish_note
string
Maximum string length: 500
deprecated_at
string<date-time> | null
deprecation_note
string
Maximum string length: 500