Skip to content

bots.restoreVersion

Copy an older version into the draft.

Reference

POST/api/v1/workflows/{workflow_id}/versions/{version_id}/restore

Auth
API key in X-API-Key
Content
none
Returns
200 · WorkflowVersionResponse

Copy an older version into the draft, so a bad publish has an undo. Nothing goes live here. The chosen version's graph, configuration and variables become the draft (created, or overwritten if one exists), and the ordinary Publish gate decides whether it reaches a call. The version restored from is untouched, so restoring is itself restorable.

Arguments

ArgumentInTypeRequiredDescription
workflow_idpathintegerrequired
version_idpathintegerrequired

Example request

curl -X POST "https://api.decibyl.ai/api/v1/workflows/<workflow_id>/versions/<version_id>/restore" \
  -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

StatusWhen
404Not found
422Validation Error