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
| Parameter | Type | Description |
|---|---|---|
id | string | Workflow 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
| Field | Type | Description |
|---|---|---|
id | string | Workflow UUID |
campaign_name | string | Workflow name |
status | string | PENDING, PROCESSING, COMPLETED, FAILED |
duration_seconds | number | Total execution time in seconds |
workflow_executions_count | number | Number of workflow step executions |
channels | object | Per-channel statistics |
totals | object | Aggregated statistics across all channels |
progress | object | Current 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
| Field | Description |
|---|---|
execution_count | Number of email workflow steps executed |
total_contacts | Total email recipients |
sent | Successfully sent emails |
failed | Failed sends |
success_rate | Percentage successfully sent |
SMS Channel
| Field | Description |
|---|---|
execution_count | Number of SMS workflow steps executed |
total_contacts | Total SMS recipients |
sent | Successfully sent SMS |
failed | Failed sends |
success_rate | Percentage successfully sent |
estimated_cost | Total cost in USD |
WhatsApp Channel
| Field | Description |
|---|---|
execution_count | Number of WhatsApp workflow steps executed |
total_contacts | Total WhatsApp recipients |
sent | Successfully sent messages |
delivered | Delivered to recipient's device |
read | Read by recipient |
failed | Failed sends |
delivery_rate | Percentage delivered |
read_rate | Percentage read (of delivered) |
estimated_cost | Total cost in USD |
Error Responses
| Status Code | Error | Solution |
|---|---|---|
| 404 | Workflow not found | Check workflow ID is correct |
| 401 | Unauthorized | Verify API key |
Next Steps
- List Workflows - Browse all workflows
- Trigger Workflow - Execute a workflow
- Workflows Overview - Learn core concepts