bots.createDraft
Start a draft from what is live.
Reference
POST/api/v1/workflows/{workflow_id}/create-draft
- Auth
- API key in
X-API-Key - Content
- none
- Returns
- 200 · WorkflowVersionResponse
Create a draft version from the current published version. If a draft already exists, returns the existing draft.
Arguments
| Argument | In | Type | Required | Description |
|---|---|---|---|---|
workflow_id | path | integer | required |
Example request
curl -X POST "https://api.decibyl.ai/api/v1/workflows/<workflow_id>/create-draft" \
-H "X-API-Key: dcb_your_key"Response
{
"id": 1,
"version_number": 1,
"status": "string",
"created_at": "2026-09-14T09:30:00Z",
"published_at": "2026-09-14T09:30:00Z",
"workflow_json": {},
"workflow_configurations": {},
"template_context_variables": {}
}Errors
| Status | When |
|---|---|
404 | Not found |
422 | Validation Error |