---
title: "Replace a Spec's draft"
method: PUT
path: "/v1/specs/{id}/draft"
tags: ["Specs"]
---

# Replace a Spec's draft

`PUT /v1/specs/{id}/draft`

## Request

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

Replaces the whole draft document. `revision` must be the draft's
current revision; if someone saved in between you get a 409 and
nothing changes, so read the draft again and re-apply your edit.

Keep each field's `field_id` when you edit a field: ground truth, rules
and other references point at it. A write that replaces most fields
with new ids is refused (422) unless `allow_field_reset` is true.
A document with a setting this workspace may not choose is a 403.
Requires `specs:write`.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `doc` object, required
  - `revision` integer, required
  - `allow_field_reset` boolean

## Response `200`

Saved.

- object
  - `spec_id` string, uuid
  - `revision` integer
  - `updated_at` string, date-time
  - `field_adoptions` object: Fields matched to existing workspace fields, field id to workspace field.

## Other responses

- `400`: The request is invalid.
- `401`: Missing or invalid API key.
- `403`: The API key does not have the required scope.
- `404`: The requested resource was not found.
- `409`: The request conflicts with the current resource state.
- `422`: The edit would replace most fields; send `allow_field_reset` to confirm.

## Changes

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

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/specs/:id/draft/put.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)
