> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clustr-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Tag Groups

> Your tag fields (one per record type), with their tags

Each record type has one tag field: Account tags, Connector tags and Intro tags.
The API calls them tag groups, hence the path. Every label on a record is a tag
in one of these fields, so this is the lookup that makes every
other tag call usable: assignments and filters take each tag's [Clustr ID](https://docs.clustr-ai.com/clustr-ids.md),
`clustr_tag_id`, and those come from here.

See [Tags](https://docs.clustr-ai.com/tags.md) for the model.

## The three fields

| `subject_type` | Field | Labels | Addressed by |
| - | - | - | - |
| `account` | Account tags | Companies | the account's Clustr ID, or its `company_id` |
| `person` | Connector tags | People, connectors included | the person's Clustr ID, or their LinkedIn id |
| `path` | Intro tags | Warm intros, a connector and a prospect | the pair of LinkedIn ids |

`selection` is always `multi`: a record can carry any number of its field's tags.

> [!NOTE]
>
> **Tracking where an intro stands.** Intro tags (`path`) do it. A tag with
> `closes: true` closes the intro it is on.

```bash cURL theme={null}
curl "https://api.clustr-ai.com/api/public/tag-groups?subject_type=path" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```python Python theme={null}
import requests

groups = requests.get(
    "https://api.clustr-ai.com/api/public/tag-groups",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"subject_type": "path"},
).json()["data"]["groups"]

