Skip to main content

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

ParameterTypeDescriptionExample
pagenumberPage number (default: 1)?page=2
limitnumberItems per page (default: 20, max: 100)?limit=50
event_typestringFilter by event type name?event_type=new_user
is_activebooleanFilter by active status?is_active=true
searchstringSearch 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

FieldTypeDescription
idstringWorkflow UUID
namestringWorkflow name
descriptionstringWorkflow description
event_typestringTriggering event type
is_activebooleanWhether workflow is active
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp
stepsarrayArray of workflow steps

Workflow Step Fields

FieldTypeDescription
idstringStep UUID
step_ordernumberExecution order (1, 2, 3...)
channel_typestringemail, sms, or whatsapp
step_namestringHuman-readable step name
is_activebooleanWhether step is enabled
configurationobjectStep 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 CodeErrorSolution
401UnauthorizedVerify API key
400Invalid query parametersCheck parameter format

Next Steps