---
title: "Update an email automation"
method: PATCH
path: "/email-automations/{id}"
tags: ["Email"]
---

# Update an email automation

`PATCH /email-automations/{id}`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/email-automations/{id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `messages:write`)

Changes only the fields you send, like enabled: false to pause it.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `template_id` string, uuid
  - `to` string
  - `from` string: The sender: an address on a verified sending domain of this project, optionally with a name, like "Acme <hello@acme.com>".
  - `reply_to` string, nullable
  - `category` 'transactional' | 'other'
  - `delay_minutes` integer
  - `filter` object
    - `collection` string: form.submitted and booking.created: only submissions to this collection (the form).
    - `app_id` string, uuid: app_user.created: only users of this app.
    - `list_id` string, uuid: list.subscribed: only this list.
  - `enabled` boolean

## Response `200`

The updated automation.

- object
  - `id` string, uuid, required
  - `event` 'form.submitted' | 'booking.created' | 'order.paid' | 'order.payment_failed' | 'app_user.created' | 'list.subscribed' | 'subscription.payment_failed' | 'subscription.past_due' | 'subscription.chargeback' | 'subscription.canceled' | 'subscription.paused' | 'subscription.resumed' | 'subscription.recovered', required
  - `template_id` string, uuid, nullable, required
  - `sequence_id` string, uuid, nullable, required
  - `to` string, required: contact (the person of the event) or a fixed address.
  - `from` string, required
  - `reply_to` string, nullable, required
  - `category` 'transactional' | 'other', required
  - `delay_minutes` integer, required
  - `filter` object, required
    - `collection` string
    - `app_id` string, uuid
    - `list_id` string, uuid
  - `enabled` boolean, required
  - `created_at` string, date-time, required

## Other responses

- `400`: Bad Request: invalid_json.
- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required, recipient_not_allowed.
- `404`: Not Found: not_found.
- `409`: Conflict: email_domain_not_verified.
- `422`: Unprocessable Content: validation_failed.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
