Skip to main content
POST
/
automations
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.automations.create({
  name: 'Welcome series',
  status: 'disabled',
  steps: [
    {
      ref: 'trigger',
      type: 'trigger',
      config: { eventName: 'user.created' },
    },
  ],
  edges: [],
});
{
  "object": "automation",
  "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}
Automations are currently in private alpha and only available to a limited number of users. APIs might change before GA.To use the methods on this page, you must upgrade your Resend SDK:
npm install resend@6.10.0-preview-workflows.3
Contact us if you’re interested in testing this feature.

Body Parameters

name
string
required
The name of the automation.
status
string
The status of the automation. Possible values are enabled or disabled. Defaults to disabled.
steps
object[]
required
An array of step objects that define the automation’s actions. Must include at least one trigger step.
edges
object[]
required
An array of edge objects that define connections between steps. Can be an empty array for single-step automations.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.automations.create({
  name: 'Welcome series',
  status: 'disabled',
  steps: [
    {
      ref: 'trigger',
      type: 'trigger',
      config: { eventName: 'user.created' },
    },
  ],
  edges: [],
});
{
  "object": "automation",
  "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"
}