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

# Restore Version

> POST /v1/documents/{document_id}/versions/{version_number}/restore

# Restore Version

```
POST /v1/documents/{document_id}/versions/{version_number}/restore
```

Restore a previous version as the new latest. This creates a new version with the content from the specified version.

## Request

### Headers

| Header      | Required | Description  |
| ----------- | -------- | ------------ |
| `X-API-Key` | Yes      | Your API key |

### Path Parameters

| Parameter        | Type    | Required | Description                   |
| ---------------- | ------- | -------- | ----------------------------- |
| `document_id`    | string  | Yes      | The document ID               |
| `version_number` | integer | Yes      | The version number to restore |

### Example

```bash theme={null}
curl -X POST https://api.surfacedocs.dev/v1/documents/doc_abc123/versions/1/restore \
  -H "X-API-Key: sd_live_..."
```

## Response

**Status: 201 Created**

```json theme={null}
{
  "id": "doc_abc123",
  "url": "https://app.surfacedocs.dev/d/doc_abc123",
  "version": 4,
  "version_count": 4,
  "title": "Daily Report — Feb 13",
  "block_count": 2,
  "created_at": "2026-02-14T11:00:00Z"
}
```
