How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Unkey keys API

API key management operations

Unkey keys API is one of 8 APIs that Unkey publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 3 JSON Schema definitions.

Tagged areas include Keys. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and 3 JSON Schemas.

This API exposes 15 operations across 15 paths, and defines 66 schemas. It is described by OpenAPI 3.1.0, at version 2.0.0.

Requests are made against a single base URL, https://api.unkey.com.

15 operations 15 paths 66 schemas 15 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
2.0.0
Base URL
https://api.unkey.com
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

Unkey keys API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (root key) (rootKey). By default, every request must be authenticated.

  • rootKey — Unkey uses API keys (root keys) for authentication. These keys authorize access to management operations in the API. To authenticate, include your root key in…

Paths & Operations 15

Across 15 paths, the API surfaces 15 operations — 15 POST. Each is listed below with its method, path, parameters, and response codes.

keys 15

API key management operations

POST
/v2/keys.addPermissions
Add Key Permissions
keys.addPermissions body → 200400401403404429500
POST
/v2/keys.addRoles
Add Key Roles
keys.addRoles body → 200400401403404429500
POST
/v2/keys.createKey
Create API Key
keys.createKey body → 200400401403404429500
POST
/v2/keys.deleteKey
Delete API Keys
keys.deleteKey body → 200400401403404429500
POST
/v2/keys.getKey
Get API Key
keys.getKey body → 200400401403404429500
POST
/v2/keys.migrateKeys
Migrate API Key(s)
keys.migrateKeys body → 200400401403404429500
POST
/v2/keys.removePermissions
Remove Key Permissions
keys.removePermissions body → 200400401403404429500
POST
/v2/keys.removeRoles
Remove Key Roles
keys.removeRoles body → 200400401403404429500
POST
/v2/keys.rerollKey
Reroll Key
keys.rerollKey body → 200400401403404429500
POST
/v2/keys.setPermissions
Set Key Permissions
keys.setPermissions body → 200400401403404429500
POST
/v2/keys.setRoles
Set Key Roles
keys.setRoles body → 200400401403404429500
POST
/v2/keys.updateCredits
Update Key Credits
keys.updateCredits body → 200400401403404429500
POST
/v2/keys.updateKey
Update Key Settings
keys.updateKey body → 200400401403404429500
POST
/v2/keys.verifyKey
Verify API Key
keys.verifyKey body → 200400401403404429500
POST
/v2/keys.whoami
Get API Key by Hash
keys.whoami body → 200400401403404429500

Schemas 66

The contract defines 66 schemas that model the data the API accepts and returns. The most detailed are KeyResponseData (15 properties), V2KeysCreateKeyRequestBody (13 properties), V2KeysVerifyKeyResponseData (12 properties), V2KeysMigrateKeyData (10 properties). Each schema is shown below with its type and property counts.

