Skip to main content
POST
Restore an earlier version
Restore a completed DeepResearch task to a previous version n. Restore runs synchronously with no model call. It creates a new head version whose content matches version n and returns { "version", "restored_from" }. History is never deleted, so every intermediate version remains readable via List versions and Get status with ?version=N. Only the task owner can restore a version (403 for shared or public viewers). Only one edit or restore can run at a time per task; if an edit is in progress, the endpoint returns 409 with edit.in_progress.

Authorizations

X-API-Key
string
header
required

API key for authentication. Get yours at platform.valyu.ai.

Path Parameters

id
string
required

DeepResearch task ID.

n
integer
required

Version number to restore.

Required range: x >= 1

Response

Version restored as a new head version.

Result of restoring an earlier version as a new head.

version
integer
required

The newly created head version number.

Required range: x >= 1
Example:

3

restored_from
integer
required

The historical version number that was restored.

Required range: x >= 1
Example:

1