Operating system set to macOS
Documentation jurisdiction set to United States
Sign inConnect Claude

Invoke Skill Workstream Draft

post/api/v1/skills/workstream.draft/invoke

Draft a new workstream conversationally β€” describe what you want and Archie produces a structured, reviewable workstream definition with typed steps, dependencies, and validation. Produces unified drafts targeting either inline or containerized execution mode. The canonical drafting entry; the legacy `playbook.creator` slug is retained only for API back-compat.

Request bodyapplication/json

FieldTypeDescription
descriptionrequiredstringNatural-language description of the workstream to draft.
topic_idstring | nullTopic to anchor the draft to β€” permakey (preferred) or UUID.
prior_draft_idstring (uuid) | nullOptional prior draft to iterate on instead of creating a new one.
target_execution_mode"inline" | "containerized"Which execution mode the draft should target. Defaults to 'inline' for fast, declarative-step workflows; 'containerized' for longer-running agentic work that runs on a Fly.io machine (Studio-authored variants typically use this). The legacy labels 'container' and 'external' are accepted as input aliases and normalised to 'containerized'.
inlinecontainerized
idempotency_keystring | nullCaller-supplied stable token. Replaying within 24h returns the previously-created draft id rather than generating a duplicate.

Responses

200Skill executed successfully
FieldTypeDescription
skillrequiredstringβ€”
outputrequiredobjectPointer to the draft + summary of what got generated.
show nested
FieldTypeDescription
stub_fieldsstring[]β€”
warningsstring[]β€”
draft_idstring (uuid) | nullNewly-created draft id.
namestringWorking name the LLM gave the draft.
step_countintegerNumber of steps the LLM generated.
target_execution_mode"inline" | "containerized"Execution mode the draft was generated for.
inlinecontainerized
validation_warning_countintegerNumber of validation warnings on the draft. Non-zero is fine for drafts; commit will reject if any blocking warnings remain.
errorstring | nullβ€”
error_envelopeany | nullCanonical structured error. Populated on draft generation failure.
correlation_idrequiredstringβ€”
401Authentication required
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
403Insufficient permissions
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
404Skill not found
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
429Rate limit exceeded
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
5XXInternal server error
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
curl https://api.dev.arch.ie/api/v1/skills/workstream.draft/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "description": "string",
       "topic_id": null,
       "prior_draft_id": null,
       "target_execution_mode": "inline",
       "idempotency_key": null
     }'