---
title: "Restore Video API — Put Back an Earlier Version | Pogclip Docs"
description: "Restore any earlier version of a Pogclip video as a new version and return its script, timing and active layers."
url: https://pogclip.com/docs/restore-video
---

# Put back an earlier version

Restores an earlier version of a video as a new version and returns its script. Every cut, caption change and layer edit returns a `previousVersion` you can restore at any time.

|          |                                        |
| -------- | -------------------------------------- |
| MCP tool | `restore_video`                        |
| API      | `POST /api/v1/videos/{clipId}/restore` |
| Credits  | Free                                   |

## When to use it

- Call when a cut, caption or layer edit went wrong and you want an earlier version back.
- Use `previousVersion` from [`cut_video`](https://pogclip.com/docs/cut-video), [`edit_captions`](https://pogclip.com/docs/edit-captions) or [`edit_layers`](https://pogclip.com/docs/edit-layers), or any earlier version number down to `0`.

## Parameters

| Name      | Type    | Required | What it is                                                  |
| --------- | ------- | -------- | ----------------------------------------------------------- |
| `clipId`  | string  | Yes      | The clipId from open\_video, or a clip ID from list\_clips. |
| `version` | integer | Yes      | The version to put back, such as previousVersion.           |

## Call it from an AI agent

```json
{
  "name": "restore_video",
  "arguments": {
    "clipId": "f8669b08",
    "version": 0
  }
}
```

## Call it from your code

```bash
curl -X POST https://pogclip.com/api/v1/videos/f8669b08/restore \
  -H "Authorization: Bearer $POGCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version": 0}'
```

## What you get back

```json
{
  "clipId": "f8669b08",
  "name": "Why I started filming again",
  "pageUrl": "https://pogclip.com/dashboard/projects/8e4ed643?clip=f8669b08",
  "downloadPageUrl": "https://pogclip.com/dashboard/projects/8e4ed643?download=f8669b08",
  "status": "ready",
  "version": 4,
  "durationSeconds": 510,
  "script": [
    {
      "line": 1,
      "start": 0.1,
      "end": 2,
      "text": "Okay, here's the deal."
    },
    {
      "line": 2,
      "start": 2.3,
      "end": 8.1,
      "text": "I want to show you what I got wrong."
    }
  ],
  "next": "Cuts name these line numbers and this version. Cutting uses no credits."
}
```

The example above shows only the first two lines of `script`.

- `version`: restoring creates a newer version number (such as `4` when restoring `0`); use this new `version` for later edits.
- `script` and `layers`: reflect the restored video as it plays now (`layers` appears only if that version has layers).
- `next`: confirms the restored script is ready for new edits.

## Errors

| Code              | What it means                                                     |
| ----------------- | ----------------------------------------------------------------- |
| `not_found`       | There is no such video on the account, or it has no such version. |
| `invalid_request` | A field is missing or wrong. The message says which.              |
| `unauthorized`    | The API key or sign-in is missing, wrong or revoked.              |
| `rate_limited`    | More than 60 requests in a minute. Wait for `retryAfterSeconds`.  |

## Related

- [Cut a video by its script](https://pogclip.com/docs/cut-video)
- [Read the script](https://pogclip.com/docs/get-script)
- [Change captions](https://pogclip.com/docs/edit-captions)
