Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Кілтте mcp.manage рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.
Ұйымыңыздың идентификаторы орналасатын жер
Бұл соңғы нүкте JSON корпусында өріс ретінде org_id қабылдайды.
Сіздің ұйым идентификаторыңыз басқару панеліндегі 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 арқылы орындайды. Бұл соңғы нүктені 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`.
Сұрау денесі
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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 | Жоқ | — |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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