Flows
Flows are execution instances of campaigns that send messages to multiple contacts. They handle rate limiting, retries, error tracking, and provide real-time statistics.Create Flow
POST /flows
Creates a new flow associated with a campaign and queues it for execution.
Request Body
string
required
Channel UID to use for sending messages
string
required
Campaign UID to use for this flow
array
required
Array of contact UIDs (identity UIDs) to send messages to
string
Flow description
object
Response
Returns a FlowResponseDTO with flow details including status, configuration, and metadata.List Flows
GET /flows
Retrieves a paginated list of flows with filtering options.
Query Parameters
string
Filter flows by associated contact/identity
string
Filter flows by channel
string
Filter by status:
draft, queued, running, paused, completed, partial_completed, cancelled, failed, error, timeoutstring
Cursor for pagination
number
Maximum results (default: 20, max: 100)
Get Flow
GET /flows/{uid}
Retrieves detailed information about a specific flow, including execution status, statistics, and metadata.
Flow unique identifier (UUID)
Response
Success message
Update Flow
PATCH /flows/{uid}
Updates an existing flow. Status transitions must be valid.
Flow unique identifier (UUID)
Request Body
string
New status:
draft, queued, running, paused, completed, partial_completed, cancelled, failed, error, timeoutstring
Updated description
Delete Flow
DELETE /flows/{uid}
Deletes a flow. Active flows (RUNNING, QUEUED) cannot be deleted.
Flow unique identifier (UUID)
Flow Status
Flows progress through these statuses:draft- Created but not startedqueued- Ready to executerunning- Currently executingpaused- Temporarily pausedcompleted- Successfully finishedpartial_completed- Finished with some failurescancelled- Manually cancelledfailed- Execution failederror- Error occurredtimeout- Execution timeout
Flow Configuration
Rate Limiting
pauseBetweenContactsMs- Base delay between messages (e.g., 5000ms = 5 seconds)pauseBetweenContactsSaltMs- Random variation (e.g., 1000ms = ±1 second random)- Actual pause =
pauseBetweenContactsMs± random(0 topauseBetweenContactsSaltMs)
Concurrency
maxConcurrentMessages- How many messages send simultaneously (1-10)- Lower = slower but safer
- Higher = faster but may hit rate limits
Retries
maxRetries- Maximum retry attempts per messageretryDelayMs- Delay before retrying failed messages
Timeout
timeoutMs- Maximum time to wait for message delivery (5-10 minutes recommended)
Examples
Create Flow
Get Flow Status
Pause Flow
Resume Flow
Monitoring Flows
Monitor flow execution in real-time:- Get Flow - Check current status and statistics
- List Flows - Filter by status to see all running/paused flows
- Metadata - Review errors and failure reasons
- Stats - Track delivery rates and performance
