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

# 恢复 Schedule

> 恢复一个 paused 的 Forward Schedule。

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

将暂停的 Schedule 恢复为 `active`。

## 请求头

| Header          | 是否必填 | 说明             |
| --------------- | ---- | -------------- |
| Authorization   | 是    | `Bearer <PAT>` |
| Idempotency-Key | 否    | 有副作用请求可选的幂等键。  |

## 路径参数

| 参数           | 类型     | 是否必填 | 说明                   |
| ------------ | ------ | ---- | -------------------- |
| schedule\_id | string | 是    | Forward Schedule ID。 |

## 示例请求

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

## 示例响应

**HTTP 200 OK**

```json theme={null}
{
  "id": "sched_019f00112233445566778899aabbccdd",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_support",
  "name": "Daily tech brief",
  "description": "Generate a daily technology news summary",
  "status": "active",
  "initial_events": [
    {
      "type": "user.message",
      "content": "Summarize current technology news in five bullet points."
    }
  ],
  "execution": {
    "session_mode": "new_session",
    "max_concurrent_runs": 1,
    "max_attempts": 1,
    "timeout_ms": 300000
  },
  "trigger_policy": {
    "type": "cron",
    "expression": "0 9 * * *",
    "timezone": "Asia/Shanghai",
    "upcoming_runs_at": [
      "2026-06-23T01:00:00Z"
    ]
  },
  "environment_id": "env_019e64e01a137caf953ac2ac7b42ec5c",
  "sinks": [],
  "metadata": {},
  "created_at": "2026-06-22T10:00:00Z",
  "updated_at": "2026-06-22T12:10:00Z"
}
```

## 响应字段

| 字段  | 类型     | 说明                                |
| --- | ------ | --------------------------------- |
| 返回值 | object | 更新后的 Schedule 对象，`status=active`。 |

## 错误

| HTTP | Type                    | Code                      | 触发条件          |
| ---- | ----------------------- | ------------------------- | ------------- |
| 404  | `not_found_error`       | `schedule_not_found`      | Schedule 不存在。 |
| 409  | `invalid_request_error` | `schedule_archived`       | Schedule 已归档。 |
| 401  | `authentication_error`  | `authentication_required` | PAT 无效或已过期。   |

## 注意事项

* 恢复不会立即创建 Schedule Run。
* 下一次计划触发时间会根据 Schedule 的 trigger policy 重新计算。

## 相关

<CardGroup cols={2}>
  <Card title="暂停 Schedule" icon="pause" href="/cloud-agents/api/forward/schedules/pause" />

  <Card title="获取 Schedule" icon="file-lines" href="/cloud-agents/api/forward/schedules/get" />
</CardGroup>
