Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Бұл соңғы нүкте сипаттамада арнайы рұқсатты көрсетпейді, сондықтан болжағаннан гөрі кілтіңізге қажетті ең аз рұқсатты беріп, жауапты тексеріңіз.
Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.
Әрекет етіп көру
Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.
curl -X POST https://api.zinndigital.com/v1/orgs \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "type": <OrgType>, "name": <string> }'Жүйеге кіргенсіз бе? Бақылау тақтасындағы API консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған API арқылы орындайды. Бұл соңғы нүктені API консолінде ашыңыз
Мәліметтер
Creates a child organization under the caller's org (reseller creating a client, etc.). Send an `Idempotency-Key` so retries never create duplicates (docs/09 §2).
Параметрлер
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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. |
Сұрау денесі
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
type | OrgType | Иә | Organization type in the tenancy tree. |
parent_org_id | Uuid | null | Жоқ | Defaults to the caller's org when omitted. |
name | string | Иә | — |
default_currency | CurrencyCode | Жоқ | — |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
id | Uuid | Иә | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
type | OrgType | Иә | Organization type in the tenancy tree. |
parent_org_id | Uuid | null | Жоқ | Parent in the tenancy tree; null for a top-level org. |
name | string | Иә | — |
brand_id | object | Жоқ | White-label brand applied to this org's surfaces. |
default_currency | CurrencyCode | Иә | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
status | string<active, suspended, closed> | Иә | — |
created_at | string | Иә | — |
Бұл соңғы нүкте қайтара алатын қателер
401 · 403 · 409 · 422 · 429