# Replace user tags

`PUT https://api.cademi.com.br/api/v3/users/{user_id}/tags`

Operation ID: `users.tags.update` · API v3

Replaces the user's entire set of tags with the tags supplied in the request. Assigned tags that are not included are removed.

If any supplied tag does not exist in the account, the API returns `404 Not Found` and no changes are made.

Required permissions: `users.update`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `user_id` | path | string | yes |  |

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `tags` | array of string | yes |  |

## Responses

### 200

Returns the user's current set of tags.

Body: `data`: array of Tag.

Fields of Tag:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string (date-time) | yes |  |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `object` | string, one of `tag` | yes |  |
| `revision` | string | yes |  |
| `updated_at` | string (date-time) | yes |  |
| `users_count` | integer | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The user or tag was not found or is not accessible with the current credentials.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
