/v1/workflows/{id}/publishPublish a workflow — it goes live
TAKES EFFECT IMMEDIATELY: freezes the current draft as a new immutable version and makes the rule live, stamped with the publisher's account — whose seat every run then acts with, and never more than it. It validates first, with the same code post_workflows_validate runs, and answers 422 "this workflow cannot run yet" with the problems rather than publishing something broken. To CHECK a definition without going live, call validate; to fire a published one by hand, post_workflows_id_run.
Access class: workspace:admin.
Send request
Use the documented inputs to call this endpoint directly.
Parameters
Values are applied to the request and the example on the right.
Request body
application/jsonrequiredResponses
the action's answer
{
"data": {
"version": {
"createdAt": "string",
"definition": "string",
"id": 1,
"publishedByUserId": 1,
"rolledBackFrom": 1,
"runAsAccountId": "",
"version": 1,
"workflowId": 1
},
"workflow": {
"createdAt": "string",
"createdByUserId": 1,
"definition": "string",
"description": "string",
"id": 1,
"key": "string",
"name": "string",
"publishedAt": "string",
"runAsAccountId": "",
"status": "string",
"updatedAt": "string",
"version": 1
}
}
}a refusal: {"error": "<what a person needs to read>"}. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.
{
"error": "string"
}