POST /v1/vaults
Creates a new Vault. A Vault is used to securely store credentials for MCP servers. At least one credential must be provided when creating a vault.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Content-Type | Yes | application/json |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
display_name | string | Yes | Vault display name |
credentials | array | Yes | Array of credentials. Must contain at least one credential object |
credentials array element
| Field | Type | Required | Description |
|---|---|---|---|
mcp_server_url | string | Yes | MCP server URL |
protocol | string | Yes | Protocol type. One of: sse, streamable_http |
type | string | Yes | Credential type. Currently only static_bearer is supported |
access_token | string | Yes | Access token (required for static_bearer type) |
Example request
Example response
HTTP 201 CreatedErrors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Missing credentials array: “At least one credential is required when creating a vault.” |
| 400 | invalid_request_error | Missing access_token: “Field ‘access_token’ is required for static_bearer type.” |
| 401 | TOKEN_INVALID | Missing or invalid authentication token |