# Search Email Placeholders

Lists the placeholders one email may carry, the way its own editor offers them: the text placeholders KlickTipp replaces per recipient and the system links, each with its label and group. Addressed by editor URL, because the set depends on the email -- a confirmation mail offers other placeholders than a newsletter. Use it before writing any placeholder that names something the account owns: a marketing-tool redirect, a countdown, a data field and a vCard all carry a numeric ID that cannot be guessed, and a generic placeholder written in its place looks right in the draft and resolves to something else in the mail. Narrow with query, which matches placeholder and label. Reads only: this writes nothing into the email.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "editorUrl": {
      "type": "string",
      "description": "Editor URL of the email, as get-email-editor-content returned it, or the editUrl of a double opt-in confirmation email",
      "minLength": 12,
      "maxLength": 500
    },
    "query": {
      "type": [
        "null",
        "string"
      ],
      "description": "Text the placeholder or its label has to contain; omit for all of them",
      "default": null,
      "maxLength": 250
    },
    "limit": {
      "type": [
        "null",
        "integer"
      ],
      "description": "How many to return at most, 1 to 200; 50 by default",
      "default": null,
      "minimum": 1,
      "maximum": 200
    },
    "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",
    "query",
    "count",
    "hasMore",
    "placeholders"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "emailId": {
      "type": "integer"
    },
    "query": {
      "type": [
        "string",
        "null"
      ]
    },
    "count": {
      "type": "integer"
    },
    "hasMore": {
      "type": "boolean"
    },
    "placeholders": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "placeholder",
          "label",
          "group",
          "kind"
        ],
        "properties": {
          "placeholder": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "tag",
              "link"
            ]
          }
        },
        "additionalProperties": false
      }
    }
  }
}
```

