Skip to main content

Get Workflow Details

Retrieve detailed information about a workflow including configuration, statistics, and performance metrics.

Endpoint

GET /api/v1/workflows/:id

Headers

X-API-Key: sk_live_your_api_key

Path Parameters

ParameterTypeDescription
idstringWorkflow UUID

Response Structure

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"campaign_name": "Welcome Series",
"trigger_type": "WORKFLOW",
"trigger_source": "DIRECT_API",
"status": "COMPLETED",
"created_at": "2024-11-01T10:00:00.000Z",
"started_at": "2024-11-01T10:00:05.000Z",
"completed_at": "2024-11-01T10:15:30.000Z",
"scheduled_at": null,
"duration_seconds": 925,
"workflow_executions_count": 3,
"channels": {
"email": {
"execution_count": 1,
"total_contacts": 1000,
"sent": 995,
"failed": 5,
"success_rate": 99.5
},
"sms": {
"execution_count": 1,
"total_contacts": 500,
"sent": 495,
"failed": 5,
"success_rate": 99.0,
"estimated_cost": 24.75
},
"whatsapp": {
"execution_count": 1,
"total_contacts": 300,
"sent": 295,
"delivered": 285,
"read": 250,
"failed": 5,
"delivery_rate": 96.61,
"read_rate": 87.72,
"estimated_cost": 8.85
}
},
"totals": {
"total_contacts": 1800,
"total_sent": 1785,
"total_failed": 15,
"overall_success_rate": 99.17,
"total_cost": 33.60,
"currency": "USD"
},
"progress": {
"processed": 1785,
"total": 1800,
"percentage": 99.17
}
}

Response Fields

FieldTypeDescription
idstringWorkflow UUID
campaign_namestringWorkflow name
statusstringPENDING, PROCESSING, COMPLETED, FAILED
duration_secondsnumberTotal execution time in seconds
workflow_executions_countnumberNumber of workflow step executions
channelsobjectPer-channel statistics
totalsobjectAggregated statistics across all channels
progressobjectCurrent progress information

Example Request

curl -X GET "https://api.sendmator.com/api/v1/workflows/550e8400-e29b-41d4-a716-446655440000" \
-H "X-API-Key: sk_live_your_api_key"

Use Cases

1. Monitor Campaign Performance

GET /api/v1/workflows/550e8400-e29b-41d4-a716-446655440000

Check delivery rates and engagement metrics after triggering.

2. Cost Tracking

Access totals.total_cost to monitor spending per workflow execution.

3. Debug Failed Workflows

Check status, channels[].failed, and error messages to troubleshoot issues.

Channel Statistics

Email Channel

FieldDescription
execution_countNumber of email workflow steps executed
total_contactsTotal email recipients
sentSuccessfully sent emails
failedFailed sends
success_ratePercentage successfully sent

SMS Channel

FieldDescription
execution_countNumber of SMS workflow steps executed
total_contactsTotal SMS recipients
sentSuccessfully sent SMS
failedFailed sends
success_ratePercentage successfully sent
estimated_costTotal cost in USD

WhatsApp Channel

FieldDescription
execution_countNumber of WhatsApp workflow steps executed
total_contactsTotal WhatsApp recipients
sentSuccessfully sent messages
deliveredDelivered to recipient's device
readRead by recipient
failedFailed sends
delivery_ratePercentage delivered
read_ratePercentage read (of delivered)
estimated_costTotal cost in USD

Error Responses

Status CodeErrorSolution
404Workflow not foundCheck workflow ID is correct
401UnauthorizedVerify API key

Next Steps