> ## 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.

# Vault のアーカイブ

> Vault をアーカイブします。アーカイブ済み Vault は活発な使用には参加しませんが、引き続き照会できます。

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

指定された Vault をアーカイブします。アーカイブ済みの Vault は活発な使用には参加しませんが、引き続き照会できます。

## パスパラメータ

| パラメータ      | 型      | 必須 | 説明           |
| ---------- | ------ | -- | ------------ |
| `vault_id` | string | はい | Vault の一意識別子 |

## ヘッダー

| ヘッダー            | 必須 | 説明                  |
| --------------- | -- | ------------------- |
| `Authorization` | はい | `Bearer $QODER_PAT` |

リクエストボディは不要です。

## リクエスト例

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

## レスポンス例

**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"
}
```

## レスポンスフィールドの変化

レスポンスは [Vault の取得](/ja/cloud-agents/api/vaults/get) と同じフィールドを持つ Vault オブジェクトです。

アーカイブ成功後:

* `archived_at` がアーカイブ時刻を記録
* `updated_at` がアーカイブ操作時刻に更新

## エラー

| HTTP | type              | トリガー条件                |
| ---- | ----------------- | --------------------- |
| 401  | `TOKEN_INVALID`   | 認証トークンが欠落または無効        |
| 404  | `not_found_error` | Vault が存在しないまたはアクセス不可 |

エラーエンベロープの詳細については[エラーリファレンス](/ja/cloud-agents/api/conventions/errors)を参照してください。

## 関連項目

<CardGroup cols={2}>
  <Card title="Vaults" icon="key" href="/ja/cloud-agents/vaults">
    シークレットを安全に保存し、Agent Session に注入する。
  </Card>
</CardGroup>
