Skip to main content
POST
Publish a procedure version

Authorizations

Authorization
string
header
required

Effective API key. Send Authorization: Bearer sk-eai-...

Headers

Idempotency-Key
string
required

Client-chosen key for safe retries: 1-128 letters, digits, -, _, . or :. Use a new random UUID for each intended operation and the same key when retrying it. Do not put customer data or credentials in the key.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9\-_.:]+$

Body

application/json
source
string
required

The procedure’s root document: its YAML or Markdown source.

Required string length: 1 - 1048576
sourceName
string
required

The root document’s file name, such as intake.procedure.yaml.

Required string length: 1 - 512
fragments
object

Fragment documents the root includes, by path. At most 128.

documents
object

Other documents the source reads, by path. At most 128.

tests
object[]

Authoring tests kept beside the version. They do not run on publish.

Required array length: 1 - 256 elements
expectedLatestVersion
integer | null

Optional precondition. null requires that the procedure does not exist yet; a number requires that it is the latest version. Otherwise the publish is refused with version_conflict.

Required range: 0 < x <= 9007199254740991
access
enum<string>

Who may run a new procedure. organization lets every member run it; omitted, only its owner can until access is granted. Ignored when the procedure already exists.

Available options:
organization

Response

A retry: the version this request published before.

procedureId
string
required

Stable procedure identifier

Maximum string length: 256
Pattern: ^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*$
version
integer
required

Immutable positive procedure version

Required range: 0 < x <= 9007199254740991
outcome
enum<string>
required

already_published when this Idempotency-Key and request were accepted before: the version that request published.

Available options:
published,
already_published
created
boolean
required

True when this publish created the procedure.

live
object | null
required

What the publish did to the live version. Null on a retry.

diagnostics
object[]
required

Compiler warnings.