intro_tags = next(g for g in groups if g["subject_type"] == "path")
by_name = {t["name"]: t["id"] for t in intro_tags["tags"]}
```

```javascript JavaScript theme={null}
await fetch("https://api.clustr-ai.com/api/public/tag-groups?subject_type=account", {
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
```

```json 200 theme={null}
{
  "success": true,
  "data": {
    "groups": [
      {
        "clustr_tag_group_id": "tgrp_nxpeqa83he48rcpj09cjm6vd6x",
        "id": "2b7c9d10-4e5f-4a61-9c22-8d3f1a7b0e44",
        "subject_type": "path",
        "name": "Intro tags",
        "selection": "multi",
        "position": 0,
        "is_system": false,
        "tags": [
          {
            "clustr_tag_id": "tag_0k57sn6zset8ps77pmx8d30xfc",
            "clustr_group_id": "tgrp_nxpeqa83he48rcpj09cjm6vd6x",
            "id": "8f652e61-edfa-4a8c-8763-cc4902dd386b",
            "group_id": "2b7c9d10-4e5f-4a61-9c22-8d3f1a7b0e44",
            "name": "Contacted",
            "color": "#3B82F6",
            "position": 0,
            "closes": false
          },
          {
            "clustr_tag_id": "tag_v3whzdrrm5wdk9s2jwhhpkm4sg",
            "clustr_group_id": "tgrp_nxpeqa83he48rcpj09cjm6vd6x",
            "id": "7e4cc70e-2644-4b1e-9006-57222533dde4",
            "group_id": "2b7c9d10-4e5f-4a61-9c22-8d3f1a7b0e44",
            "name": "Not interested",
            "color": "#EF4444",
            "position": 1,
            "closes": true
          }
        ]
      }
    ]
  }
}
```

```json 400 theme={null}
{
  "success": false,
  "error": { "message": "subject_type must be account, person or path", "code": "BAD_REQUEST" }
}
```


## OpenAPI

````yaml GET /tag-groups
openapi: 3.1.0
info:
  title: Clustr Public API
  description: >
    Programmatic access to your Clustr network: import connectors, search warm
    intros (opportunities), and manage target accounts.


    ## Authentication

    All endpoints require a Bearer token (API key) in the `Authorization`
    header.


    ```

    Authorization: Bearer <your_api_key>

    ```


    API keys can be created and managed from the [API settings
    page](https://app.clustr-ai.com/api).
  version: '1.0'
  contact:
    name: Clustr Support
    url: https://clustr-ai.com
servers:
  - url: https://api.clustr-ai.com/api/public
    description: Production
security:
  - BearerAuth: []
paths:
  /tag-groups:
    get:
      tags:
        - Tags
      summary: List Tag Groups
      description: >-
        Lists the tag fields with their tags, one field per `subject_type`:
        Account tags

        (`account`), Connector tags (`person`) and Intro tags (`path`, a warm
        intro /

        opportunity). Every field is multiple-choice (`selection` is always
        `multi`). There are no

        tag groups to create, rename, delete or reorder. `group_id` on a tag is
        its field's id.


        An opportunity's status is an Intro tag, and a tag with `closes: true`
        closes the

        intro.
      operationId: listTagGroups
      parameters:
        - name: subject_type
          in: query
          schema:
            type: string
            enum:
              - account
              - person
              - path
          description: Only the fields for this kind of record. Omit for all three.
        - name: with_counts
          in: query
          schema:
            type: string
            enum:
              - 'true'
          description: >-
            Set to `true` to add how many records carry each tag, as
            `tags_with_counts[].subject_count`. Off by default. The count tells
            you whether a tag is safe to delete.
      responses:
        '200':
          description: The fields, in display order
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      groups:
                        type: array
                        description: The fields, in display order.
                        items:
                          $ref: '#/components/schemas/TagGroup'
        '400':
          description: '`subject_type` must be `account`, `person` or `path`'
        '401':
          description: Invalid or missing API key
components:
  schemas:
    TagGroup:
      type: object
      description: >-
        The tag field of one record type: Account tags (`account`), Connector
        tags (`person`) or Intro tags (`path`). Each record type has exactly one
        field, and every label on a record is a tag in it, statuses included.
        The API paths still say tag-groups.
      required:
        - id
        - subject_type
        - name
        - selection
      properties:
        clustr_tag_group_id:
          type: string
          description: >-
            The field's Clustr ID, for example
            `tgrp_yv9pt1y7xx35yfk54t0d1eym7j`. It is the `group_id` on

            each of the field's tags.
          example: tgrp_yv9pt1y7xx35yfk54t0d1eym7j
        id:
          type: string
          format: uuid
          description: >-
            Kept for integrations built before Clustr IDs. New integrations
            should use `clustr_tag_group_id`.
        subject_type:
          type: string
          enum:
            - account
            - person
            - path
          description: >-
            What the field's tags label: companies (`account`, Account tags),
            people (`person`, Connector tags), or warm intros / opportunities
            (`path`, Intro tags: a connector and a prospect). Each record type
            has exactly one field.
        name:
          type: string
          maxLength: 80
        selection:
          type: string
          enum:
            - multi
          description: 'Always `multi`: a record holds any number of the field''s tags.'
        position:
          type: integer
          description: Display order. Assigned on create.
        is_system:
          type: boolean
          description: >-
            `true` for a group Clustr seeds and depends on. It can be renamed,
            but

            `DELETE` on it returns 422.
        tags:
          type: array
          description: >-
            The field's tags, in display order: `id`, `name`, `color`,
            `position` and

            `closes`.
          items:
            $ref: '#/components/schemas/Tag'
        tags_with_counts:
          type: array
          description: Present instead of `tags` when the request sets `with_counts=true`.
          items:
            allOf:
              - $ref: '#/components/schemas/Tag'
              - type: object
                properties:
                  subject_count:
                    type: integer
                    description: How many records carry this tag.
    Tag:
      type: object
      description: One term inside a tag field.
      required:
        - id
        - group_id
        - name
        - color
      properties:
        clustr_tag_id:
          type: string
          description: >-
            The tag's Clustr ID, for example `tag_275zx5fj2f0nka3hnyk651zr1e`.
            Use it to refer to this tag.

            Every tag write and the `tag` search filter take it.
          example: tag_275zx5fj2f0nka3hnyk651zr1e
        clustr_group_id:
          type: string
          description: >-
            The Clustr ID of the tag field it lives in, for example
            `tgrp_s4t5tk9wn7mx8n3hry88wv0rqa`. A tag

            cannot move between fields.
          example: tgrp_s4t5tk9wn7mx8n3hry88wv0rqa
        id:
          type: string
          format: uuid
          description: >-
            Kept for integrations built before Clustr IDs. New integrations
            should use `clustr_tag_id`.
        group_id:
          type: string
          format: uuid
          description: >-
            Kept for integrations built before Clustr IDs. New integrations
            should use `clustr_group_id`.
        group_name:
          type: string
          description: That field's name, so a flat list says which field a tag is in.
        subject_type:
          type: string
          enum:
            - account
            - person
            - path
          description: 'The field''s subject type: `account`, `person` or `path`.'
        name:
          type: string
          maxLength: 50
        color:
          type: string
          maxLength: 20
          example: '#3B82F6'
        position:
          type: integer
        closes:
          type: boolean
          description: >-
            For opportunity (`path`) tags: `true` means the conversation on this
            path is over. A path carrying it sorts last, shows a neutral pill
            and stays visible.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: The API key you created on the API settings page of the Clustr app.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.