Automations
Update Automation
Updates a workflow automation. Only draft and paused workflows can be edited. Pass active: true to activate after the update.
PATCH
/
automations
/
{id}
curl --request PATCH \
--url https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc \
--header 'Authorization: Bearer AS_your-project-api-key' \
--header 'Content-Type: application/json' \
--data '{
"name": "Welcome Series — v2",
"tags": ["onboarding", "v2"],
"trackingClick": true,
"active": true
}'
import requests
url = "https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc"
headers = {
"Authorization": "Bearer AS_your-project-api-key",
"Content-Type": "application/json"
}
payload = {
"name": "Welcome Series — v2",
"tags": ["onboarding", "v2"],
"trackingClick": True,
"active": True
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
fetch('https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer AS_your-project-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Welcome Series — v2',
tags: ['onboarding', 'v2'],
trackingClick: true,
active: true
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$url = 'https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc';
$data = [
'name' => 'Welcome Series — v2',
'tags' => ['onboarding', 'v2'],
'trackingClick' => true,
'active' => true
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer AS_your-project-api-key',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc"
payload := map[string]interface{}{
"name": "Welcome Series — v2",
"tags": []string{"onboarding", "v2"},
"trackingClick": true,
"active": true,
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer AS_your-project-api-key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class UpdateWorkflow {
public static void main(String[] args) {
try {
URL url = new URL("https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("PATCH");
con.setRequestProperty("Authorization", "Bearer AS_your-project-api-key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"name\": \"Welcome Series — v2\",\n" +
" \"active\": true\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri.path)
request['Authorization'] = 'Bearer AS_your-project-api-key'
request['Content-Type'] = 'application/json'
request.body = {
name: 'Welcome Series — v2',
tags: ['onboarding', 'v2'],
trackingClick: true,
active: true
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b9abc",
"projectId": "60d5ec49f1b2c72d9c8b1111",
"name": "Welcome Series",
"description": "Sends a 2-email welcome flow when a contact is created",
"status": "active",
"entryCriteria": { "type": "contact_created" },
"exitCriteria": { "type": "workflow_complete" },
"steps": [
{ "stepId": "step_aa11", "type": "wait", "delay": { "value": 0, "unit": "minutes" } },
{ "stepId": "step_bb22", "type": "email", "email": { "templateId": "60d5ec49f1b2c72d9c8b1234" } }
],
"tags": ["onboarding"],
"trackingOpen": true,
"trackingClick": true,
"analytics": {
"totalEntered": 1250,
"totalCompleted": 980,
"totalExited": 40,
"totalActive": 230
},
"activeAt": "2026-05-08T10:00:00.000Z",
"createdAt": "2026-05-01T08:00:00.000Z",
"updatedAt": "2026-05-08T10:00:00.000Z"
}
}
Updates a workflow automation. Only
draft and paused workflows can be edited — active workflows must be paused first. Pass active: true to re-activate as part of the update.When
steps is provided, the supplied array fully replaces the existing step list. Steps not included will be removed and any in-flight executions on those steps will exit.curl --request PATCH \
--url https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc \
--header 'Authorization: Bearer AS_your-project-api-key' \
--header 'Content-Type: application/json' \
--data '{
"name": "Welcome Series — v2",
"tags": ["onboarding", "v2"],
"trackingClick": true,
"active": true
}'
import requests
url = "https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc"
headers = {
"Authorization": "Bearer AS_your-project-api-key",
"Content-Type": "application/json"
}
payload = {
"name": "Welcome Series — v2",
"tags": ["onboarding", "v2"],
"trackingClick": True,
"active": True
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
fetch('https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer AS_your-project-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Welcome Series — v2',
tags: ['onboarding', 'v2'],
trackingClick: true,
active: true
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$url = 'https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc';
$data = [
'name' => 'Welcome Series — v2',
'tags' => ['onboarding', 'v2'],
'trackingClick' => true,
'active' => true
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer AS_your-project-api-key',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc"
payload := map[string]interface{}{
"name": "Welcome Series — v2",
"tags": []string{"onboarding", "v2"},
"trackingClick": true,
"active": true,
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer AS_your-project-api-key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class UpdateWorkflow {
public static void main(String[] args) {
try {
URL url = new URL("https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("PATCH");
con.setRequestProperty("Authorization", "Bearer AS_your-project-api-key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"name\": \"Welcome Series — v2\",\n" +
" \"active\": true\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri.path)
request['Authorization'] = 'Bearer AS_your-project-api-key'
request['Content-Type'] = 'application/json'
request.body = {
name: 'Welcome Series — v2',
tags: ['onboarding', 'v2'],
trackingClick: true,
active: true
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b9abc",
"projectId": "60d5ec49f1b2c72d9c8b1111",
"name": "Welcome Series",
"description": "Sends a 2-email welcome flow when a contact is created",
"status": "active",
"entryCriteria": { "type": "contact_created" },
"exitCriteria": { "type": "workflow_complete" },
"steps": [
{ "stepId": "step_aa11", "type": "wait", "delay": { "value": 0, "unit": "minutes" } },
{ "stepId": "step_bb22", "type": "email", "email": { "templateId": "60d5ec49f1b2c72d9c8b1234" } }
],
"tags": ["onboarding"],
"trackingOpen": true,
"trackingClick": true,
"analytics": {
"totalEntered": 1250,
"totalCompleted": 980,
"totalExited": 40,
"totalActive": 230
},
"activeAt": "2026-05-08T10:00:00.000Z",
"createdAt": "2026-05-01T08:00:00.000Z",
"updatedAt": "2026-05-08T10:00:00.000Z"
}
}
Authorizations
Path Parameters
Body
All fields are optional. See Create Automation for the full shape of each field.Replacement step list. Fully replaces the existing steps. Every
email step must be preceded by a wait step (use a delay of 0 to send immediately), including email steps inside a branch.When
true, the workflow is validated and activated after the update. When false, the workflow is left in (or moved to) draft state.Response
Workflow automation updated successfullyThe updated workflow automation.
Show child attributes
Show child attributes
Error Responses
Returned when the workflow is
active or archived — pause it first.{
"success": false,
"error": {
"message": "Only draft or paused workflows can be edited",
"code": "CANNOT_EDIT_AUTOMATION"
}
}
Was this page helpful?
⌘I
curl --request PATCH \
--url https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc \
--header 'Authorization: Bearer AS_your-project-api-key' \
--header 'Content-Type: application/json' \
--data '{
"name": "Welcome Series — v2",
"tags": ["onboarding", "v2"],
"trackingClick": true,
"active": true
}'
import requests
url = "https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc"
headers = {
"Authorization": "Bearer AS_your-project-api-key",
"Content-Type": "application/json"
}
payload = {
"name": "Welcome Series — v2",
"tags": ["onboarding", "v2"],
"trackingClick": True,
"active": True
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
fetch('https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer AS_your-project-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Welcome Series — v2',
tags: ['onboarding', 'v2'],
trackingClick: true,
active: true
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$url = 'https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc';
$data = [
'name' => 'Welcome Series — v2',
'tags' => ['onboarding', 'v2'],
'trackingClick' => true,
'active' => true
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer AS_your-project-api-key',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc"
payload := map[string]interface{}{
"name": "Welcome Series — v2",
"tags": []string{"onboarding", "v2"},
"trackingClick": true,
"active": true,
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer AS_your-project-api-key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class UpdateWorkflow {
public static void main(String[] args) {
try {
URL url = new URL("https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("PATCH");
con.setRequestProperty("Authorization", "Bearer AS_your-project-api-key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"name\": \"Welcome Series — v2\",\n" +
" \"active\": true\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.autosend.com/v1/automations/60d5ec49f1b2c72d9c8b9abc')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri.path)
request['Authorization'] = 'Bearer AS_your-project-api-key'
request['Content-Type'] = 'application/json'
request.body = {
name: 'Welcome Series — v2',
tags: ['onboarding', 'v2'],
trackingClick: true,
active: true
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b9abc",
"projectId": "60d5ec49f1b2c72d9c8b1111",
"name": "Welcome Series",
"description": "Sends a 2-email welcome flow when a contact is created",
"status": "active",
"entryCriteria": { "type": "contact_created" },
"exitCriteria": { "type": "workflow_complete" },
"steps": [
{ "stepId": "step_aa11", "type": "wait", "delay": { "value": 0, "unit": "minutes" } },
{ "stepId": "step_bb22", "type": "email", "email": { "templateId": "60d5ec49f1b2c72d9c8b1234" } }
],
"tags": ["onboarding"],
"trackingOpen": true,
"trackingClick": true,
"analytics": {
"totalEntered": 1250,
"totalCompleted": 980,
"totalExited": 40,
"totalActive": 230
},
"activeAt": "2026-05-08T10:00:00.000Z",
"createdAt": "2026-05-01T08:00:00.000Z",
"updatedAt": "2026-05-08T10:00:00.000Z"
}
}