> ## 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.

# DELETE /v1/crm/tags/:id

> Permanently delete a tag and remove it from every record that carries it.

Deletes a tag from the catalog. The tag is also removed from every ticket, customer, and contact that carried it. The deletion is permanent — there is no restore endpoint, and re-creating a tag with the same name gives it a new id that no record references.

## Endpoint

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

## Required scope

`crm:tags:delete`

## 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 -X DELETE 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}`, {
  method: "DELETE",
  headers: { Authorization: `Bearer ${process.env.KEEBAI_API_TOKEN}` },
});
// 204 No Content — response.body is empty
```

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

resp = requests.delete(
    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()
```

## Response

### 204 No Content

The tag was deleted and removed from the records that carried it. The response body is empty.

### 401 Unauthorized

Missing, invalid, revoked, or expired token.

### 403 Forbidden

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

### 404 Not Found

No tag with that id, or the tag belongs to a different company.

## Operational notes

* **Deleting is not the same as renaming.** To merge two tags, apply the surviving tag to the records first, then delete the other one. To fix a typo, [rename](https://docs.keebai.com/dev/endpoints/crm-tag-update.md) instead — the id and every reference stay.


## OpenAPI

````yaml DELETE /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}:
    delete:
      tags:
        - crm-tags
      summary: Eliminar una etiqueta
      description: >-
        Elimina la etiqueta y la quita de todos los tickets, clientes y
        contactos que la llevaban.
      operationId: PublicTagsController_remove
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '204':
          description: Etiqueta eliminada
      security:
        - PAT: []
components:
  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.