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/v3"
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.*;
public class Main {
public static void main(String[] args) {
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"
}
Update Automation
Update an existing 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/v3"
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.*;
public class Main {
public static void main(String[] args) {
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"
}
Provide at least one of
name, status, or both steps and connections.
When updating the workflow graph, steps and connections must be sent
together.Path Parameters
Body Parameters
The name of the automation.
The status of the automation. Possible values are
enabled or disabled.The steps that compose the automation graph. Must be provided together with
connections. See Step
Properties for full object
definition.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/v3"
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.*;
public class Main {
public static void main(String[] args) {
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