Баталгаажуулалт
API түлхүүрийг bearer token хэлбэрээр илгөэнэ үү. Түлхүүр нь mcp.manage эрхтэй байх ёстой бөгөөд үүнгүйгээр 404 биш, харин 403 алдаа буцааж татгалзах болно.
Таны байгууллагын дугаар орох газар
Энэ төгсгөлийн цэг нь JSON бие хэсэгт org_id-ийг талбар болгон авдаг.
Танай байгууллагын ID нь таны хяналтын самбар дээрх API түлхүүрийн дэлгэцэнд, түлхүүр өөрөө хажууд байрладаг. Энэ нь таны хийх дуудлага бүрт ижил ID байна.
Туршиж үзэх
Өнцөг хаалтанд байгаа бүх зүйлийг өөрийн утгаар солиж, түлхүүр санамж байрлуулагчийг хяналтын самбарынхаа түлхүүрээр сольж оруулна уу.
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 консол нь таны бодит байгууллагын ID болон өөрийн түлхүүрийг автоматаар бөглөж, шууд ажиллаж буй 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