# Authoring

Design, draft and commit WorkStreams, the repeatable multi-step jobs Archie runs.

## Operations

POST [Draft a New Workstream Conversationally](https://heyarchie.com/en-gb/developers/api-reference/authoring/draft-a-new-workstream-conversationally/)

This is the older name for workstream_draft (public name workstream.draft), kept so existing integrations keep working. It needs a description of the workflow in plain language, and can anchor the draft to a Topic or iterate on a prior draft. It returns a draft id, a name, a step count and a warning count for the workstream it drafted.

POST [Promote a Workstream Draft](https://heyarchie.com/en-gb/developers/api-reference/authoring/promote-a-workstream-draft/)

Promotes a draft to an active workstream. Supply the `draft_id` of a draft that passes validation, and the reply gives the `workstream_id`, the `permakey` and the `status`. If validation fails the commit is refused and the draft stays a draft.

POST [Specify a WorkStream Before Drafting Its Steps](https://heyarchie.com/en-gb/developers/api-reference/authoring/specify-a-workstream-before-drafting-its-steps/)

Starts the design interview for a workstream from the `description` input and returns its spec: each decision with its question, the builder's proposal, its reason, its citation and its status, plus the `spec_hash` and the next question to answer. The spec is stored so workstream.spec can read it back and workstream.spec.answer can settle open decisions. It creates no steps and no workstream.

POST [Draft a New Workstream Conversationally](https://heyarchie.com/en-gb/developers/api-reference/authoring/draft-a-new-workstream-conversationally-post/)

Describe the workstream you want in the `description` input and Archie drafts a structured, reviewable definition with typed steps, dependencies and validation. The reply gives the draft id, name, step count, validation warning count and version, or the one question to answer next. Drafting never activates a workstream; workstream.commit does that.

POST [Answer One Open Decision on a WorkStream Spec](https://heyarchie.com/en-gb/developers/api-reference/authoring/answer-one-open-decision-on-a-workstream-spec/)

Records the answer to one open decision on a workstream spec. Supply the `workstream_id`, the `decision_id` and your `answer`, and add `provenance` to note where the answer came from. The reply carries the new version holding the answer; the earlier version is left unchanged.

POST [Read a Stored WorkStream Spec](https://heyarchie.com/en-gb/developers/api-reference/authoring/read-a-stored-workstream-spec/)

Reads the stored spec of one workstream, named by the `workstream_id` input. It returns the latest version unless you set `version`, together with the decisions, the `spec_hash` and the `definition_hash`. This call only reads and changes nothing.

Endpoints

[POST /api/v1/skills/playbook.creator/invoke](https://heyarchie.com/en-gb/developers/api-reference/authoring/draft-a-new-workstream-conversationally/)[POST /api/v1/skills/workstream.commit/invoke](https://heyarchie.com/en-gb/developers/api-reference/authoring/promote-a-workstream-draft/)[POST /api/v1/skills/workstream.design/invoke](https://heyarchie.com/en-gb/developers/api-reference/authoring/specify-a-workstream-before-drafting-its-steps/)[POST /api/v1/skills/workstream.draft/invoke](https://heyarchie.com/en-gb/developers/api-reference/authoring/draft-a-new-workstream-conversationally-post/)[POST /api/v1/skills/workstream.spec.answer/invoke](https://heyarchie.com/en-gb/developers/api-reference/authoring/answer-one-open-decision-on-a-workstream-spec/)[POST /api/v1/skills/workstream.spec/invoke](https://heyarchie.com/en-gb/developers/api-reference/authoring/read-a-stored-workstream-spec/)
