# Search Email Placeholders

Searches placeholders and system links available to one email by editor URL, returning labels and groups. The set varies by email, so a confirmation email offers other placeholders than a newsletter. Account-owned redirects, countdowns, fields and vCards carry numeric IDs that cannot be guessed: look them up here rather than writing a generic placeholder. Query matches placeholder and label. Reads only.

## 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
      }
    }
  }
}
```

