Skip to main content
POST
/
api-keys
/
validate
Validate API key
curl --request POST \
  --url http://sandbox.mintlify.com/api-keys/validate \
  --header 'X-API-Key: <api-key>'
Validates an API key’s authentication and scopes.

Authentication

This endpoint uses API Key authentication via the X-API-Key header (not Bearer token).

Use Cases

  • Test if an API key is valid and active
  • Verify key has required scopes
  • Check key expiration status
  • Validate before making actual API calls

Response

Returns validation details:
  • Whether the key is valid
  • Key ID and name
  • Organization ID
  • Assigned scopes
  • Expiration date
  • Active status

Example

curl -X POST http://localhost:3001/api/api-keys/validate \
  -H "X-API-Key: sk_..."

Error Responses

  • 401 Unauthorized: Invalid or expired API key
  • 403 Forbidden: Key lacks required scopes

Authorizations

X-API-Key
string
header
required

API Key for authentication (format: sk_...)

Response

API key is valid and active