Archives a specified Credential. Once archived, the Credential is no longer injected into sessions but can still be queried and restored. The archived_at field in the response is set to the archive time.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
POST /vaults/{vault_id}/credentials/{credential_id}/archive
Path parameters
| Field | Required | Type | Description |
|---|---|---|---|
vault_id | Yes | string | Vault ID, format vlt_xxx |
credential_id | Yes | string | Credential ID, format cred_xxx |
Request example
Response example
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Credential ID, format cred_xxx |
type | string | Always credential |
vault_id | string | Vault ID that the Credential belongs to |
display_name | string | Human-readable name of the Credential |
auth | object | Authentication information with sensitive values masked |
metadata | object | Custom key-value pairs |
archived_at | string | Archive timestamp, ISO 8601 |
created_at | string | Creation time, ISO 8601 |
updated_at | string | Last update time, ISO 8601 |
request_id | string | Unique request identifier |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid |
| 401 | InvalidApiKey | Invalid API key provided |