# Search Marketing Campaign Templates

Searches Business Automation Masterclass templates by purpose, best match first. Returns each template's start tag, email subjects, fields, tags, included automations and import URI. Reads only.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": [
        "null",
        "string"
      ],
      "description": "What the automation should do, in the user's words, e.g. Termin nachfassen or Bewertungen sammeln; omit to list all",
      "default": null,
      "maxLength": 200
    },
    "module": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Only templates of this Masterclass module",
      "default": null,
      "minimum": 1,
      "maximum": 99
    },
    "limit": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Maximum number of templates to return, 1 to 50; default 10",
      "default": null,
      "minimum": 1,
      "maximum": 50
    },
    "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",
    "hasMore",
    "totalCount",
    "templates"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    },
    "hasMore": {
      "type": "boolean"
    },
    "totalCount": {
      "type": "integer"
    },
    "templates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "uri",
          "code",
          "name",
          "module",
          "moduleTitle",
          "description",
          "startsWhenTagged",
          "emailSubjects",
          "includedAutomations",
          "emailCount",
          "tagNames",
          "customFieldNames"
        ],
        "properties": {
          "uri": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "module": {
            "type": "integer"
          },
          "moduleTitle": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "startsWhenTagged": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "emailSubjects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "includedAutomations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "emailCount": {
            "type": "integer"
          },
          "tagNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "customFieldNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
```

