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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Unarchive cloud task

> Restore an archived Codex cloud task.

`unarchiveCodexCloudTask` restores a task archived with `archiveCodexCloudTask`.

```ts automations/unarchive-codex-task.automation.ts theme={null}
import { automation, onSchedule } from "automate.ax"
import { unarchiveCodexCloudTask } from "automate.ax/codex"

export default automation("Restore Codex task", () => {
  onSchedule({ schedule: "0 9 * * 1" })
  unarchiveCodexCloudTask({ taskId: "task_e_abc123" })
})
```

The restored task appears in subsequent `listCodexCloudTasks` results. Optional second argument `{ account }` defaults to the project binding.

<Warning>
  Codex Cloud does not currently provide an official public REST API. This
  action calls undocumented ChatGPT backend endpoints that may change without
  notice.
</Warning>
