Automations

Embed
Preview of the card
<a href="https://indrava.forumulate.com/docs/ref-automations"><img src="https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/pages/4538ffdb-368e-4727-8aaa-beb2b05ec17a/social-card.svg?v=3e7ae33eec8b" alt="Automations" width="600" height="315"></a>
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
id
string
required
organizationId
string
required
authorId
string
required
name
string
required
channelId
string
required
trigger
required
conditions
required
action
required
enabled
boolean
required
quietHours
required
activeSince
string
required
lastRunAt
string
required
createdAt
string
required
spec
required
position
number
required
pausedReason
string
required
POST http://localhost:4000/api/v1/automations

Create an automation rule, or with `id` change one

Request body

application/json
name
string
required
channelId
string
trigger
object
required
conditions
object
required
Show child parameters
contains
string
postIds
string[]
action
object
required
quietHours
object
Show child parameters
from
string
required
to
string
required
enabled
boolean
= true
id
string
{
  "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

id
string
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

ruleId
string
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

ruleId
string
query
limit
integer
query
= 20

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

ruleId
string
query
status
string
query
pending | done | failed | skipped
from
string
query
to
string
query
limit
integer
query
= 50
before
string
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

q
string
query
ruleId
string
query
limit
integer
query
= 100

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

from
string
query
required
to
string
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