Execute a workflow transition
Moves a document to a new workflow state. Policy gates are enforced automatically.
POST
/api/v1/documents/:id/workflow/transitionAuthorization
workflow:writeapi key scoperequiredRequired scope when calling with an API key.
document:workflow_writesession capabilityoptionalRequired capability when calling with a signed-in session.
Path parameters
idstringrequiredDocument ID
Example: doc_abc123
Request body
tostringrequired"in_review" | "approved" | "frozen" | "signed" | "archived" | "draft"Target workflow state
reasonstringoptionalOptional reason for the transition
Example request
{
"to": "in_review",
"reason": "Ready for review"
}Request
curl -X POST "https://www.digitalstack360.com/api/v1/documents/doc_abc123/workflow/transition" \
-H "Authorization: Bearer $DS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"in_review","reason":"Ready for review"}'Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.
Response
200 OK
{
"data": {
"state": "in_review",
"available_transitions": [
"approved",
"draft"
],
"updated_at": "2026-05-12T10:30:00.000Z"
}
}Errors
401
missing_authNo credentials provided
401
invalid_api_keyAPI key is invalid or revoked
400
bad_requestMissing or invalid request fields
403
scope_insufficientKey lacks the required write scope
404
not_foundDocument not found
409
workflow_gate_failedPolicy gate blocked the transition
409
workflow_transition_invalidTransition not valid from current state