Automations
Update an automation
Updates an existing draft or paused Automation. Before changing a running Automation, read it by ID, retain its status in the current task only, pause it, apply the update, and use bounded direct item reads until is_updating is false. Run preflight, return it to running only if it was running before and preflight passes, and verify the final status. If the update fails before changing the Automation, restore its prior running status when preflight passes. If readiness or the prior status cannot be restored, leave it paused and immediately report the failure; never activate an Automation that was not already running.
put/v1/automations/{automation_id}
Request
- Base URL: https://api.mailrith.com
- URL: https://api.mailrith.com/v1/automations/{automation_id}
- Auth: HTTP bearer
Path parameters
automation_idstring required
The automation identifier.
Request body
Example request
{
"definition": {
"version": 2,
"trigger": {
"type": "tag_added",
"tagIds": [
"tag_welcome"
]
},
"steps": [
{
"id": "send-welcome-email",
"kind": "action",
"type": "send_email",
"config": {
"subject": "Welcome",
"previewText": "Thanks for joining",
"bodyDocument": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Welcome to Mailrith."
}
]
}
]
},
"replyToEmail": "",
"trackOpens": true,
"trackClicks": true,
"utmSource": "",
"utmMedium": "",
"utmCampaign": "",
"utmTerm": "",
"utmContent": ""
}
}
]
}
}Response
Successful response
Example response
{
"data": {
"definition": {
"version": 2,
"trigger": {
"type": "tag_added",
"tagIds": [
"tag_welcome"
]
},
"steps": [
{
"id": "send-welcome-email",
"kind": "action",
"type": "send_email",
"config": {
"subject": "Welcome",
"previewText": "Thanks for joining",
"bodyDocument": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Welcome to Mailrith."
}
]
}
]
},
"replyToEmail": "",
"trackOpens": true,
"trackClicks": true,
"utmSource": "",
"utmMedium": "",
"utmCampaign": "",
"utmTerm": "",
"utmContent": ""
}
}
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.