Automations
GET
http://localhost:4000/api/v1 /automations List automation rules
Code samples
cURL
curl -X GET "http://localhost:4000/api/v1/automations" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
[
{
"id": "string",
"organizationId": "string",
"authorId": "string",
"name": "string",
"channelId": "string",
"trigger": {},
"conditions": {},
"action": {},
"enabled": true,
"quietHours": {},
"activeSince": "2024-01-01T00:00:00Z",
"lastRunAt": "2024-01-01T00:00:00Z",
"createdAt": "2024-01-01T00:00:00Z",
"spec": {},
"position": 0,
"pausedReason": "string"
}
]Schema
idstring
required
organizationIdstring
required
authorIdstring
required
namestring
required
channelIdstring
required
triggerrequired
conditionsrequired
actionrequired
enabledboolean
required
quietHoursrequired
activeSincestring
required
lastRunAtstring
required
createdAtstring
required
specrequired
positionnumber
required
pausedReasonstring
required
POST
http://localhost:4000/api/v1 /automations Create an automation rule, or with `id` change one
Request body
application/json
namestring
required
channelIdstring
triggerobject
required
conditionsobject
required
Show child parameters
containsstring
postIdsstring[]
actionobject
required
quietHoursobject
Show child parameters
fromstring
required
tostring
required
enabledboolean
idstring
{
"name": "string",
"channelId": "string",
"trigger": {
"type": {}
},
"conditions": {
"contains": "string",
"postIds": [
"string"
]
},
"action": {
"type": {},
"channelId": "string"
},
"quietHours": {
"from": "string",
"to": "string"
},
"enabled": true,
"id": "string"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/automations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","channelId":"string","trigger":{"type":{}},"conditions":{"contains":"string","postIds":["string"]},"action":{"type":{},"channelId":"string"},"quietHours":{"from":"string","to":"string"},"enabled":true,"id":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}DELETE
http://localhost:4000/api/v1 /automations/{id} Delete an automation rule and its run history
Parameters
idstring
path
required
Code samples
cURL
curl -X DELETE "http://localhost:4000/api/v1/automations/{id}" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}GET
http://localhost:4000/api/v1 /automations/{ruleId}/runs A rule's 50 newest runs: what it did, or why it could not
Parameters
ruleIdstring
path
required
Code samples
cURL
curl -X GET "http://localhost:4000/api/v1/automations/{ruleId}/runs" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}GET
http://localhost:4000/api/v1 /automations/numbers Per rule: triggered, sent, answered, failed, link clicks and each flow step
Code samples
cURL
curl -X GET "http://localhost:4000/api/v1/automations/numbers" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}GET
http://localhost:4000/api/v1 /automations/posts Posts ranked by how many automation runs they brought
Parameters
ruleIdstring
query
limitinteger
query
Code samples
cURL
curl -X GET "http://localhost:4000/api/v1/automations/posts" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}GET
http://localhost:4000/api/v1 /automations/history Automation run history across rules, filtered by rule, status and dates
Parameters
ruleIdstring
query
statusstring
query
fromstring
query
tostring
query
limitinteger
query
beforestring
query
Code samples
cURL
curl -X GET "http://localhost:4000/api/v1/automations/history" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}GET
http://localhost:4000/api/v1 /automations/contacts People who gave an address in an automation flow
Parameters
qstring
query
ruleIdstring
query
limitinteger
query
Code samples
cURL
curl -X GET "http://localhost:4000/api/v1/automations/contacts" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}GET
http://localhost:4000/api/v1 /automations/follow-ups Quotes, reposts and plugs still to go out in a time range
Parameters
fromstring
query
required
tostring
query
required
Code samples
cURL
curl -X GET "http://localhost:4000/api/v1/automations/follow-ups?from=<from>&to=<to>" \
-H "Authorization: Bearer $API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{}Option 1
{}Option 2
{}Updated