ప్రమాణీకరణ
బీయర్ టోకెన్గా API కీని పంపండి. కీ తప్పనిసరిగా apikeys.manage అనుమతిని కలిగి ఉండాలి; అది లేని కీని 404 కాకుండా 403తో తిరస్కరిస్తారు.
మీ సంస్థ ఐడీ ఎక్కడ ఉందో అక్కడ
ఈ ఎండ్పాయింట్ JSON బాడీలో ఫీల్డ్గా org_id ని తీసుకుంటుంది.
మీ సంస్థ ఐడి (organisation id) మీ డాష్బోర్డ్లోని API కీస్ స్క్రీన్పై, కీ పక్కనే ఉంటుంది. మీరు చేసే ప్రతి కాల్లోనూ ఇదే ఐడి ఉపయోగించబడుతుంది.
ప్రయత్నించండి
కోణీయ బ్రాకెట్లలో ఉన్న దేన్నైనా మీ స్వంత విలువలతో భర్తీ చేయండి, మరియు కీ ప్లేస్హోల్డర్ను మీ డాష్బోర్డ్ నుండి తీసుకున్న కీతో భర్తీ చేయండి.
curl -X POST https://api.zinndigital.com/v1/api-keys \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'సైన్ ఇన్ చేశారా? మీ డ్యాష్బోర్డ్లోని API కాన్సోల్ మీ అసలైన సంస్థ ID మరియు మీ స్వంత కీని నింపుతుంది, అలాగే మీరు అసలైన ప్రతిస్పందనను చూడటానికి లైవ్ 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. |
అభ్యర్థన బాడీ
| పేరు | రకం | కావలసినది | ఇది ఏమిటి |
|---|---|---|---|
name | string | అవును | — |
scopes | string[] | కాదు | 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… |
sandbox | boolean | కాదు | Mint a sandbox (test-mode) key. Defaults to false. |
org_id | Uuid | null | కాదు | The organization the key belongs to. Defaults to the caller's org; the caller must hold `apikeys.manage` in the target org. |
స్పందన
| పేరు | రకం | కావలసినది | ఇది ఏమిటి |
|---|---|---|---|
id | Uuid | అవును | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | అవును | — |
prefix | string | అవును | The key's public lookup id (the middle segment of the token). |
scopes | string[] | అవును | The RBAC permission keys this key may exercise. |
sandbox | boolean | అవును | A sandbox (test-mode) key suppresses billing + provisioning (docs/09 §2). |
last_used_at | object | కాదు | When the key last authenticated a request; null if never used. |
revoked_at | object | కాదు | Always null on a listed/fetched key — revoked keys are not returned. |
created_at | string | అవును | — |
token | string | అవును | 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