Update an automation
Updates an automation. Automation fields are interdependent, so send the complete automation object rather than a sparse patch.
/v2/ accounts/ {accountId}/ automations/ {automationId}Path parameters
accountIdstringrequired
The account the request is scoped to.
automationIdstringrequired
Request body
Request body for creating or updating an automation. Update is a PATCH but takes the complete object, so both calls need every required field.
namestringrequired
Name of the automation, shown on the dashboard.
templateIdstringrequired
Id of the email template the automation sends.
triggerEventSlugstringrequired
Contact event that triggers the send - see List event names.
triggerEventConditionone of: once, everytimerequired
Send on the first occurrence of the event only, or on every occurrence. Only once is accepted when timingCondition is x_days_after.
timingConditionone of: immediately, x_days_afterrequired
Send as soon as the event arrives, or a number of days later. x_days_after additionally requires timingValue.
timingValueintegeroptional
Whole days to wait before sending. Required when timingCondition is x_days_after, omit it otherwise.
isEnabledbooleanrequired
Whether the automation fires; create it disabled to configure before going live.
Response
The updated automation.
Errors
400
The request body or parameters failed validation.
401
Missing or invalid token, or the token is not authorized for this account/user.
404
The requested resource does not exist.
See Errors and rate limits for what error responses look like.
curl --location --request PATCH 'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/automations/YOUR_AUTOMATION_ID' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Example name",
"templateId": "6650cc1d3e8a220013ef78ab",
"triggerEventSlug": "signup",
"triggerEventCondition": "once",
"timingCondition": "immediately",
"timingValue": 3,
"isEnabled": false
}'
const res = await fetch('https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/automations/YOUR_AUTOMATION_ID', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SENDSTREAK_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "Example name",
"templateId": "6650cc1d3e8a220013ef78ab",
"triggerEventSlug": "signup",
"triggerEventCondition": "once",
"timingCondition": "immediately",
"timingValue": 3,
"isEnabled": false
})
});
import os, requests
res = requests.patch(
'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/automations/YOUR_AUTOMATION_ID',
headers={'Authorization': f"Bearer {os.environ['SENDSTREAK_TOKEN']}"},
json={
"name": "Example name",
"templateId": "6650cc1d3e8a220013ef78ab",
"triggerEventSlug": "signup",
"triggerEventCondition": "once",
"timingCondition": "immediately",
"timingValue": 3,
"isEnabled": False
},
)
{
"_id": "665f0a2b1c9d440012ab34cd",
"name": "Example name",
"templateId": "6650cc1d3e8a220013ef78ab",
"triggerEventSlug": "signup",
"triggerEventCondition": "once",
"timingCondition": "immediately",
"timingValue": 3,
"isEnabled": false,
"createDate": "2026-07-07T09:30:00.000Z"
}