# Rename tag

> Rename a library tag.

Source: https://docs.mycrmsim.com/docs/tags/rename-tag

```http
PATCH https://backend.mysmsgateway.app/api/v1/ext/tags/{id}
```

- Category: myCRMSIM Contacts / Tags
- Auth: Bearer access token
- Scope: `contacts.write`

Renames the library row only; contacts that carry the old name keep it. A name another tag in the workspace already has answers **409**.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | number | yes | The tag id (from *List tags*). Example: `310` |
| `name` | body | string | yes | The new name. Example: `VIP client` |

## Request body

```json
{
  "name": "VIP client"
}
```

## Response 200

OK

```json
{
  "success": true,
  "message": "Tag updated",
  "data": {
    "id": 310,
    "workspace_id": 7,
    "name": "VIP client",
    "source": "library",
    "created_at": "2026-11-04T02:10:00.000Z",
    "updated_at": "2026-11-04T03:00:00.000Z"
  }
}
```

## Response 400

No name

```json
{
  "success": false,
  "message": "name is required."
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): contacts.write. This integration was granted: …"
}
```

## Response 404

Tag does not exist or is not owned by the installer (same response for both)

```json
{
  "success": false,
  "message": "Tag not found or not accessible to this token"
}
```

## Response 409

Another tag has that name

```json
{
  "success": false,
  "code": "duplicate_tag",
  "message": "A tag with this name already exists in the workspace."
}
```
