Creates a new vault. A vault securely stores access credentials for MCP servers, and must be created with at least one credential.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
Bearer token used to authenticate the request. Format: |
|
|
Yes |
Must be |
Request body
|
Field |
Type |
Required |
Description |
|
|
string |
Yes |
Human-readable display name for the vault. |
|
|
array |
Yes |
Credentials to attach on creation. Must contain at least one credential object. |
Each element of the credentials array has the following fields:
|
Field |
Type |
Required |
Description |
|
|
string |
Yes |
URL of the MCP server this credential authorizes. |
|
|
string |
Yes |
Transport protocol. One of |
|
|
string |
Yes |
Credential type. Currently only |
|
|
string |
Yes |
Access token used by the MCP server. Required when |
Example request
curl -X POST "https://api.qoder.com.cn/api/v1/cloud/vaults" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"display_name": "my-mcp-vault",
"credentials": [
{
"mcp_server_url": "https://example.com/mcp",
"protocol": "sse",
"type": "static_bearer",
"access_token": "your-access-token"
}
]
}'
Example response
HTTP 201 Created
{
"id": "vault_019e3bb940277f0db05ab74291acf6ef",
"type": "vault",
"display_name": "my-mcp-vault",
"status": "active",
"metadata": {},
"credentials": [
{
"id": "vcred_019e3bb940297658a632dbf920057eff",
"vault_id": "vault_019e3bb940277f0db05ab74291acf6ef",
"mcp_server_url": "https://example.com/mcp",
"protocol": "sse",
"type": "static_bearer",
"status": "active",
"created_at": "2026-05-18T15:34:16.876188Z",
"updated_at": "2026-05-18T15:34:16.876188Z"
}
],
"created_at": "2026-05-18T15:34:16.874877Z",
"updated_at": "2026-05-18T15:34:16.874877Z"
}
Errors
|
HTTP |
Type |
Trigger |
|
400 |
|
Missing |
|
400 |
|
Missing |
|
401 |
|
The authentication token is missing or invalid. |
For the full error envelope, see Errors.