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

# Remove a Test User's Tag

> Removes a tag that was set on a test user through Set a Test User's Tag.

> [!NOTE]
>
> Please review proper request headers [here](https://docs.thanx.com/consumer/usage/headers.md).

<Snippet file="sandbox/auth.mdx" />

Only tags set through [Set a Test User's Tag](https://docs.thanx.com/consumer/sandbox/set-user-tag.md) are removed. Tags set by another source, such as a partner integration, are left untouched.

### Parameters

**user\_id** `string` *required*

The user's `id`. The user must be a member of your merchant.

**key** `string` *required*

The tag key to remove. Reserved tag names are rejected.

### Response

Returns `200 OK` with an empty JSON object (`{}`), including when the user had no tag with this `key`.

### Errors

| Status | Code | Message | When |
| - | - | - | - |
| `400` | `BAD_REQUEST` | `key is missing` | No `key` was sent |
| `400` | `BAD_REQUEST` | `key is a reserved tag name` | The key is reserved |
| `400` | `CLIENT_ID_HEADER_INVALID` | `X-ClientId header is invalid` | The `X-ClientId` header is missing or doesn't match an app |
| `403` | `FORBIDDEN` | `You do not have access to this resource.` | Called in production, or your `X-ClientId` isn't tied to exactly one merchant |
| `404` | `RESOURCE_NOT_FOUND` | `User not found` | No active user with this `user_id` is a member of your merchant |

```bash Remove Tag theme={null}
curl "https://api.thanxsandbox.com/users/${user_id}/tags?key=allergens" \
  -X DELETE \
  -H "Accept-Version: v4.0" \
  -H "Accept: application/json" \
  -H "X-ClientId: ${client_id}"
```

```json theme={null}
{}
```


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