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

# スケジュールをアーカイブする

> Forward Schedule をアーカイブします。

`POST /api/v1/forward/schedules/{schedule_id}/archive`

過去の Schedule Run を削除せずに Schedule をアーカイブします。アーカイブ済みのスケジュールはトリガーされず、更新、一時停止、再開、手動実行のいずれもできません。

## Headers

| Header            | Required | Description            |
| ----------------- | -------- | ---------------------- |
| `Authorization`   | Yes      | `Bearer <PAT>`         |
| `Idempotency-Key` | No       | 安全でないリクエスト向けの任意のべき等キー。 |

## Path parameters

| Parameter     | Type   | Required | Description          |
| ------------- | ------ | -------- | -------------------- |
| `schedule_id` | string | Yes      | Forward Schedule ID。 |

## Example request

```bash theme={null}
curl -s -X POST 'https://api.qoder.com/api/v1/forward/schedules/sched_019f00112233445566778899aabbccdd/archive' \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "id": "sched_019f00112233445566778899aabbccdd",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_support",
  "name": "Daily tech brief",
  "status": "active",
  "archived_at": "2026-06-22T12:00:00Z",
  "created_at": "2026-06-22T10:00:00Z",
  "updated_at": "2026-06-22T12:00:00Z"
}
```

## Response fields

`archived_at` が設定されたアーカイブ済みの Schedule オブジェクトを返します。

## Errors

| HTTP | Type                    | Code                      | Trigger                 |
| ---- | ----------------------- | ------------------------- | ----------------------- |
| 401  | `authentication_error`  | `authentication_required` | PAT が無効または期限切れです。       |
| 404  | `not_found_error`       | `schedule_not_found`      | Schedule が存在しません。       |
| 409  | `invalid_request_error` | `schedule_archived`       | Schedule はすでにアーカイブ済みです。 |

## Notes

* アーカイブは Schedule のライフサイクルにおける終了状態です。
* Schedule Run は Schedule のアーカイブ後も引き続きクエリできます。

## Related

<CardGroup cols={2}>
  <Card title="スケジュールを一覧表示する" icon="list" href="/cloud-agents/api/forward/schedules/list" />

  <Card title="スケジュール実行を一覧表示する" icon="history" href="/cloud-agents/api/forward/schedule-runs/list" />
</CardGroup>
