This page documents the canonical HTTP contract for this endpoint.
Draft generation model
Drafts are generated just-in-time when requested, then persisted onto the task content payload. The task must be an AI-generated sequence task with a valid sequence step; this endpoint invokes AI generation and changes the stored task content.
Used for manual-capable sequence steps when aiDraft=true.
Path parameters
task_idrequiredstring
Task ID.
| Name | Type | Description |
|---|---|---|
| task_idrequired | string | Task ID. |
Query parameters
actorUserId· optionalstring
Optional actor override.
| Name | Type | Description |
|---|---|---|
| actorUserId | string | Optional actor override. |
Body parameters
force· optionalboolean
Force regeneration of existing draft content; defaults to false.
| Name | Type | Description |
|---|---|---|
| force | boolean | Force regeneration of existing draft content; defaults to false. |
Errors
| Status | Meaning |
|---|---|
| 400 | Invalid payload or actor. |
| 401 | Invalid API key or missing auth. |
| 403 | Missing tasks:write scope. |
| 404 | Task or sequence not found. |
| 409 | Draft generation is blocked by task orchestration state. |
