Publish a workflow
Make the draft the live version. Real events then run it, unless the workflow is paused. Run `validateWorkflow` first: publish is refused while the draft has errors. Ask the user before you publish.
Workflow builder. Included from the Jump Starter plan. See plans.
workflow_idrequireduser_idintegerReseller keys only: the id of one of your direct client users. The call then acts as that client, on that client's agents, numbers, campaigns and balance. Calls, sessions and bulk campaigns spend that client's balance and concurrency. Omit it to act on your own account. An empty value, 0, false or your own user id also means your own account. Any other value that is not a positive integer id is refused with 400 invalid_request. A key that is not a reseller's gets 403 when it names someone else. A user who is not your direct client gets 404.
curl -X POST 'https://backend.omnidim.io/api/v1/workflows/{workflow_id}/publish' \ -H 'Authorization: Bearer YOUR_API_KEY'
{ "workflow": { "id": 0, "name": "string", "status": "draft", "published_version_id": 0, "webhook_url": "string", "draft": { "version_id": 0, "revision": "string", "nodes": [ { "id": "string", "type": "string", "label": "string", "position": { "x": 0, "y": 0 }, "config": "string" } ], "edges": [ { "from": "string", "to": "string", "handle": "string" } ] } }, "warnings": [ { "code": "string", "message": "string", "node": "string", "field": "string", "hint": "string" } ] }
BearerAuthAuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
workflow_id*integerId of the workflow.
user_id?integerReseller keys only: the id of one of your direct client users. The
call then acts as that client, on that client's agents, numbers,
campaigns and balance. Calls, sessions and bulk campaigns spend that
client's balance and concurrency. Omit it to act on your own account.
An empty value, 0, false or your own user id also means your own
account. Any other value that is not a positive integer id is
refused with 400 invalid_request. A key that is not a reseller's
gets 403 when it names someone else. A user who is not your
direct client gets 404.
Response body
application/jsonThe draft is now live.
application/jsonworkflow?warnings?Validate a workflow draft
Check the draft and list what blocks publish. It changes nothing. Call it after your edits and fix every error before `publishWorkflow`.
Activate a workflow
Turn the published workflow on, so real events run it. Use it to resume a workflow you paused with `deactivateWorkflow`.
