Санҷиши ҳаққоният
Kaliti API-ро ҳамчун рамзи доранда (bearer token) фиристед. Калит бояд дорои иҷозати mcp.manage бошад; калиди бидуни он бо хатои 403 рад карда мешавад, на 404.
Ҷое, ки рақами мушаххаси ташкилоти шумо ҷойгир аст
Ин нуқтаи поёнӣ org_id -ро ҳамчун майдон дар бадани JSON мегирад.
Rakami муайянкунандаи ташкилоти шумо дар экрани калидҳои API дар панели идоракунии шумо, дар паҳлӯи худи калид ҷойгир аст. Ин як раками муайянкунанда дар ҳар یک дархосте, ки шумо иҷро мекунед, якхела аст.
Санҷидан
Ҳар чизро дар қаavски кунҷӣ бо қиматҳои худ ва ҷойи нигоҳдорандаи калидро бо калима аз панели идоракунии худ иваз кунед.
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[]> }'Воarid шудаед? Консоли API дар панели идоракунии шумо рақами мушаххаси ташкилоти воқеӣ ва калиди худро пур мекунад ва дархостро бар зидди API-и фаъол иҷро мекунад, то шумо посухи воқеиро бубинед. Ин нуқтаи ниҳоиро дар консоли API кушоед
Тафсилот
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`.
Ҷисми дархост
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
name | string | Бале | — |
client | McpClient | Не | The AI client a connection is for (informational). |
scopes | string[] | Бале | 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 | Не | — |
org_id | Uuid | null | Не | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | Не | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | Не | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Не | — |
Ҷавоб
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
id | Uuid | Бале | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Бале | — |
client | McpClient | Бале | The AI client a connection is for (informational). |
prefix | string | Бале | The token's public lookup prefix (not a secret). |
scopes | string[] | Бале | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | Бале | — |
spend_cap_minor | integer | null | Не | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | Не | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Бале | The rolling window the spend cap applies over. |
last_used_at | string | null | Не | — |
revoked_at | string | null | Не | — |
created_at | string | Бале | — |
token | string | Бале | The full `zmcp_…` token, shown exactly once. |
endpoint | string | Бале | The MCP protocol endpoint URL to configure in the AI client. |
config | object | Бале | A paste-ready MCP client config snippet embedding the endpoint + token. |
Хатоҳое, ки ин нуқтаи ниҳоӣ метавонад баргардонад
401 · 403 · 422 · 429