Contacts::RunWorkflowAction
Create Run Workflow Action
Run a workflow against a collection of contacts. Requires workflow_id. Set force_run: true to re-enqueue contacts already in the workflow. The action runs asynchronously — poll the returned record with GET /api/v2/contacts/run_workflow_actions/{id} to track progress via target_count and performed_count. Exactly one target selection must be supplied: stable_id, stored_filter_id (alias filter_id), target_ids, or target_all. Returns 422 if none is provided or if the supplied value is invalid.
post/workspaces/{workspace_id}/contacts/run_workflow_actions
Path parameters
workspace_idinteger required
Request body
Example request
{
"contacts_run_workflow_action": {
"contacts_run_workflow_action": {
"workflow_id": "Wf1aB2",
"stored_filter_id": "7"
}
}
}Response
Created
Example response
{
"id": 1,
"public_id": "bC4dE5",
"workspace_id": 42000,
"workflow_id": 99,
"force_run": false,
"filter_id": 7,
"target_all": false,
"target_ids": [],
"target_count": 500,
"performed_count": 100,
"created_by_id": 5,
"approved_by_id": null,
"scheduled_for": null,
"started_at": "2025-01-01T00:01:00.000Z",
"completed_at": null,
"created_at": "2025-01-01T00:00:00.000Z",
"updated_at": "2025-01-01T00:01:00.000Z"
}