# Search Saved Email Templates

Lists the account's saved email templates by name, with publication status, thumbnail and editor link. Only published templates can be used in emails; catalogue designs use search-email-editor-templates.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": [
        "null",
        "string"
      ],
      "description": "Part of the name, case-insensitive; omit for all",
      "default": null,
      "maxLength": 250
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "count",
    "templates"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    },
    "templates": {
      "type": "array",
      "items": {
        "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"
          }
        }
      }
    }
  }
}
```

