# 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…

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

description string Required

Natural-language description of the workflow to draft.

topic_id string

Topic to anchor the draft to — permakey (preferred) or UUID.

prior_draft_id string · uuid

Optional prior draft to iterate on instead of creating a new one.

Returns

Skill executed successfully

skill string Required

Example playbook_creator

output object Required

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_fields array of strings

output.warnings array of strings

output.draft_id string · uuid

output.name string · default

output.step_count integer · default 0

output.validation_warning_count integer · default 0

output.error string

correlation_id string Required

Errors

Status Type When

401 AUTH.TOKEN_INVALID Authentication required

403 PERMISSION.CAPABILITY_DENIED Insufficient permissions

404 SKILL.NOT_FOUND Skill not found

422 VALIDATION.INVALID_FORMAT Validation error

429 RATE_LIMIT.USER Rate limit exceeded

5XX INTERNAL.UNKNOWN Internal server error

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

```
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>"
  }
}
```

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