POST
/
v1
/
keys.whoami
curl --request POST \
  --url https://api.unkey.dev/v1/keys.whoami \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "sk_123"
}'
{
  "id": "key_123",
  "name": "API Key 1",
  "remaining": 1000,
  "identity": {
    "id": "id_123",
    "externalId": "ext123"
  },
  "meta": {
    "role": "admin",
    "plan": "premium"
  },
  "createdAt": 1620000000000,
  "enabled": true,
  "environment": "production"
}

Changelog

DateChanges
Oct 07 2024Introduced endpoint

You may not always have easy access to the keyId and therefore can’t use /v1/keys.getKey. This offers an escape hatch to send us the real key instead.

Authorizations

Authorization
string
header
required

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

Body

application/json

Response

200
application/json

The configuration for a single key

The response is of type object.