Marketing-automations API
Auto-generated from the OpenAPI spec. Run
node docs-site/scripts/fetch-openapi.jsto regenerate.
GET /api/v1/marketing-automations
List Automations
Responses
- 200 — Successful Response
POST /api/v1/marketing-automations
Create Automation
Request body
| Field | Required | Type | Description |
|---|---|---|---|
name | Yes | string | |
trigger_event | Yes | string | |
condition_json | No | object | |
exit_condition_json | No | object | |
steps | No | array | |
status | No | string |
Responses
- 201 — Successful Response
- 422 — Validation Error
GET /api/v1/marketing-automations/{automation_id}
Get Automation
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
automation_id | path | Yes | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
PUT /api/v1/marketing-automations/{automation_id}
Update Automation
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
automation_id | path | Yes | integer |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
name | No | string | |
trigger_event | No | string | |
condition_json | No | object | |
exit_condition_json | No | object | |
steps | No | array | |
status | No | string |
Responses
- 200 — Successful Response
- 422 — Validation Error
DELETE /api/v1/marketing-automations/{automation_id}
Delete Automation
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
automation_id | path | Yes | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
POST /api/v1/marketing-automations/{automation_id}/pause
Pause Automation
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
automation_id | path | Yes | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
POST /api/v1/marketing-automations/{automation_id}/resume
Resume Automation
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
automation_id | path | Yes | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/marketing-automations/{automation_id}/enrollments
List Enrollments
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
automation_id | path | Yes | integer | |
status | query | No | ||
page | query | No | integer | |
page_size | query | No | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/marketing-automations/{automation_id}/stats
Get Automation Stats
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
automation_id | path | Yes | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
DELETE /api/v1/marketing-automations/{automation_id}/enrollments/{enrollment_id}
Cancel Enrollment
Soft unenroll a single client: status='cancelled'. Deliberately different from the parent-automation hard-delete above — keeps history when only one enrollment is cancelled.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
automation_id | path | Yes | integer | |
enrollment_id | path | Yes | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error