Talk with Archie
API reference › Authoring
Skills › Authoring

Draft a New Workstream Conversationally

POST/api/v1/skills/playbook.creator/invoke
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.
Body parameters
descriptionstringRequired
Natural-language description of the workflow to draft.
topic_idstring
Topic to anchor the draft to — permakey (preferred) or UUID.
prior_draft_idstring · uuid
Optional prior draft to iterate on instead of creating a new one.
Returns

Skill executed successfully

skillstringRequired
Example playbook_creator
outputobjectRequired
Output from the workstream drafting skill — pointer to the draft + summary.

draft_id is None when the request couldn't produce a draft (missing workspace / topic / generation failure); in that case error carries a one-line reason. Successful invocations always set draft_id.

output.stub_fieldsarray of strings
output.warningsarray of strings
output.draft_idstring · uuid
output.namestring · default
output.step_countinteger · default 0
output.validation_warning_countinteger · default 0
output.errorstring
correlation_idstringRequired
Errors
StatusTypeWhen
401AUTH.TOKEN_INVALIDAuthentication required
403PERMISSION.CAPABILITY_DENIEDInsufficient permissions
404SKILL.NOT_FOUNDSkill not found
422VALIDATION.INVALID_FORMATValidation error
429RATE_LIMIT.USERRate limit exceeded
5XXINTERNAL.UNKNOWNInternal server error
curl https://uk.heyarchie.com/api/v1/skills/playbook.creator/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "description": "string",
       "topic_id": null,
       "prior_draft_id": null
     }'
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "playbook.creator",
    description="string",
    topic_id=None,
    prior_draft_id=None,
)
print(result)
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("playbook.creator", {
  "description": "string",
  "topic_id": null,
  "prior_draft_id": null
});
console.log(result);
Response
{
  "skill": "playbook_creator",
  "output": {
    "draft_id": "e4c1a7b3-5d92-4b08-8f16-2a9d3c6e0f71",
    "error": null,
    "name": "Month-end invoice reminders",
    "step_count": 4,
    "stub_fields": [],
    "validation_warning_count": 0,
    "warnings": []
  },
  "correlation_id": "<string>"
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}

Every response also carries X-Request-ID. Quote it if you write to us about a call.