Skip to main content
Compute and API Management share one HTTP API. Here’s how to make a request, read the response, and page through lists.

Make a request

Send a POST 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.
Put a root key in the Authorization: Bearer header. See API authentication.

Read the response

Every response is a JSON object with meta. A success usually adds data, and a failure adds error instead. identities.deleteIdentity returns only meta.
object
required
Present on every response.
object | array
The endpoint’s result. Its shape is documented per endpoint in each product’s API reference. List endpoints return an array here.
object
Present instead of data when the request failed. Its fields are on API error envelope.
object
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 optional limit 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.
integer
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.
string
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.
boolean
required
true when there’s another page. When false, you have everything and cursor may be missing or null.
string
The value to send as cursor on the next request. Only use it while hasMore is true.
1

Request the first page

2

Read the cursor

3

Send it back until hasMore is false

Keep the other request fields the same on every page. If you change a filter partway through, the results skip items that match the new filter but come before the cursor.
Last modified on November 20, 2026