List Workflows
Retrieve all workflows with optional filtering and pagination.
Endpoint
GET /api/v1/workflows
Headers
X-API-Key: sk_live_your_api_key
Query Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
page | number | Page number (default: 1) | ?page=2 |
limit | number | Items per page (default: 20, max: 100) | ?limit=50 |
event_type | string | Filter by event type name | ?event_type=new_user |
is_active | boolean | Filter by active status | ?is_active=true |
search | string | Search in workflow name and description | ?search=welcome |
Response Structure
{
"workflows": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Welcome Series",
"description": "Onboarding emails for new users",
"event_type": "new_user",
"is_active": true,
"created_at": "2024-10-15T08:30:00.000Z",
"updated_at": "2024-11-01T12:00:00.000Z",
"steps": [
{
"id": "step-1",
"step_order": 1,
"channel_type": "email",
"step_name": "Welcome Email",
"is_active": true,
"configuration": {
"template_id": "welcome-template",
"delay_minutes": 0
}
},
{
"id": "step-2",
"step_order": 2,
"channel_type": "sms",
"step_name": "Day 1 SMS",
"is_active": true,
"configuration": {
"template_id": "day1-sms",
"delay_minutes": 1440
}
}
]
}
],
"total": 15,
"page": 1,
"totalPages": 1,
"limit": 20
}
Example Requests
List All Workflows
curl -X GET "https://api.sendmator.com/api/v1/workflows" \
-H "X-API-Key: sk_live_your_api_key"
Search Workflows
curl -X GET "https://api.sendmator.com/api/v1/workflows?search=welcome" \
-H "X-API-Key: sk_live_your_api_key"
Filter Active Workflows
curl -X GET "https://api.sendmator.com/api/v1/workflows?is_active=true" \
-H "X-API-Key: sk_live_your_api_key"
Pagination
curl -X GET "https://api.sendmator.com/api/v1/workflows?page=2&limit=50" \
-H "X-API-Key: sk_live_your_api_key"
Workflow Object Fields
| Field | Type | Description |
|---|---|---|
id | string | Workflow UUID |
name | string | Workflow name |
description | string | Workflow description |
event_type | string | Triggering event type |
is_active | boolean | Whether workflow is active |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
steps | array | Array of workflow steps |
Workflow Step Fields
| Field | Type | Description |
|---|---|---|
id | string | Step UUID |
step_order | number | Execution order (1, 2, 3...) |
channel_type | string | email, sms, or whatsapp |
step_name | string | Human-readable step name |
is_active | boolean | Whether step is enabled |
configuration | object | Step configuration (template, delay, variables) |
Use Cases
1. Browse Available Workflows
GET /api/v1/workflows
See all workflows available for triggering.
2. Find Workflow by Name
GET /api/v1/workflows?search=Welcome
Search for workflows containing "Welcome" in name or description.
3. Get Active Workflows Only
GET /api/v1/workflows?is_active=true
Filter out disabled/draft workflows.
4. Paginate Large Lists
GET /api/v1/workflows?page=1&limit=10
Load workflows in batches for better performance.
Error Responses
| Status Code | Error | Solution |
|---|---|---|
| 401 | Unauthorized | Verify API key |
| 400 | Invalid query parameters | Check parameter format |
Next Steps
- Get Workflow Details - View specific workflow stats
- Trigger Workflow - Execute a workflow
- Workflows Overview - Learn core concepts