# DELETE /users/{name}/tokens/{id}

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the users group.

Revoke a user's token

- Who may call it: administrator, reseller
- Token scope, any of: users, all
- Answers: 200 OK

Administrators can revoke tokens for any account. Resellers can revoke tokens for their own account and their customers' accounts. The token identified by id must belong to the account named by name.

Revocation closes any customer sessions opened with the token and revokes plugin tokens tied directly to it. Use this operation to cut off access through a compromised token without suspending the account.

## As a command

- [urbestack-token-revoke](https://urbestack.com/docs/commands/urbestack-token-revoke.md): Revokes the token identified by --id and closes any customer sessions it opened.

## Parameters

- `name` (path, Username, required)
- `id` (path, integer, 1 or more, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X DELETE "$API/users/alice/tokens/1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

The response body is the file itself.

## Errors

- 400: Invalid id
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
- 404: Token <id> not found
