# Update automation e-mail

`PATCH https://api.tentary.com/v1/email/automation-emails/{email_id}`

Source: https://tentary.com/de/help/api/update-automation-email/
Area: E-Mails
MCP tool: `update_automation_email`. Changes data at once.

---

Changes the fields that you send. All other fields stay, the status too.

- The new text of an active email also applies to emails that wait to be sent.
- An active email keeps its send time and needs a subject and a text.

## Authorization

`Authorization: Bearer <API key>`

A personal API key (tnt_...). Create it in the Tentary app on the page AI & API.

## Path parameters

- `email_id` (integer, required, path): The id of an e-mail from get_email_automation. Limits: min 1.

## Request body

- `name` (string): Name in the Tentary app (contacts do not see it). Limits: minLength 1, maxLength 255.
- `subject` (string): The subject line. Takes %FIRST_NAME%, %FULL_NAME% and %EMAIL%. Limits: maxLength 255.
- `body_html` (string): The text as HTML: p, br, h1-h3, strong, em, u, del, ul, ol, li, blockquote, a (class "button" makes a button), img with a https src (the image_url from finish_image), span; style only color and background-color. Takes %FIRST_NAME%, %FULL_NAME% and %EMAIL%. Only https:// links, no link shorteners. Tentary adds the seller's design, imprint and unsubscribe link: do not write them. Limits: maxLength 65535.
- `send_after_days` (integer): Days after the trigger. 0 = at once (default). Limits: min 0, max 3650.
- `send_hour_utc` (integer, can be null): With send_after_days 1 or more: the hour (UTC) of that day, default 14. Convert from the seller's time zone (get_account_overview). Limits: min 0, max 23.

## Response

- `id` (integer): The ID.
- `automation_id` (integer): The automation ID.
- `name` (string): The name.
- `subject` (string): The subject line.
- `body_html` (string): The text as HTML.
- `status` (string): The status. Allowed values: `active`, `inactive`.
- `send_after_days` (integer): Days after the trigger. 0 = at once.
- `send_hour_utc` (integer, can be null): Hour (UTC) of the send day. null with send_after_days 0.
- `admin_url` (string<uri>): The page in the Tentary app.

## Example request

```bash
curl -X PATCH "https://api.tentary.com/v1/email/automation-emails/862" \
  -H "Authorization: Bearer $TENTARY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "send_hour_utc": 8
}'
```

## Example response

```json
{
  "id": 862,
  "automation_id": 852,
  "name": "Day 3",
  "subject": "How is your practice, %FIRST_NAME%?",
  "body_html": "<p>Three days in: which pose feels best so far?</p>",
  "status": "inactive",
  "send_after_days": 3,
  "send_hour_utc": 8,
  "admin_url": "https://app.tentary.com/emails/automation/edit/852/step/edit/862"
}
```
