Skip to main content

Delete Token

Revoke a token by ID. Revoked tokens can no longer be used.

Endpoint

DELETE /token/delete

Authentication

HeaderValue
AuthorizationBearer <jwt_token>
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
idstringToken ID to revoke

Example Request

curl --location --request DELETE 'http://localhost:9000/token/delete' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <jwt_token>' \
--data '{
"id": "69972c0c93be639a3a718e6b"
}'

Response

Success Response (200 OK)

{
"message": "Token revoked"
}

Response Fields

FieldTypeDescription
messagestringConfirmation that the token was revoked

Notes

  • Token revocation is the only way to change token access or lifetime.
  • After deletion, create a new token if you need updated allowed_apps or expiration.
  • Deleted tokens cannot be restored.