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

# GET /v1/crm/tags/:id

> Fetch a single tag by id.

Returns one tag of your company.

## Endpoint

```
GET https://api.keebai.com/v1/crm/tags/{id}
```

## Required scope

`crm:tags:read`

## Headers

| Header | Required | Value |
| - | - | - |
| `Authorization` | Yes | `Bearer kbai_pk_<token>` |

## Path parameters

| Field | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | `ObjectId` of the tag. |

## Example request

```bash curl theme={"system"}
curl https://api.keebai.com/v1/crm/tags/6720a1b2c3d4e5f6a7b8c9d0 \
  -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

```js JavaScript theme={"system"}
const response = await fetch(`https://api.keebai.com/v1/crm/tags/${tagId}`, {
  headers: { Authorization: `Bearer ${process.env.KEEBAI_API_TOKEN}` },
});
const { tag } = await response.json();
```

```python Python theme={"system"}
import os, requests

resp = requests.get(
    f"https://api.keebai.com/v1/crm/tags/{tag_id}",
    headers={"Authorization": f"Bearer {os.environ['KEEBAI_API_TOKEN']}"},
    timeout=10,
)
resp.raise_for_status()
tag = resp.json()["tag"]
```

## Response

### 200 OK

```json theme={"system"}
{
  "tag": {
    "_id": "6720a1b2c3d4e5f6a7b8c9d0",
    "name": "Cliente VIP",
    "color": "#f5a623",
    "scope": "ticket",
    "category_id": "6720a0f1e2d3c4b5a6978877",
    "created_at": "2026-10-02T13:04:11.512Z",
    "updated_at": "2026-10-02T13:04:11.512Z"
  }
}
```

`category_id` is `null` for a tag without a category. The detail does not include the `category` summary; [list the categories](https://docs.keebai.com/dev/endpoints/crm-tag-categories-list.md) to resolve it.

### 401 Unauthorized

Missing, invalid, revoked, or expired token.

### 403 Forbidden

The token does not have the `crm:tags:read` scope.

### 404 Not Found

No tag with that id, the id is not a valid `ObjectId`, or the tag belongs to a different company.


## OpenAPI

````yaml GET /v1/crm/tags/{id}
openapi: 3.0.0
info:
  title: Keebai Public API
  description: Superficie pública REST autenticada con Personal Access Tokens (PAT).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.keebai.com
    description: Production
security: []
tags: []
paths:
  /v1/crm/tags/{id}:
    get:
      tags:
        - crm-tags
      summary: Obtener detalle de una etiqueta
      operationId: PublicTagsController_get
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTagEnvelopeDto'
      security:
        - PAT: []
components:
  schemas:
    PublicTagEnvelopeDto:
      type: object
      properties:
        tag:
          $ref: '#/components/schemas/PublicTagResponseDto'
      required:
        - tag
    PublicTagResponseDto:
      type: object
      properties:
        _id:
          type: string
          description: ObjectId de la etiqueta
        name:
          type: string
        color:
          type: string
          example: '#1890ff'
        scope:
          type: string
          enum:
            - ticket
            - client
        category_id:
          type: string
          nullable: true
          description: ObjectId de la categoría, o `null` si no tiene.
        category:
          nullable: true
          description: >-
            Resumen de la categoría. Sólo viene en el listado; el detalle trae
            `category_id`.
          type: object
          allOf:
            - $ref: '#/components/schemas/PublicTagCategorySummaryDto'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - _id
        - name
        - color
        - scope
        - category_id
        - created_at
        - updated_at
    PublicTagCategorySummaryDto:
      type: object
      properties:
        id:
          type: string
          description: ObjectId de la categoría
        name:
          type: string
        exclusive:
          type: boolean
      required:
        - id
        - name
        - exclusive
  securitySchemes:
    PAT:
      scheme: bearer
      bearerFormat: kbai_pk_<hex>
      type: http
      description: >-
        Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal
        con permiso `developer.manage_tokens`.

````

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