---
title: "Create a Spec"
method: POST
path: "/v1/specs"
tags: ["Specs"]
---

# Create a Spec

`POST /v1/specs`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/specs`
- Auth: HTTP bearer

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`.

## Request body

- object
  - `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 `201`

The new Spec with its draft.

- SpecDraft
  - `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

## Other responses

- `400`: The request is invalid.
- `401`: Missing or invalid API key.
- `403`: The API key does not have the required scope.

## Changes

- **2026-11-26** `622d429de7ea`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/specs/post.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
