GET /api/autoresponder.php
This endpoint returns a list of automation workflows of an organization.
Request parameters
| Parameter | Value |
| limit | Limit number of records to return per request. If this parameter has not been provided or has a value of 0, then the limit is not applied and all records are returned. |
| page | Page number. Applies only if parameter limit has “truthy” value. Default: 0 |
| status | Filter records by status. Possible values are - INACTIVE, ACTIVE. In order to apply multiple status filters include a status parameter in URI as status[]=INACTIVE&status[]=ACTIVE. |
| sort_by | Sort records by field. Only created_at value is supported.Default: created_at |
| sort_order | Sort direction. Possible values are: ASC and DESC.Default: ASC |
Response parameters
Response is a JSON object.
| Parameter | Value |
| id | Automation workflow ID. Numeric. |
| name | Automation workflow name. |
| sections | Automation workflow “Send Message” actions. See “Sections object parameters” section for more information. |
| tags | List of automation workflow tags. |
| created_at | Workflow creation date. Formatted as YYYY-MM-DD HH:MM:SS, and presented in Europe/Tallinn timezone. |
| activated_at | Workflow activation date. This field has value only if autoresponder has ACTIVE status.Formatted as YYYY-MM-DD HH:MM:SS, and presented in Europe/Tallinn timezone. |
| status | Automation workflow status. Possible values: INACTIVE and ACTIVE. |
Sections object parameters
| Parameter | Value |
| id | Section ID. |
| name | Message subject. |
| template | Template used in the “Send Message” action. Note! For deleted templates the value of “DELETED” is returned. Read the "Template object parameters" section for more information. |
Template object parameters
Note! For deleted templates the value of “DELETED” is returned.
| Parameter | Value |
| id | Template ID. Numeric |
| name | Template name. |
| preview_url | URL to template preview. |
Example
$ curl -X GET -u "${USERNAME}:${PASSWORD}" \
"https://${SUBDOMAIN}.sendsmaily.net/api/autoresponder.php"
(JavaScript/JSON)
[
{
"id": 1,
"name": "Welcome email series",
"sections": [
{
"id": 0,
"subject": "Welcome!",
"template": {
"id": 25,
"name": "Welcome email - first",
"preview_url": "https://<subdomain>.sendsmaily.net/template/preview/id/25"
}
},
{
"id": 1,
"subject": "How to create automation workflow?",
"template": {
"id": 19,
"name": "Welcome email - second",
"preview_url": "https://<subdomain>.sendsmaily.net/template/preview/id/19"
}
}
],
"tags": ["Welcome"],
"created_at": "2021-01-21 10:00:00",
"activated_at": "2021-01-21 10:05:00",
"status": "ACTIVE"
},
...
]