Skip to main content
DELETE
/
oauth
/
token
/
{tokenId}
Revoke access token
curl --request DELETE \
  --url http://sandbox.mintlify.com/oauth/token/{tokenId} \
  --header 'Authorization: Bearer <token>'
Revokes an OAuth access token before it expires.

Use Cases

  • User logs out
  • Security incident requires token invalidation
  • Application no longer needs access

Path Parameters

ParameterTypeRequiredDescription
tokenIdstringYesOAuth token ID to revoke

Example Request

curl -X DELETE http://localhost:3001/api/oauth/token/token_1234567890abcdef \
  -H "Authorization: Bearer <oauth_token>"

Response

Returns 204 No Content on success.

Permissions

Requires OAuth authentication with scope write:oauth-apps.

What Happens

  • Token is immediately invalidated
  • Future API requests with this token will fail with 401
  • Token cannot be un-revoked

Common Errors

401 Unauthorized

Authentication required. Provide a valid OAuth token.

403 Forbidden

Insufficient scope. Required scope: write:oauth-apps

404 Not Found

Token not found with the provided token ID.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tokenId
string
required

Response

Token revoked successfully. The token can no longer be used for authentication.