# Update Automation

PATCH

/

automations

/

:automation\_id

:::code-group
```typescript title="Node.js"
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.automations.update(
  'c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd',
  { status: 'enabled' },
);
```

```php title="PHP"
$resend = Resend::client('re_xxxxxxxxx');

$resend->automations->update('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', [
  'status' => 'enabled',
]);
```

```python title="Python"
import resend

resend.api_key = "re_xxxxxxxxx"

params: resend.Automations.UpdateParams = {
  "automation_id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
  "status": "enabled",
}

resend.Automations.update(params)
```

```ruby title="Ruby"
require "resend"

Resend.api_key = "re_xxxxxxxxx"

params = {
  automation_id: "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
  status: "enabled",
}

Resend::Automations.update(params)
```

```go title="Go"
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)
}
```

```rust title="Rust"
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(())
}
```

```java title="Java"
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);
    }
}
```

```csharp title=".NET"
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 );
```

```shellscript title="cURL"
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"
}'
```

```shellscript title="CLI"
resend automations update c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd --status enabled
```
:::

:::code-group
```json title="Response"
{
  "object": "automation",
  "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}
```
:::

:::callout{intent="note"}
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

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](/guides/learn-dashboard-automations-steps#step-properties) for full object definition.

Connection\[]

The connections between steps in the automation graph. Must be provided together with `steps`. See [Connection Properties](/guides/learn-dashboard-automations-connections#connection-properties) for full object definition.

:::code-group
```typescript title="Node.js"
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.automations.update(
  'c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd',
  { status: 'enabled' },
);
```

```php title="PHP"
$resend = Resend::client('re_xxxxxxxxx');

$resend->automations->update('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', [
  'status' => 'enabled',
]);
```

```python title="Python"
import resend

resend.api_key = "re_xxxxxxxxx"

params: resend.Automations.UpdateParams = {
  "automation_id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
  "status": "enabled",
}

resend.Automations.update(params)
```

```ruby title="Ruby"
require "resend"

Resend.api_key = "re_xxxxxxxxx"

params = {
  automation_id: "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
  status: "enabled",
}

Resend::Automations.update(params)
```

```go title="Go"
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)
}
```

```rust title="Rust"
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(())
}
```

```java title="Java"
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);
    }
}
```

```csharp title=".NET"
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 );
```

```shellscript title="cURL"
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"
}'
```

```shellscript title="CLI"
resend automations update c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd --status enabled
```
:::

```json
{
  "object": "automation",
  "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}
```

Was this page helpful?

⌘I

## Related pages

- [Account Management](./account-management-index.md)
- [API Keys](./api-keys-2-index.md)
- [API Keys](./api-keys-index.md)
- [API Reference](./api-reference-index.md)
- [AudiencesDEPRECATED](./audiencesdeprecated-index.md)
- [Authorized Apps](./authorized-apps-index.md)
- [Automations](./automations-index.md)
- [Broadcasts](./broadcasts-index.md)
- [Build with AI](./build-with-ai-index.md)
- [Changelog](../changelog.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
