API Reference
Automations
Create, update, toggle, test, and inspect automation workflows.
POST /api/v1/automations
Create an automation.
Request
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable name |
trigger | string | Yes | message_received or message_sent |
conditions | object[] | No | Filter rules (see below) |
actions | object[] | Yes | Actions to execute (see below) |
enabled | boolean | No | Default true |
Condition object
| Field | Type | Description |
|---|---|---|
field | string | body, from, to |
operator | string | contains, equals, starts_with, ends_with, matches_regex, is_in |
value | string | Value to match against |
Combine with "logic": "and" or "logic": "or".
Action object
| Field | Type | Description |
|---|---|---|
type | string | send_reply, create_contact, call_webhook, log_to_crm |
config | object | Type-specific configuration |
send_reply config: { "body": "reply text" }
call_webhook config: { "url": "https://..." }
Response 201
The created automation object.
GET /api/v1/automations
List automations.
GET /api/v1/automations/:id
Get automation details and recent execution history.
PUT /api/v1/automations/:id
Update an automation. Full replacement — include all fields.
DELETE /api/v1/automations/:id
Delete an automation and its execution history.
PATCH /api/v1/automations/:id/toggle
Toggle enabled/disabled state.
POST /api/v1/automations/:id/test
Dry-run the automation with sample data.
Request
| Field | Type | Required | Description |
|---|---|---|---|
message | object | Yes | Sample message with from, body, etc. |
Response 200
{
"matched": true,
"conditionsEvaluated": [
{ "field": "body", "operator": "contains", "value": "appointment", "matched": true }
],
"actionsWouldExecute": ["send_reply", "call_webhook"]
}GET /api/v1/automations/:id/executions
Paginated list of past execution logs.