api-keys

POST /v1/api-keys

Create an API key.

सर्व api-keys एंडपॉइंट्स

प्रमाणीकरण

बेरर टोकन म्हणून API की पाठवा. की मध्ये apikeys.manage परवानगी असणे आवश्यक आहे; ती नसलेली की 404 ऐवजी 403 सह नाकारली जाते.

जिथे तुमचा ऑर्गनायझेशन आयडी (organization id) जाईल

हा एंडपॉइंट JSON बॉडीमधील फील्ड म्हणून org_id घेतो.

तुमची संस्था आयडी (organisation id) तुमच्या डॅशबोर्डवरील API की स्क्रीनवर, की च्या बाजूला आहे. तुम्ही केलेल्या प्रत्येक कॉलमधील तोच आयडी असतो.

प्रयत्न करा

कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.

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

साइन इन केलेले आहे? तुमच्या डॅशबोर्डमधील API कन्सोल तुमची खरी संस्था आयडी आणि तुमची स्वतःची की आपोआप भरतो आणि लाइव्ह API विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा

तपशील

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`.

पॅरामीटर्स

नावप्रकारआवश्यकहे काय आहे
Idempotency-Key (header)stringनाहीClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

विनंती मुख्य भाग

नावप्रकारआवश्यकहे काय आहे
namestringहोय
scopesstring[]नाहीRBAC 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…
sandboxbooleanनाहीMint a sandbox (test-mode) key. Defaults to false.
org_idUuid | nullनाहीThe organization the key belongs to. Defaults to the caller's org; the caller must hold `apikeys.manage` in the target org.

प्रतिसाद

नावप्रकारआवश्यकहे काय आहे
idUuidहोयUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringहोय
prefixstringहोयThe key's public lookup id (the middle segment of the token).
scopesstring[]होयThe RBAC permission keys this key may exercise.
sandboxbooleanहोयA sandbox (test-mode) key suppresses billing + provisioning (docs/09 §2).
last_used_atobjectनाहीWhen the key last authenticated a request; null if never used.
revoked_atobjectनाहीAlways null on a listed/fetched key — revoked keys are not returned.
created_atstringहोय
tokenstringहोयThe full `zdk_<mode>_<prefix>_<secret>` token. Shown **once, here only** — store it now; it cannot be retrieved again, only replaced.

ही एंडपॉइंट परत करू शकेल अशा त्रुटी

401 · 403 · 409 · 422 · 429