POST
/
v1
/
keys.verifyKey
curl --request POST \
  --url https://api.unkey.dev/v1/keys.verifyKey \
  --header 'Content-Type: application/json' \
  --data '{
  "apiId": "api_1234",
  "key": "sk_1234",
  "tags": [
    "path=/v1/users/123",
    "region=us-east-1"
  ],
  "authorization": {
    "permissions": "<string>"
  },
  "remaining": {
    "cost": 1
  },
  "ratelimit": {
    "cost": 1
  },
  "ratelimits": [
    {
      "name": "requests",
      "limit": 500,
      "duration": 3600000
    },
    {
      "name": "tokens",
      "limit": 20000,
      "duration": 86400000
    }
  ]
}'
{
  "keyId": "key_1234",
  "valid": true,
  "name": "Customer X",
  "ownerId": "user_123",
  "meta": {
    "roles": [
      "admin",
      "user"
    ],
    "stripeCustomerId": "cus_1234"
  },
  "expires": 123,
  "ratelimit": {
    "limit": 10,
    "remaining": 9,
    "reset": 3600000
  },
  "remaining": 1000,
  "code": "VALID",
  "enabled": true,
  "permissions": [
    "dns.record.update",
    "dns.record.delete"
  ],
  "roles": [
    "admin"
  ],
  "environment": "test",
  "identity": {
    "id": "<string>",
    "externalId": "<string>",
    "meta": {}
  },
  "requestId": "<string>"
}

Changelog

DateChanges
Dec 06 2023Introduced endpoint
Jul 08 2024Added EXPIRED code

Body

application/json

Response

200
application/json

The verification result

The response is of type object.