# Update e-mail campaign

`PATCH https://api.tentary.com/v1/email/campaigns/{campaign_id}`

Source: https://tentary.com/en/help/api/update-email-campaign/
Area: Emails
MCP tool: `update_email_campaign`. Changes data at once.

---

Changes the fields that you send of a draft campaign. All other fields stay.

Scheduled and sent campaigns cannot change.

## Authorization

`Authorization: Bearer <API key>`

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

## Path parameters

- `campaign_id` (integer, required, path): The id from list_email_campaigns. Limits: min 1.

## Request body

- `name` (string): Name in the Tentary app (subscribers 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.
- `audience` (string): Who gets it, always only contacts who subscribed to the newsletter: all_subscribers (default), all_buyers, all_non_buyers, subscribers_who_bought or subscribers_who_did_not_buy one of product_ids. Allowed values: `all_subscribers`, `all_buyers`, `all_non_buyers`, `subscribers_who_bought`, `subscribers_who_did_not_buy`.
- `product_ids` (array of integer): For subscribers_who_bought and subscribers_who_did_not_buy: products from list_products. Limits: min 1, maxItems 200.

## Response

- `id` (integer): The ID.
- `name` (string): Name in the Tentary app.
- `subject` (string): The subject line.
- `body_html` (string): The text as HTML.
- `audience` (string): Always only contacts who subscribed to the newsletter. Allowed values: `all_subscribers`, `all_buyers`, `all_non_buyers`, `subscribers_who_bought`, `subscribers_who_did_not_buy`.
- `product_ids` (array of integer): For subscribers_who_bought and subscribers_who_did_not_buy.
- `status` (string): The status. Allowed values: `draft`, `scheduled`, `sending`, `sent`.
- `send_at` (string<date-time>, can be null): UTC, like 2026-01-31T14:05:00Z. null for a draft.
- `problems_before_sending` (array of string): For a draft: what stops sending. Empty = it can be sent.
- `admin_url` (string<uri>): The page in the Tentary app.

## Example request

```bash
curl -X PATCH "https://api.tentary.com/v1/email/campaigns/802" \
  -H "Authorization: Bearer $TENTARY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "audience": "subscribers_who_did_not_buy",
  "product_ids": [
    102
  ]
}'
```

## Example response

```json
{
  "id": 802,
  "name": "November newsletter",
  "subject": "Yoga for runners is here",
  "body_html": "<p>Hi %FIRST_NAME%,</p><p>my new course helps you recover after every run.</p><p><a class=\"button\" href=\"https://lena-yoga.mytentary.com/p/morning-yoga\">See the course</a></p>",
  "audience": "subscribers_who_did_not_buy",
  "product_ids": [
    102
  ],
  "status": "draft",
  "send_at": null,
  "problems_before_sending": [],
  "admin_url": "https://app.tentary.com/emails/campaign/edit/802"
}
```
