# stensul-copy-email

> Creates an independent draft copy of an email, keeping all content, modules and layout. The original is never changed.

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

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

Copying into a different library needs the `duplicate_email_between_libraries` permission. If the copy also needs new content, `stensul-build-email` with `copy_of` does both in one call.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `emailId` | string (24-char hex id) | yes | ID of the email to copy. |
| `name` | string | yes | Name for the copy. |
| `library_key` | string | no | Destination library (defaults to the source library). |
| `language` | string | no | Language code for the copy. |
| `subject_line` | string | no | Subject line for the copy. |
| `preheader` | string | no | Preheader for the copy. |
| `title` | string | no | Title for the copy. |
| `tags` | string[] | no | Tags for the copy. |
| `project_id` | string | no | Project for the copy. |
| `type` | string | no | Email type for the copy. |

## Example request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "stensul-copy-email",
    "arguments": {
      "emailId": "64f0c0ffee0000000000abcd",
      "name": "Northwind – Autumn launch (DE)",
      "language": "de-DE"
    }
  }
}
```

## Response

The new draft with an embedded preview. `created_by` may show as `System`; that is expected.

## 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. |
