Authenticate API Key
POST {{endpoint}}/api-keys/auth/:apiKey
Authenticates an API Key
You can use this endpoint to check whether an API key is valid or not by checking the HTTP status of the response, if it's 404
then the key is invalid, if it's 200
then the key is valid
To fetch/authenticate an API key you must pass its key
as a query parameter
Note: Authenticating an API key fires firstUsed
event if the API key is used for the first time, if you wish to fetch an API key without firing this event (fetch a key without authenticating it) use fetch API key route
Returns
200
if key was fetched successfully
401
if authentication fails
403
if user doesn't have any roles
404
if key doesn't exist
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
x-api-key | string |
RESPONSES
status: OK
{"key":"doc-api-custom-key-1","name":"Postman Docs API Key with all fields","customMetaData":{"accessType":"BASIC"},"customAccountId":"ACC123","customUserId":"USER123","env":"live","createdAt":"2022-08-23T14:32:40.223Z","updatedAt":"2022-08-23T14:56:46.494Z","isActive":true,"expiresAt":"2024-08-01T15:21:00.000Z","rateLimitConfigs":{"rateLimit":25,"rateLimitTtl":60}}