---
title: "Add an email to an automation"
method: POST
path: "/automations/{id}/emails"
tags: ["Automations"]
---

# Add an email to an automation

`POST /automations/{id}/emails`

## Request body

- object
  - `subject` string, required
  - `html` string, required
  - `from_name` string, required
  - `from_email` string, email, required
  - `delay_hours` integer — Hours to wait before sending (default 24, first email defaults to 0)

## Response `201`

Automation email created

- AutomationItem
  - `id` integer
  - `automation_id` integer
  - `campaign_id` integer
  - `delay_hours` integer
  - `send_order` integer
  - `campaign` Campaign
    - `id` integer
    - `title` string, required
    - `subject` string, required
    - `preview_text` string, nullable — Inbox preview snippet shown beneath the subject line in most email clients.
    - `html` string, required
    - `from_name` string, required
    - `from_email` string, email, required
    - `scheduled_at` string, date-time, nullable
    - `sent_at` string, date-time, nullable
    - `timezone` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `403` — Forbidden. Most often an ownership/authorization failure (Laravel's default `{"message": "..."}` shape). If the account is restricted by SendFox, the response instead carries the structured `account_restricted` body with a link to the account status page.
- `422` — Validation error

---

[API](https://skmtc.net/sendfox/apis/sendfox-api.md) · [All operations](https://skmtc.net/sendfox/apis/sendfox-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sendfox/sendfox-api/versions/ea591a7644e7/schema)
