Create an automation
curl --request POST \
--url https://api.sendrealm.com/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"definition": {},
"editor_layout": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', definition: {}, editor_layout: {}})
};
fetch('https://api.sendrealm.com/automations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/automations"
payload = {
"name": "<string>",
"description": "<string>",
"definition": {},
"editor_layout": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Create And List Automations
Create automation drafts and list existing automations.
POST
/
automations
Create an automation
curl --request POST \
--url https://api.sendrealm.com/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"definition": {},
"editor_layout": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', definition: {}, editor_layout: {}})
};
fetch('https://api.sendrealm.com/automations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/automations"
payload = {
"name": "<string>",
"description": "<string>",
"definition": {},
"editor_layout": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Endpoints
GET /automationsPOST /automations
Create request
{
"name": "Post Purchase Journey",
"description": "Follow up after a completed order.",
"definition": {
"trigger": {
"event_name": "order.completed"
},
"steps": [
{
"key": "send_receipt",
"type": "send_email_template",
"config": {
"template_version_id": "tpl_ver_email_123",
"domain_id": "dom_123"
}
}
],
"connections": [
{
"from": "trigger",
"to": "send_receipt",
"branch": "next"
}
]
},
"editor_layout": {
"viewport": {
"x": 0,
"y": 0,
"zoom": 1
},
"nodes": [
{
"id": "trigger",
"position": {
"x": 120,
"y": 180
}
}
]
}
}
List filters
GET /automations?status=active&search=post⌘I