Keys
API keys and their scopes.
/v1/keysList API keys
The organisation's keys, newest first, revoked ones included. Never the secret.
Query parameters
limitintegerPage size, 1-200 (default 50).
cursorstringThe
nextCursorof the previous page.
Returns
200 A page of keys. A page: data is a list of ApiKey, and nextCursor fetches the next page.
Fields of data
idstringrequiredAPI key id (
key_…).pattern `^key_.*`
namestringrequiredprefixstringrequiredThe key's first characters, as shown in the console.
scopesstring[]requiredThe scopes as set on the key; [] or ["*"] is full access (sensitive scopes are added by name).
apiVersion"2026-07-08" | "2026-10-01"requiredThe contract the key speaks.
createdBystring | nullrequiredWho made it: a member (
usr_…) or a key (key_…); null for older keys.lastUsedAtstring (date-time) | nullrequiredrevokedAtstring (date-time) | nullrequiredcreatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requiredrate_limitedserver_error
Request
curl "https://app.zentiqai.com/v1/keys?limit=20" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const page = await zentiq.listKeys({
limit: 20,
});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
page = zentiq.list_keys(limit=20)Example answer
{
"data": [
{
"id": "key_cmfq2b7x10000abcd1234",
"name": "Zoe",
"prefix": "zq_live_ab12",
"scopes": [
"…"
],
"apiVersion": "2026-07-08",
"createdBy": "…"
}
],
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d",
"nextCursor": null
}/v1/keysMint an API key
Returns the secret once. Rotation: create a new key, move to it, then revoke the old one. A key can only give scopes it holds itself; the new key speaks this request's contract unless apiVersion says otherwise.
Body (optional)
namestringUp to 60 characters. Default "API key".
scopesstring[]Scope names, or ["*"] (the default, [] means the same) for full access. A key can only give scopes it holds itself.
at most 64 items
apiVersion"2026-07-08" | "2026-10-01"The contract the new key speaks. Default: the contract of this request.
Returns
201 The new key, with its secret (shown once). data is KeyWithSecret.
Fields of data
idstringrequiredAPI key id (
key_…).pattern `^key_.*`
namestringrequiredprefixstringrequiredThe key's first characters, as shown in the console.
scopesstring[]requiredThe scopes as set on the key; [] or ["*"] is full access (sensitive scopes are added by name).
apiVersion"2026-07-08" | "2026-10-01"requiredThe contract the key speaks.
createdBystring | nullrequiredWho made it: a member (
usr_…) or a key (key_…); null for older keys.lastUsedAtstring (date-time) | nullrequiredrevokedAtstring (date-time) | nullrequiredcreatedAtstring (date-time)requiredISO 8601 UTC timestamp.
keystringrequiredThe full key. Returned once: store it now.
Errors
invalid_requestunauthorizedforbiddenupgrade_requiredidempotency_conflictidempotency_in_progressrate_limitedserver_error
Request
curl -X POST "https://app.zentiqai.com/v1/keys" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.createKey();import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.create_key()Example answer
{
"data": {
"id": "key_cmfq2b7x10000abcd1234",
"name": "Zoe",
"prefix": "zq_live_ab12",
"scopes": [
"…"
],
"apiVersion": "2026-07-08",
"createdBy": "…"
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/keys/{id}Revoke an API key (effective immediately)
The key stops working on its next request. A key can revoke itself.
Path parameters
idstringrequiredAPI key id (
key_…); the id without its prefix is accepted too.
Returns
200 Revoked. data is KeyRevoked.
Fields of data
revokedtruerequiredidstringrequiredAPI key id (
key_…).pattern `^key_.*`
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundrate_limitedserver_error
Request
curl -X DELETE "https://app.zentiqai.com/v1/keys/key_123" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.revokeKey("key_123");import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.revoke_key("key_123")Example answer
{
"data": {
"revoked": true,
"id": "key_cmfq2b7x10000abcd1234"
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}