Skip to main content

Workflows

Workflows let you orchestrate actions and call flows for your organization.

Authentication & scope

  • Header: X-API-Key: YOUR_API_KEY
  • Read operations: workflows:read
  • Write operations: workflows:write
  • Use API Reference for Try-it on every workflow endpoint.

POST /v1/workflows

Creates a workflow. Body is DTO-accurate to CreateWorkflowDto.

201 Created

Request body fields

All fields besides title are optional. Each module object attaches (and enables) that step in the workflow. Modules run in this order during execution: agent (call) → emailsmscalendar.
Email and calendar modules require an active integration of the matching provider and type (EMAIL / CALENDAR) connected for your organization via POST /integrations/oauth/{provider}/email/initiate or .../calendar/initiate. If the integration’s OAuth token can’t be refreshed (e.g. the connection was revoked), the module is skipped and the failure reason is recorded on the workflow run instead of stopping the whole workflow.

Common status codes

  • 201 created
  • 400 validation error
  • 403 missing workflows:write
  • 500 server error

POST /v1/workflows/{id}/run

Triggers immediate workflow execution.

201 Created

Common status codes

  • 201 execution started
  • 403 missing workflows:write
  • 404 workflow not found
  • 500 server error

GET /v1/workflows/jobs/{jobId}

Returns scheduler job status.

Common status codes

  • 200 success
  • 403 missing workflows:read
  • 404 job not found
  • 500 server error

POST /v1/workflows/schedule

Schedules workflow execution. Body is DTO-accurate to ScheduleWorkflowDto.

Common status codes

  • 201 scheduled
  • 400 validation error
  • 403 missing workflows:write
  • 500 server error

GET /v1/workflows

Returns paginated workflows for the organization. Requires workflows:read.

200 OK

Common status codes

  • 200 success
  • 403 missing workflows:read
  • 500 server error

GET /v1/workflows/{id}

Returns workflow details, including the attached module configuration (CRM, agent, email, SMS, webhook, report, calendar, end call). Requires workflows:read.

200 OK

Common status codes

  • 200 success
  • 403 missing workflows:read
  • 404 workflow not found
  • 500 server error

PATCH /v1/workflows/{id}

Updates workflow metadata, structure, and enabled state. Body is DTO-accurate to UpdateWorkFlowDto; all fields are required and fully replace the existing values. Requires workflows:write.

200 OK

Common status codes

  • 200 updated
  • 400 validation error
  • 403 missing workflows:write
  • 404 workflow not found
  • 500 server error

DELETE /v1/workflows/{id}

Deletes a workflow and its associated modules (CRM, agent, email, SMS, webhook, report, calendar, end call). This is irreversible. Requires workflows:write.

200 OK

Common status codes

  • 200 deleted
  • 403 missing workflows:write
  • 404 workflow not found
  • 500 server error

POST /v1/workflows/{id}/cancel

Cancels a queued, waiting, or active workflow run by removing its pending jobs from the queue. Requires workflows:write.

200 OK

Common status codes

  • 200 canceled
  • 403 missing workflows:write
  • 404 workflow not found
  • 500 server error

GET /v1/workflows/{id}/jobs

Returns all scheduler jobs (completed, active, waiting, failed, paused, delayed) linked to a workflow, with an aggregate count per state. Requires workflows:read.

200 OK

Common status codes

  • 200 success
  • 403 missing workflows:read
  • 500 server error

GET /v1/workflows/{id}/summary

Returns a high-level execution summary (total contacts processed, completed, failed) for the workflow. Requires workflows:read.

200 OK

Common status codes

  • 200 success
  • 403 missing workflows:read
  • 404 workflow not found
  • 500 server error

GET /v1/workflows/{id}/summary/report

Returns a detailed per-contact report for every run of the workflow, including call, email, SMS, and calendar module outcomes. Requires workflows:read.

200 OK

Common status codes

  • 200 success
  • 403 missing workflows:read
  • 404 workflow not found
  • 500 server error

GET /v1/workflows/{id}/summary/timeline

Returns a chronological list of execution events (started, module executed, contact completed, etc.) for the workflow. Requires workflows:read.

200 OK

Common status codes

  • 200 success
  • 403 missing workflows:read
  • 404 workflow not found
  • 500 server error
  1. Create workflow.
  2. Run once to validate behavior.
  3. Schedule if needed.
  4. Monitor jobs and summary endpoints.