POST /v1/vaults/{vault_id}/credentials/{credential_id}/archive
Archives an active credential in the specified Vault. Archived credentials are excluded from credential lists by default, but can be included with include_archived=true.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
vault_id | string | Yes | Vault ID with the vault_ prefix |
credential_id | string | Yes | Credential ID with the vcred_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Example request
Example response
HTTP 200 OK Returns the archived credential. The response never includesaccess_token.
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Credential unique identifier with the vcred_ prefix |
vault_id | string | Owning Vault ID |
mcp_server_url | string | MCP server URL |
protocol | string | Protocol type: streamable_http |
type | string | Credential type: static_bearer |
status | string | "archived" after archiving |
archived_at | string | Archive time (ISO 8601) |
created_at | string | Creation time (ISO 8601) |
updated_at | string | Last update time (ISO 8601) |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 401 | TOKEN_INVALID | Missing or invalid authentication token |
| 404 | not_found_error | Vault or credential does not exist |
| 409 | conflict_error | Credential is already archived |
Related
Authenticate with vaults
Store and inject secrets safely into agent sessions.