Update an automation draft
curl --request PATCH \
--url https://api.sendrealm.com/automations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.sendrealm.com/automations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/automations/{id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Automations
Update Automation
Update an automation draft.
PATCH
/
automations
/
{id}
Update an automation draft
curl --request PATCH \
--url https://api.sendrealm.com/automations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.sendrealm.com/automations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/automations/{id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Update 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"
}
},
{
"key": "wait_for_open",
"type": "wait_for_event",
"config": {
"event_name": "sendrealm.mail.open",
"timeout_seconds": 86400
}
}
],
"connections": [
{
"from": "trigger",
"to": "send_receipt",
"branch": "next"
},
{
"from": "send_receipt",
"to": "wait_for_open",
"branch": "next"
}
]
},
"editor_layout": {
"viewport": {
"x": 0,
"y": 0,
"zoom": 1
},
"nodes": []
}
}
⌘I