# Search Tags

Searches account tags by name, type, writability, per-subscription cardinality or system role. Includes manual and event-generated tags with ID, name and type; get-tag reads their meaning.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": [
        "null",
        "string"
      ],
      "description": "Text the name of a tag has to contain; omit to list them all",
      "default": null,
      "maxLength": 250
    },
    "type": {
      "type": [
        "null",
        "string"
      ],
      "description": "Only tags of this type, \"tag\" being the manual ones; omit for every type",
      "default": null,
      "enum": [
        "apikey-subscribed",
        "automation-finished",
        "automation-started",
        "businesscard-subscribed",
        "campaign-clicked",
        "campaign-converted",
        "campaign-opened",
        "campaign-sent",
        "campaign-viewed",
        "digistore-affiliation",
        "email-clicked",
        "email-opened",
        "email-sent",
        "email-viewed",
        "event-subscribed",
        "facebook-audience",
        "form-subscribed",
        "kajabi-activated",
        "kajabi-deactivated",
        "landing-page-subscribed",
        "outbound-activated",
        "payment-chargeback",
        "payment-completed",
        "payment-deferred",
        "payment-expired",
        "payment-received",
        "payment-refunded",
        "payment-subsequent",
        "plugin-inbound-finished",
        "plugin-inbound-inprogress",
        "plugin-inbound-ready",
        "plugin-inbound-started",
        "rebill-canceled",
        "rebill-canceled-lastday",
        "rebill-resumed",
        "request-email-subscribed",
        "request-sms-subscribed",
        "smartlink",
        "sms-clicked",
        "sms-sent",
        "tag",
        "taggingpixel-triggered",
        "unknown"
      ]
    },
    "onlyWritable": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "Only manual tags the write tools may touch; omit to include the ones KlickTipp sets itself",
      "default": null
    },
    "multiValue": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "true: tags a contact can carry once per subscription; false: once overall; omit for both",
      "default": null
    },
    "systemRole": {
      "type": [
        "null",
        "string"
      ],
      "description": "Only tags with this system role; \"test-contact\" marks contacts that receive test emails",
      "default": null,
      "enum": [
        "test-contact"
      ]
    },
    "limit": {
      "type": [
        "null",
        "integer"
      ],
      "description": "How many tags 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
    }
  },
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "count",
    "totalCount",
    "hasMore",
    "tags"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    },
    "totalCount": {
      "type": "integer"
    },
    "hasMore": {
      "type": "boolean"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "isWritable",
          "isTestContactTag",
          "multiValue",
          "editUrl"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "isWritable": {
            "type": "boolean"
          },
          "isTestContactTag": {
            "type": "boolean"
          },
          "multiValue": {
            "type": "boolean"
          },
          "editUrl": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

