Specs

Creates a Spec. With doc, the draft starts from that complete Spec document (checked like a draft edit: an invalid document is a 400 and no Spec is left half-made from it); without it the draft is empty. The Spec is not live until you publish it.

Requires specs:write. The person behind the credential must be allowed to edit Specs in the Spec editor of this workspace; when Spec changes are managed by Talonic for the workspace, the call is a 403 with reason: insufficient_role.

post/v1/specs

Request

  • Base URL
    https://api.talonic.com
  • Auth
    HTTP bearer

Request body

object required
name, string required
description, string
doc, object

A complete Spec document (format: 1), for example one read from GET /v1/specs/{id}/draft or GET /v1/specs/{id}/versions/{n}.

Response

The new Spec with its draft.

SpecDraft required
spec_id, string uuid
name, string
description, string nullable
schema_id, string uuid nullable

The schema the Spec runs on; null until first published.

revision, integer nullable

Send it back on PUT /v1/specs/{id}/draft.

updated_at, string date-time nullable
published_version, integer nullable
has_unpublished_changes, boolean
doc, object nullable

The full Spec document.

links, object

Changes