Create Workflow
Creates a new Workflow in the specified sub-account.
https://api.vantaxai.com/v1/workflowsA Workflow pairs a single `trigger` with an ordered list of `steps`. When the trigger event fires, each step runs in sequence — the `next` field on a step points to the id of the step that runs after it (use `null` to end the chain). Set `is_active` to `false` to create the Workflow in a draft state without arming the trigger.
Headers
AuthorizationstringrequiredBearer authentication with your secret API key.
example: Bearer vx_live_3fa9c2…
Content-TypestringrequiredMust be application/json for requests with a body.
example: application/json
Body Parameters
namestringrequiredDisplay name of the Workflow.
example: New Lead Follow-up
sub_account_idstringrequiredSub-account that will own the Workflow.
example: sub_8a1f4c2e
triggerobjectrequiredThe event that starts the Workflow. An object with a `type` (see Workflow Triggers) and a `config` of trigger-specific filters.
trigger.typestringrequiredThe trigger event type.
contact.createdappointment.createdmessage.receivedcall.completedcustom.eventexample: contact.created
trigger.configobjectrequiredFilters scoping when the trigger fires (e.g. `{ "source": "website" }`).
stepsarrayrequiredOrdered list of step objects. Each step has an `id`, a `type`, a `config`, and a `next` (the id of the following step, or `null`).
steps[].idstringrequiredUnique id for the step within the Workflow.
example: step_send_sms
steps[].typestringrequiredThe action the step performs.
send_smssend_emailadd_tagremove_tagcreate_appointmentstart_callwaithttp_requestexample: send_sms
steps[].configobjectrequiredAction-specific configuration for the step.
steps[].nextstringoptionalId of the next step to run, or `null` to end the Workflow.
descriptionstringoptionalInternal description of what the Workflow does.
is_activebooleanoptionalWhether the trigger is armed. Defaults to true.