Edit a workflow draft
Change the draft with a list of `ops`: add, update, move or delete nodes, and connect or disconnect them. The ops apply all together or not at all. You must send the `revision` from your last read. If you get `409 revision_conflict`, read the workflow again and retry. Secrets read back as `********`. Send them back unchanged to keep the stored value. This edits the draft only. Use `publishWorkflow` to make it live.
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.
The draft.revision from your last getWorkflow or edit.
Rename the workflow.
curl -X PATCH 'https://backend.omnidim.io/api/v1/workflows/{workflow_id}' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{}'
{ "revision": "string", "issues": { "errors": [ { "code": "string", "message": "string", "node": "string", "field": "string", "hint": "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.
application/jsonrevision*stringThe draft.revision from your last getWorkflow or edit.
ops*name?stringRename the workflow.
Response body
application/jsonThe ops were applied.
application/jsonrevision?stringThe new revision. Use it for your next edit.
issues?What validation found. Errors block publish. Warnings do not.
Get a workflow
One workflow with its draft, status and `revision`. Call it before every edit to get the current `revision`. Use `view=structure` to see nodes and edges without config on a large workflow. Secrets read back as `********`.
Delete a workflow
Delete a workflow. Its published version stops running. This cannot be undone, so confirm with the user first. To stop it without deleting, use `deactivateWorkflow`.