V2KeysVerifyKeyResponseData
object
12 properties 2 required
V2KeysSetPermissionsResponseData
array
Complete list of all permissions now directly assigned to the key after the set operation has completed. The response includes: - The comprehensive, updated se…
V2KeysRemovePermissionsResponseData
array
Complete list of all permissions directly assigned to the key after the removal operation (remaining permissions only). Notes: - This list does NOT include per…
UpdateKeyCreditsRefill
objectnull
Configuration for automatic credit refill behavior.
3 properties 2 required
ValidationError
object
Individual validation error details. Each validation error provides precise information about what failed, where it failed, and how to fix it, enabling efficie…
3 properties 2 required
KeyCreditsData
object
Credit configuration and remaining balance for this key.
2 properties 1 required
Meta
object
Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. Th…
1 property 1 required
V2KeysMigrateKeyData
object
10 properties 1 required
BadRequestErrorDetails
Extended error details specifically for bad request (400) errors. This builds on the BaseError structure by adding an array of individual validation errors, ma…
V2KeysMigrateKeysMigration
object
2 properties 2 required
EmptyResponse
object
Empty response object by design. A successful response indicates this operation was successfully executed.
V2KeysUpdateKeyResponseBody
object
2 properties 2 required
V2KeysRemovePermissionsRequestBody
object
2 properties 2 required
UnauthorizedErrorResponse
object
Error response when authentication has failed or credentials are missing. This occurs when: - No authentication token is provided in the request - The provided…
2 properties 2 required
NotFoundErrorResponse
object
Error response when the requested resource cannot be found. This occurs when: - The specified resource ID doesn't exist in your workspace - The resource has be…
2 properties 2 required
V2KeysVerifyKeyResponseBody
object
2 properties 2 required
V2KeysGetKeyResponseBody
object
2 properties 2 required
V2KeysMigrateKeysResponseData
object
2 properties 2 required
V2KeysSetRolesResponseData
array
Complete list of all roles now directly assigned to the key after the set operation has completed. The response includes: - The comprehensive, updated set of r…
KeyResponseData
object
15 properties 4 required
VerifyKeyRatelimitData
object
8 properties 8 required
V2KeysRerollKeyRequestBody
object
2 properties 2 required
V2KeysRemoveRolesResponseBody
object
2 properties 2 required
V2KeysDeleteKeyResponseBody
object
2 properties 2 required
Identity
object
4 properties 2 required
V2KeysAddPermissionsResponseData
array
Complete list of all permissions directly assigned to the key (including both newly added permissions and those that were already assigned). This response incl…
TooManyRequestsErrorResponse
object
Error response when the client has sent too many requests in a given time period. This occurs when you've exceeded a rate limit or quota for the resource you'r…
2 properties 2 required
V2KeysWhoamiResponseBody
object
2 properties 2 required
V2KeysMigrateKeysResponseBody
object
2 properties 2 required
V2KeysCreateKeyResponseData
object
2 properties 2 required
V2KeysDeleteKeyRequestBody
object
2 properties 1 required
V2KeysCreateKeyRequestBody
object
13 properties 1 required
V2KeysSetRolesResponseBody
object
2 properties 2 required
V2KeysRerollKeyResponseBody
object
2 properties 2 required
V2KeysSetPermissionsRequestBody
object
2 properties 2 required
V2KeysRemoveRolesResponseData
array
Complete list of all roles directly assigned to the key after the removal operation completes. The response includes: - The remaining roles still assigned to t…
RatelimitRequest
object
4 properties 4 required
V2KeysAddPermissionsResponseBody
object
2 properties 2 required
BadRequestErrorResponse
object
Error response for invalid requests that cannot be processed due to client-side errors. This typically occurs when request parameters are missing, malformed, o…
2 properties 2 required
Permission
object
4 properties 3 required
Role
object
4 properties 2 required
V2KeysCreateKeyResponseBody
object
2 properties 2 required
ForbiddenErrorResponse
object
Error response when the provided credentials are valid but lack sufficient permissions for the requested operation. This occurs when: - The root key doesn't ha…
2 properties 2 required
V2KeysMigrateKeysRequestBody
object
3 properties 3 required
V2KeysRerollKeyResponseData
object
2 properties 2 required
UpdateKeyCreditsData
objectnull
Credit configuration and remaining balance for this key.
2 properties
V2KeysSetRolesRequestBody
object
2 properties 2 required
V2KeysRemovePermissionsResponseBody
object
2 properties 2 required
V2KeysWhoamiRequestBody
object
1 property 1 required
KeysVerifyKeyRatelimit
object
4 properties 1 required
V2KeysUpdateCreditsResponseBody
object
2 properties 2 required
KeyCreditsRefill
object
Configuration for automatic credit refill behavior.
3 properties 2 required
V2KeysVerifyKeyRequestBody
object
6 properties 1 required
V2KeysAddRolesRequestBody
object
2 properties 2 required
V2KeysAddRolesResponseBody
object
2 properties 2 required
V2KeysAddRolesResponseData
array
Complete list of all roles directly assigned to the key after the operation completes. The response includes: - All roles now assigned to the key (both pre-exi…
InternalServerErrorResponse
object
Error response when an unexpected error occurs on the server. This indicates a problem with Unkey's systems rather than your request. When you encounter this e…
2 properties 2 required
KeysVerifyKeyCredits
object
Controls credit consumption for usage-based billing and quota enforcement. Omitting this field uses the default cost of 1 credit per verification. Credits prov…
1 property 1 required
V2KeysRemoveRolesRequestBody
object
2 properties 2 required
RatelimitResponse
object
5 properties 5 required
V2KeysUpdateCreditsRequestBody
object
3 properties 2 required
BaseError
object
Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP r…
4 properties 4 required
V2KeysGetKeyRequestBody
object
2 properties 1 required
V2KeysUpdateKeyRequestBody
object
10 properties 1 required
V2KeysSetPermissionsResponseBody
object
2 properties 2 required
V2KeysAddPermissionsRequestBody
object
2 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

unkey-keys-api-openapi.yml Raw ↑

Other APIs Unkey publishes across the network.

Unkey analytics API
Unkey apis API
Unkey deploy API
Unkey identities API
Unkey liveness API
Unkey permissions API
Unkey ratelimit API
Where this information came from

This is an independent, third-party profile of Unkey keys API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.