การยืนยันตัวตน
ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ mcp.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404
ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ
Endpoint นี้รับ org_id เป็นฟิลด์ใน JSON body
รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ 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`.
เนื้อหาคำขอ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
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