# 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}'
resp = requests.patch(
"https://api.voxmind.ai/organisations/42/api-tokens/8",
headers={"Authorization": "Bearer YOUR_API_TOKEN"},
json={"enabled": False},
)
{
"id": 8,
"friendly_name": "production-server-01",
"enabled": false,
"updated_at": "2025-03-15T10:30:00Z"
}
API Tokens
Update Token
Enable or disable an API token. The primary use case is disabling a token you suspect may be compromised without permanently deleting it.
PATCH
/
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}'
resp = requests.patch(
"https://api.voxmind.ai/organisations/42/api-tokens/8",
headers={"Authorization": "Bearer YOUR_API_TOKEN"},
json={"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 theenabled 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
Request Body
# 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}'
resp = requests.patch(
"https://api.voxmind.ai/organisations/42/api-tokens/8",
headers={"Authorization": "Bearer YOUR_API_TOKEN"},
json={"enabled": False},
)
{
"id": 8,
"friendly_name": "production-server-01",
"enabled": false,
"updated_at": "2025-03-15T10:30:00Z"
}

