Упълномощаване
Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението mcp.manage; ключ без него се отхвърля с 403, а не с 404.
Където отива идентификаторът на вашата организация
Този краен пункт приема org_id като поле в JSON тялото.
ИД на вашата организация се намира на екрана с API ключове във вашето табло за управление, до самия ключ. Това е същият ИД във всяко заявка, която правите.
Опитайте
Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.
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[]> }'Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в 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. |
Грешки, които този крайpoint може да върне
401 · 403 · 422 · 429