# List tag vocabularies

Discover the tag vocabularies for record types this credential can read. Each vocabulary belongs to one resource type and field. Use its ID to list or manage tags.

POST https://api.brigg.app/v1/operations/customers.ListTagVocabularies

## Access & visibility

Allow `customers.ListTagVocabularies` on your API key.

**Workspace access by default.** Private member data requires [approved member delegation](https://developer.brigg.app/authentication#member-delegation) through `Brigg-Act-As`; the key supplies permissions while private ownership and project boundaries remain enforced.

[Set up authentication](https://developer.brigg.app/authentication) · [Choose permissions](https://developer.brigg.app/permissions)

## Request

No parameters. Send an empty JSON object (`{}`).

## Use stored keys, not labels

1. [List tag vocabularies](https://developer.brigg.app/reference/customers/ListTagVocabularies) and select the record's `resource_type` and `field`.
2. [List tags](https://developer.brigg.app/reference/customers/ListTags) with its `vocabulary_id`.
3. Store the tag's `key` in the record field; use `label` and `color` only for display.

Renaming a label does not change its stored key. System tags are protected from update and deletion. Deleting a user tag also removes that key from affected records; `entries_stripped` reports how many records changed. Removing one record's tag assignment instead uses that record's update operation.

## Response

Returns **200 OK** with a JSON body.

This operation has no continuation cursor. An empty `items` array means no matching visible results were returned.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | array of [Tag vocabulary](#tag-vocabulary-response-items) | Yes | Tag vocabularies available in the workspace. This operation has no cursor pagination. |

### Tag vocabulary · response.items[]

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `vocabulary_id` | string | Yes | Stable vocabulary ID. Pass it to ListTags to discover its allowed tag keys. |
| `resource_type` | string | Yes | Record type whose field uses this vocabulary, for example core:Company. |
| `field` | string | Yes | Business field on that record type that stores the tag keys. |

## Errors & retries

This operation reads data. It needs no idempotency key and can be retried after a transient failure.

For rate limits, follow the server’s retry guidance and back off. See [HTTP errors](https://developer.brigg.app/http#errors) and [safe retries and limits](https://developer.brigg.app/reliability).

| HTTP status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send a JSON object with Content-Type: application/json. |
| 400 | `invalid_input` | Check the request fields and types. |
| 401 | `invalid_key` | The workspace API key is missing, invalid or revoked. |
| 403 | `forbidden` | Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | `not_found` | The requested operation or resource is not available to this credential. |
| 429 | `rate_limited` | Wait for Retry-After before retrying. |

## Next steps

- [List tags](https://developer.brigg.app/reference/customers/ListTags)
- [Create tag](https://developer.brigg.app/reference/customers/CreateTag)

[Download OpenAPI](https://developer.brigg.app/openapi.json) · [Versioning & retirement](https://developer.brigg.app/versioning)

## Examples

### Example request

Fictional values. Replace IDs and business details with values from your workspace.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/customers.ListTagVocabularies' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{}'
```

#### TypeScript


```typescript
const response = await fetch("https://api.brigg.app/v1/operations/customers.ListTagVocabularies", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

payload = {}
request = Request(
    "https://api.brigg.app/v1/operations/customers.ListTagVocabularies",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "items": [
    {
      "vocabulary_id": "core:Company.tags",
      "resource_type": "core:Company",
      "field": "tags"
    }
  ]
}
```

## JSON schemas


```json-schema-request
{
  "type": "object",
  "properties": {},
  "additionalProperties": false,
  "examples": [
    {}
  ]
}
```


```json-schema-response
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "vocabulary_id": {
            "type": "string",
            "description": "Stable vocabulary ID. Pass it to ListTags to discover its allowed tag keys.",
            "examples": [
              "core:Company.tags"
            ]
          },
          "resource_type": {
            "type": "string",
            "description": "Record type whose field uses this vocabulary, for example core:Company.",
            "examples": [
              "core:Company"
            ]
          },
          "field": {
            "type": "string",
            "description": "Business field on that record type that stores the tag keys.",
            "examples": [
              "tags"
            ]
          }
        },
        "required": [
          "vocabulary_id",
          "resource_type",
          "field"
        ],
        "additionalProperties": false,
        "title": "Tag vocabulary"
      },
      "description": "Tag vocabularies available in the workspace. This operation has no cursor pagination."
    }
  },
  "required": [
    "items"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "items": [
        {
          "vocabulary_id": "core:Company.tags",
          "resource_type": "core:Company",
          "field": "tags"
        }
      ]
    }
  ]
}
```

