Skip to main content
PATCH
https://api.voxmind.ai
/
organisations
/
{orgId}
/
api-tokens
/
{tokenId}
# Disable a token immediately
curl -X PATCH https://api.voxmind.ai/organisations/42/api-tokens/8 \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'
{
  "id": 8,
  "friendly_name": "production-server-01",
  "enabled": false,
  "updated_at": "2025-03-15T10:30:00Z"
}

Overview

The update endpoint currently supports toggling the enabled state of a token. Disabling a token immediately prevents it from being used for API calls while preserving its record for audit purposes. This is preferable to deletion when you want to retain a history of all tokens ever issued. A disabled token will return 401 Unauthorized on any API request that uses it.

Path Parameters

orgId
string
required
Your organisation’s unique identifier.
tokenId
string
required
The numeric ID of the token to update.

Request Body

enabled
boolean
required
Set to false to immediately invalidate the token. Set back to true to re-enable it.
# Disable a token immediately
curl -X PATCH https://api.voxmind.ai/organisations/42/api-tokens/8 \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'
{
  "id": 8,
  "friendly_name": "production-server-01",
  "enabled": false,
  "updated_at": "2025-03-15T10:30:00Z"
}