---
title: "Update any scheduled task — status and metadata only (admin only)."
method: PUT
path: "/admin/scheduled_tasks/{task_id}"
tags: ["Scheduled Tasks"]
---

# Update any scheduled task — status and metadata only (admin only).

`PUT /admin/scheduled_tasks/{task_id}`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/admin/scheduled_tasks/{task_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/admin/scheduled_tasks/:task_id/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `task_id` string, required

## Request body

- ScheduledTaskAdminUpdateRequest: Admin partial update — status and metadata only. max_executions and expires_at are intentionally NOT settable here (the admin SQL does not honor the clear-sentinels), matching the UI's admin update which only changes status.
  - `name` string
  - `description` string
  - `schedule_type` 'once' | 'recurring' | 'interval'
  - `schedule_expression` string
  - `task_type` 'chat_completion' | 'agent_task'
  - `task_config` object
  - `status` 'active' | 'paused' | 'completed' | 'expired'
  - `notification_email` string

## Response `200`

OK

- ScheduledTaskUpdateStatusResponse
  - `status` string

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden
- `404`: Not found
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
