# Update Saved Email Template

Renames a saved email template. Its content is edited separately in the email editor; existing emails are unaffected.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "templateId": {
      "type": "integer",
      "description": "ID of the saved template to rename",
      "minimum": 1
    },
    "name": {
      "type": "string",
      "description": "New name, unique within the account, at most 250 characters, without HTML",
      "minLength": 1,
      "maxLength": 250
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "templateId",
    "name"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "template"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "template": {
      "type": "object",
      "required": [
        "templateId",
        "name",
        "status",
        "thumbnailUrl",
        "editUrl"
      ],
      "properties": {
        "templateId": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "published",
            "unpublished-changes"
          ]
        },
        "thumbnailUrl": {
          "type": "string"
        },
        "editUrl": {
          "type": "string"
        }
      }
    }
  }
}
```

