Skip to main content
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

ParameterTypeRequiredDescription
vault_idstringYesVault ID with the vault_ prefix
credential_idstringYesCredential ID with the vcred_ prefix

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_PAT

Example request

curl -X POST "https://api.qoder.com/api/v1/cloud/vaults/vault_019e3bb940277f0db05ab74291acf6ef/credentials/vcred_019e3bb98877759e862750b495c1fce8/archive" \
  -H "Authorization: Bearer $QODER_PAT"

Example response

HTTP 200 OK Returns the archived credential. The response never includes access_token.
{
  "id": "vcred_019e3bb98877759e862750b495c1fce8",
  "vault_id": "vault_019e3bb940277f0db05ab74291acf6ef",
  "mcp_server_url": "https://example.com/mcp-stream",
  "protocol": "streamable_http",
  "type": "static_bearer",
  "status": "archived",
  "archived_at": "2026-05-18T15:45:35.387093Z",
  "created_at": "2026-05-18T15:34:35.387093Z",
  "updated_at": "2026-05-18T15:45:35.387093Z"
}

Response fields

FieldTypeDescription
idstringCredential unique identifier with the vcred_ prefix
vault_idstringOwning Vault ID
mcp_server_urlstringMCP server URL
protocolstringProtocol type: streamable_http
typestringCredential type: static_bearer
statusstring"archived" after archiving
archived_atstringArchive time (ISO 8601)
created_atstringCreation time (ISO 8601)
updated_atstringLast update time (ISO 8601)

Errors

HTTPTypeTrigger
401TOKEN_INVALIDMissing or invalid authentication token
404not_found_errorVault or credential does not exist
409conflict_errorCredential is already archived
See Errors for the full error envelope.

Authenticate with vaults

Store and inject secrets safely into agent sessions.