The verification result
Field | Type | Required | Description | Example |
---|---|---|---|---|
keyId |
string | ➖ | The id of the key | key_1234 |
valid |
boolean | ✔️ | Whether the key is valid or not. A key could be invalid for a number of reasons, for example if it has expired, has no more verifications left or if it has been deleted. |
true |
name |
string | ➖ | The name of the key, give keys a name to easily identifiy their purpose | Customer X |
ownerId |
string | ➖ | The id of the tenant associated with this key. Use whatever reference you have in your system to identify the tenant. When verifying the key, we will send this field back to you, so you know who is accessing your API. | user_123 |
meta |
Record<string, any> | ➖ | Any additional metadata you want to store with the key | { "roles": [ "admin", "user" ], "stripeCustomerId": "cus_1234" } |
expires |
number | ➖ | The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring. | 123 |
ratelimit |
operations.PostV1KeysVerifyKeyRatelimit | ➖ | The ratelimit configuration for this key. If this field is null or undefined, the key has no ratelimit. | { "limit": 10, "remaining": 9, "reset": 3600000 } |
remaining |
number | ➖ | The number of requests that can be made with this key before it becomes invalid. If this field is null or undefined, the key has no request limit. | 1000 |
code |
operations.Code | ➖ | If the key is invalid this field will be set to the reason why it is invalid. Possible values are: - NOT_FOUND: the key does not exist or has expired - FORBIDDEN: the key is not allowed to access the api - USAGE_EXCEEDED: the key has exceeded its request limit - RATE_LIMITED: the key has been ratelimited - UNAUTHORIZED: the key is not authorized - DISABLED: the key is disabled |
|
enabled |
boolean | ➖ | Sets the key to be enabled or disabled. Disabled keys will not verify. |