api-keys

POST /v1/api-keys

Create an API key.

Dukkan api-keys wuraren ƙarshe

Tabbatar da Asali

Aika maɓallin API azaman alamar ɗauka (bearer token). Dole ne maɓallin ya kasance yana da izinin apikeys.manage; idan babu shi, za a ƙi amfani da maɓallin tare da lambar 403, ba 404 ba.

Inda ID ɗin kungiyar ku ke zuwa

Wannan ma'ajiyar tana karɓar org_id a matsayin fili a cikin jikin JSON.

Ana samun lambar kungiyar ku a kan shafin maɓallan API a cikin madanninku, kusa da maɓallin kansa. Shi ne lambar da ta dace a kowane kiran da kuka yi.

Gwada

May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.

curl -X POST https://api.zinndigital.com/v1/api-keys \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string> }'

An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API

Bayani

Mints a new per-org API key and returns the full `zdk_…` token **once** — only its hash is stored, so a lost token is replaced, never recovered. The requested `scopes` must be permissions the caller already holds in the target org; asking for one you do not hold is a `403` (a key can never out-scope its creator). Send an `Idempotency-Key` so a retry after a lost response returns the same token rather than orphaning a key. Requires `apikeys.manage`.

Sigogi

SunaNau'iAna buƙataAbin da yake
Idempotency-Key (header)stringA'aClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Jikin buƙata

SunaNau'iAna buƙataAbin da yake
namestringEh
scopesstring[]A'aRBAC permission keys to grant. Each must be a permission the caller holds in the target org (a key can never out-scope its creator); an unheld scope is a `403`, an unknown one a…
sandboxbooleanA'aMint a sandbox (test-mode) key. Defaults to false.
org_idUuid | nullA'aThe organization the key belongs to. Defaults to the caller's org; the caller must hold `apikeys.manage` in the target org.

Martani

SunaNau'iAna buƙataAbin da yake
idUuidEhUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringEh
prefixstringEhThe key's public lookup id (the middle segment of the token).
scopesstring[]EhThe RBAC permission keys this key may exercise.
sandboxbooleanEhA sandbox (test-mode) key suppresses billing + provisioning (docs/09 §2).
last_used_atobjectA'aWhen the key last authenticated a request; null if never used.
revoked_atobjectA'aAlways null on a listed/fetched key — revoked keys are not returned.
created_atstringEh
tokenstringEhThe full `zdk_<mode>_<prefix>_<secret>` token. Shown **once, here only** — store it now; it cannot be retrieved again, only replaced.

Kuskuren da wannan matsaya za ta iya maido wa

401 · 403 · 409 · 422 · 429