# Get Rich-Text Email Content

Reads a rich-text email’s complete HTML and plain body, content type, subject and contentRevision; use it when get-email-editor-content reports emailEditor rich-text. New newsletters should use the drag-and-drop editor, which the block, template and publish tools require. Sent and scheduled bodies and automation and notification emails are readable; editable and blockers describe write access. Drag-and-drop emails are refused. editorUrl is a tool identifier, not an app link; use get-newsletter for contentUrl.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "editorUrl": {
      "type": "string",
      "description": "Editor URL of the email, as get-email-editor-content returned it",
      "minLength": 12,
      "maxLength": 500
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "editorUrl"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "emailId",
    "newsletterId",
    "name",
    "subject",
    "emailEditor",
    "contentType",
    "html",
    "plain",
    "plainSource",
    "contentRevision",
    "editorUrl",
    "editable",
    "blockers"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "emailId": {
      "type": "integer"
    },
    "newsletterId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "name": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "emailEditor": {
      "type": "string",
      "enum": [
        "rich-text"
      ]
    },
    "contentType": {
      "type": "string",
      "enum": [
        "html-and-plain",
        "plain-only"
      ]
    },
    "html": {
      "type": "string"
    },
    "plain": {
      "type": "string"
    },
    "plainSource": {
      "type": "string",
      "enum": [
        "derived",
        "custom"
      ]
    },
    "contentRevision": {
      "type": "string"
    },
    "editorUrl": {
      "type": "string",
      "description": "Names this email for the tools; not a link to open in KlickTipp. To show the email to a person, use contentUrl from get-newsletter."
    },
    "editable": {
      "type": "boolean"
    },
    "blockers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false
}
```

