Autentifikatsiya
API kalitini bearer token sifatida yuboring. Kalit mcp.manage ruxsatiga ega boʻlishi shart; ruxsatsiz kalit 404 emas, balki 403 xatosi bilan rad etiladi.
Tashkilotingiz identifikatori kiritiladigan joy
Ushbu so'rov JSON tanasida org_id ni maydon sifatida qabul qiladi.
Tashkilotingiz identifikatori boshqaruv panelingizdagi API kalitlari ekranida, kalitning o'z yonida joylashgan. Bu siz amalga oshiradigan har bir so'rovda bir xil identifikator hisoblanadi.
Sinab ko'rish
Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.
curl -X POST https://api.zinndigital.com/v1/mcp/connections \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "scopes": <string[]> }'Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching
Tafsilotlar
Mints a per-tool MCP connection and returns the full `zmcp_…` token **once** (only its hash is stored) plus a paste-ready client config snippet. The requested `scopes` must be permissions the caller already holds in the target org — an unheld scope is a `403` (a connection can never out-scope its creator), an unknown one a `422`. An optional spend cap bounds AI-triggered paid actions. Requires `mcp.manage`.
Soʻrov tanasi
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
name | string | Ha | — |
client | McpClient | Yo'q | The AI client a connection is for (informational). |
scopes | string[] | Ha | RBAC permission keys to grant the token. Each must be a permission the caller holds in the target org (a connection can never out-scope its creator); an unheld scope is a `403`,… |
sandbox | boolean | Yo'q | — |
org_id | Uuid | null | Yo'q | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | Yo'q | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | Yo'q | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Yo'q | — |
Javob
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
id | Uuid | Ha | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Ha | — |
client | McpClient | Ha | The AI client a connection is for (informational). |
prefix | string | Ha | The token's public lookup prefix (not a secret). |
scopes | string[] | Ha | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | Ha | — |
spend_cap_minor | integer | null | Yo'q | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | Yo'q | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Ha | The rolling window the spend cap applies over. |
last_used_at | string | null | Yo'q | — |
revoked_at | string | null | Yo'q | — |
created_at | string | Ha | — |
token | string | Ha | The full `zmcp_…` token, shown exactly once. |
endpoint | string | Ha | The MCP protocol endpoint URL to configure in the AI client. |
config | object | Ha | A paste-ready MCP client config snippet embedding the endpoint + token. |
Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar
401 · 403 · 422 · 429