Update Automation
PATCH
/
automations
/
:automation_id
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.automations.update(
'c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd',
{ status: 'enabled' },
);$resend = Resend::client('re_xxxxxxxxx');
$resend->automations->update('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', [
'status' => 'enabled',
]);import resend
resend.api_key = "re_xxxxxxxxx"
params: resend.Automations.UpdateParams = {
"automation_id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
"status": "enabled",
}
resend.Automations.update(params)require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
automation_id: "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
status: "enabled",
}
Resend::Automations.update(params)package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
params := &resend.UpdateAutomationRequest{
Status: resend.AutomationStatusEnabled,
}
client.Automations.Update("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", params)
}use resend_rs::{
types::{AutomationStatus, UpdateAutomationOptions},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let opts = UpdateAutomationOptions::new().with_status(AutomationStatus::Enabled);
let _automation = resend
.automations
.update("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", opts)
.await?;
Ok(())
}import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.automations.model.AutomationStatus;
import com.resend.services.automations.model.UpdateAutomationOptions;
import com.resend.services.automations.model.UpdateAutomationResponseSuccess;
public class Main {
public static void main(String[] args) throws ResendException {
Resend resend = new Resend("re_xxxxxxxxx");
UpdateAutomationOptions options = UpdateAutomationOptions.builder()
.id("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
.status(AutomationStatus.ENABLED)
.build();
UpdateAutomationResponseSuccess response = resend.automations().update(options);
}
}using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" );
var resp = await resend.AutomationUpdateAsync(
new Guid( "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd" ),
new AutomationUpdateData { Status = "enabled" }
);
Console.WriteLine( "AutomationId={0}", resp.Content );curl -X PATCH 'https://api.resend.com/automations/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"status": "enabled"
}'resend automations update c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd --status enabled{
"object": "automation",
"id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}Path Parameters
Section titled “Path Parameters”Body Parameters
Section titled “Body Parameters”string
The name of the automation.
string
The status of the automation. Possible values are enabled or disabled.
Step[]
The steps that compose the automation graph. Must be provided together with connections. The graph of an enabled automation cannot be updated: disable the automation first, or duplicate it and edit the copy. See Step Properties for full object definition.
Connection[]
The connections between steps in the automation graph. Must be provided together with steps. See Connection Properties for full object definition.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.automations.update(
'c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd',
{ status: 'enabled' },
);$resend = Resend::client('re_xxxxxxxxx');
$resend->automations->update('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', [
'status' => 'enabled',
]);import resend
resend.api_key = "re_xxxxxxxxx"
params: resend.Automations.UpdateParams = {
"automation_id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
"status": "enabled",
}
resend.Automations.update(params)require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
automation_id: "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
status: "enabled",
}
Resend::Automations.update(params)package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
params := &resend.UpdateAutomationRequest{
Status: resend.AutomationStatusEnabled,
}
client.Automations.Update("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", params)
}use resend_rs::{
types::{AutomationStatus, UpdateAutomationOptions},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let opts = UpdateAutomationOptions::new().with_status(AutomationStatus::Enabled);
let _automation = resend
.automations
.update("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", opts)
.await?;
Ok(())
}import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.automations.model.AutomationStatus;
import com.resend.services.automations.model.UpdateAutomationOptions;
import com.resend.services.automations.model.UpdateAutomationResponseSuccess;
public class Main {
public static void main(String[] args) throws ResendException {
Resend resend = new Resend("re_xxxxxxxxx");
UpdateAutomationOptions options = UpdateAutomationOptions.builder()
.id("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
.status(AutomationStatus.ENABLED)
.build();
UpdateAutomationResponseSuccess response = resend.automations().update(options);
}
}using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" );
var resp = await resend.AutomationUpdateAsync(
new Guid( "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd" ),
new AutomationUpdateData { Status = "enabled" }
);
Console.WriteLine( "AutomationId={0}", resp.Content );curl -X PATCH 'https://api.resend.com/automations/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"status": "enabled"
}'resend automations update c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd --status enabled{
"object": "automation",
"id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}Was this page helpful?
⌘I