---
docId: doc_c499c3098f7a46909b9f44e9130243eb
title: Delete a tag
description: Delete an existing tag.
api:
  group: etiquetas
  auth: bearer
  operations:
    - operationId: deleteTag
      method: DELETE
      path: '/v1/tags/{tagId}'
      postmanName: Delete a tag
---

<script>
  import { Note, Ways } from '$lib/components';
</script>

# Delete a tag

Retire a tag by sending its `tagId`. It stops being available for new assignments and disappears from lists.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X DELETE https://api.platic.ai/v1/tags/$TAG_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.tags.delete("tag_123");
```

</Ways.Way>
</Ways>

If your credential covers several workspaces, add `?workspace=<id>` to say which one you work in ([list workspaces](/api-reference/workspaces)); without it the answer is `400`. A single-workspace credential never needs it.

## URL parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|-----------|
| `tagId` | string | Unique identifier of the tag | ✓ |

## Response

```json
{
  "status": "success",
  "message": "Tag deleted successfully",
  "data": {
    "id": "tag_abc123",
    "deleted": true
  }
}
```

## Response fields

| Field | Description |
|-------|-------------|
| `data.id` | ID of the deleted tag |
| `data.deleted` | Always `true` |

## Errors

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `400` | `INVALID_REQUEST` | Your credential covers several workspaces and you did not send `?workspace=`, or you sent one it does not cover. `details.available` lists the ones you can use |
| `401` | `UNAUTHENTICATED` | The credential is missing or invalid |
| `403` | `FORBIDDEN` | The credential does not have the Contacts module (`Missing contacts permission`), or it is an OAuth token without the `platica:write` scope |
| `404` | `TAG_NOT_FOUND` | The tag does not exist in the workspace or was already deleted. Deleting a tag you already deleted returns `404` |

```json
{
  "code": 404,
  "error": "Not Found - The resource doesn't exist",
  "details": {
    "code": "TAG_NOT_FOUND",
    "message": "Tag tag_abc123 not found in this workspace"
  }
}
```

The general error format is in [Errors](/api-reference/errors).
