Skip to main content
POST /api/v1/cloud/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",
  "type": "vault_credential",
  "vault_id": "vault_019e3bb940277f0db05ab74291acf6ef",
  "auth": {
    "type": "static_bearer",
    "mcp_server_url": "https://example.com/mcp-stream"
  },
  "display_name": null,
  "metadata": {
    "team": "docs"
  },
  "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
typestringAlways "vault_credential"
vault_idstringOwning Vault ID
authobjectSanitized authentication details; secrets are never returned
display_namenullCurrently always null
metadataobjectCustom metadata object stored with the credential; defaults to {}
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.