Trigger Workflows
Run an existing workflow for one customer or a batch.
Prepare a Workflow
Create and configure your workflow in the Smobi dashboard, then obtain its definition ID from the workflow's integration information. Define the variables it expects and test the flow with a phone you control before using customer data.
The public API executes existing workflows. It does not expose workflow authoring endpoints.
Execute for One Recipient
curl --request POST \
'https://api.smobi.com/v1/workflows/YOUR_WORKFLOW_DEFINITION_ID/execute/15552223333' \
--header "x-api-key: $SMOBI_API_KEY" \
--header 'Content-Type: application/json' \
--data '{ "variables": { "customerName": "Alex", "orderId": "12345" } }'Use variable names that match your workflow, with string values. Send {} when it needs no variables. Save the execution response for tracking; an accepted execution does not mean every step has completed.
Follow the Current Workflow Version
Use POST /v1/workflows/family/{workflowFamilyId}/execute/{phoneNumber} when your integration should execute the family's current version. Use the definition endpoint when you want to target a specific definition. The family must have a current version configured.
Execute a Batch
POST /v1/workflows/{workflowDefinitionId}/execute accepts an executions array:
{
"executions": [
{
"phoneNumber": "15552223333",
"variables": { "customerName": "Alex" }
},
{
"phoneNumber": "15554445555",
"variables": { "customerName": "Sam" }
}
]
}Each batch must contain 1–25 executions. Repeating the same phone-number string in one batch rejects the request. Batch routing is selected by the server; supplied settings values do not override it. Use the single-recipient endpoint with settings.channelOverride when you need a supported channel override. Split larger inputs into smaller batches. A 202 response indicates acceptance for processing. Do not assume a retry is deduplicated: avoid resubmitting a batch whose outcome is uncertain.
See the workflow API reference for request schemas, settings, and error responses.