# stensul-update-email-settings

> Changes a draft's name, title, subject line or preheader. The email body is untouched.

Source: https://stensul.com/developers/reference/stensul-update-email-settings/ · From the live server's tool list, 2026-09-28

- Scope: `emails:write`
- Access: write

Check the library first. Title, subject line and preheader are each enabled per library; a disabled field makes the tenant decline the whole call with a 422. A library may also cap lengths below 255.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `emailId` | string (24-char hex id) | yes | Email ID. |
| `name` | string (1–255) | no | New name. Always allowed; cannot be cleared. |
| `subject_line` | string (≤255) | no | Only if the library enables it. Empty string clears it. |
| `preheader` | string (≤255) | no | Only if the library enables it. Empty string clears it. |
| `title` | string (≤255) | no | Only if the library enables it. |

## Example request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "stensul-update-email-settings",
    "arguments": {
      "emailId": "64f0c0ffee0000000000abcd",
      "subject_line": "Last call: Autumn blend ships Friday"
    }
  }
}
```

## Response

Confirmation of the settings changed. No preview, since none of these fields render in the body.

## Errors

| Status | Message | Cause | Fix |
| --- | --- | --- | --- |
| 401 | Authentication expired or missing | The session's authorization expired. | Sign in again when the host prompts. On a 401 or 403, the server's instructions tell the model to re-check sign-in first. |
| 403 | Insufficient OAuth scope (403): The token lacks the required scope | The API connection doesn't have the scope this tool needs. | An admin adds the scope to the API connection. Then sign in again: adding a scope revokes existing tokens. |
| 403 | API error (403): Action is unauthorized. | The signed-in user's role lacks the permission, for example `edit_campaign`. | Grant the permission to the user's role in Admin > Users & Roles. It works for other users on the same connection. |
| 422 | Field not enabled for this library | `stensul-update-email-settings` sent a title, subject line or preheader the library doesn't enable, so the whole call is declined. | Send only fields the library enables (see `stensul-get-libraries`). |
| 403 | API error (403): Sent emails cannot be edited. | The email has already been sent. | Nothing to fix. Copy it and edit the copy. |
