احراز هویت
یک کلید 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).
پارامترها
| نام | نوع | الزامی | چیست |
|---|---|---|---|
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. |
بدنه درخواست
| نام | نوع | الزامی | چیست |
|---|---|---|---|
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 | خیر | — |
پاسخ
| نام | نوع | الزامی | چیست |
|---|---|---|---|
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