Make a request
Send aPOST with a JSON body to https://api.unkey.com/{version}/{service}.{procedure}. Endpoints are under /v2, except deployments.createDeployment, which is under /v3. There are no path or query parameters. The only GET routes are /v2/liveness, the health check, and /openapi.yaml, /openapi.json, and /reference, which serve the OpenAPI document and a browsable reference. See RPC naming convention for how endpoints are named.
Authorization: Bearer header. See API authentication.
Read the response
Every response is a JSON object withmeta. A success usually adds data, and a failure adds error instead. identities.deleteIdentity returns only meta.
The endpoint’s result. Its shape is documented per endpoint in each product’s API reference. List endpoints return an array here.
Present instead of
data when the request failed. Its fields are on API error envelope.Present only on list endpoints. See Page through lists.
A successful response
Page through lists
Most list endpoints use a cursor instead of page numbers. Each request takes an optionallimit and cursor, and each response has a pagination object next to data. The example uses apis.listKeys. environments.listEnvironments and gateway.listPolicies aren’t paginated and return everything in one response.
Maximum items to return. For
apis.listKeys it’s 1 to 100, default 100. Most list endpoints default to 100, but ratelimit.listOverrides defaults to 50. Send limit if the page size matters to you.The
pagination.cursor value from the previous response, sent back unchanged. Leave it out for the first page. Don’t parse cursors or build them yourself.true when there’s another page. When false, you have everything and cursor may be missing or null.