> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive a vault

> Archive a vault. Archived vaults are not used for active work but remain queryable.

`POST /api/v1/cloud/vaults/{vault_id}/archive`

Archives the specified vault. Archived vaults are no longer used for active work but remain queryable.

## Path parameters

| Parameter  | Type   | Required | Description             |
| ---------- | ------ | -------- | ----------------------- |
| `vault_id` | string | Yes      | Vault unique identifier |

## Headers

| Header          | Required | Description         |
| --------------- | -------- | ------------------- |
| `Authorization` | Yes      | `Bearer $QODER_PAT` |

No request body is required.

## Example request

```bash theme={null}
curl -X POST https://api.qoder.com/api/v1/cloud/vaults/vault_019e3bb940277f0db05ab74291acf6ef/archive \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "id": "vault_019e3bb940277f0db05ab74291acf6ef",
  "type": "vault",
  "display_name": "my-mcp-vault",
  "metadata": {},
  "archived_at": "2026-05-18T15:34:35.630693Z",
  "created_at": "2026-05-18T15:34:16.874877Z",
  "updated_at": "2026-05-18T15:34:35.630693Z"
}
```

## Response field changes

The response is a Vault object with the same fields as [Get a vault](/cloud-agents/api/vaults/get).

After a successful archive:

* `archived_at` records the archive time
* `updated_at` is refreshed to the archive operation time

## Errors

| HTTP | Type              | Trigger                                   |
| ---- | ----------------- | ----------------------------------------- |
| 401  | `TOKEN_INVALID`   | Missing or invalid authentication token   |
| 404  | `not_found_error` | Vault does not exist or is not accessible |

See [Errors](/cloud-agents/api/conventions/errors) for the full error envelope.

## Related

<CardGroup cols={2}>
  <Card title="Authenticate with vaults" icon="key" href="/cloud-agents/vaults">
    Store and inject secrets safely into agent sessions.
  </Card>
</CardGroup>
