Make a request
Send aPOST with a JSON body to https://api.unkey.com/v2/{service}.{procedure}. There are no path or query parameters. The only GET routes are /v2/liveness, the health check, and /openapi.yaml 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 adds data, and a failure adds error instead.
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
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, but every list endpoint works the same way.
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. Cursors can expire, so don’t store them long term 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.