# restoreSpaceItemVersion

Make an older version of a file you can edit current again, as a NEW version: nothing is lost; the version it replaces stays in the history.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "restoreSpaceItemVersion", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `itemId`: `ID!` (required)
- `versionId`: `ID!` (required)

## Response (data, an example)

```json
{
  "spacesMutation": {
    "restoreVersion": {
      "id": "<ID>",
      "name": "…",
      "currentVersion": {
        "id": "<ID>",
        "versionNumber": 0
      },
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "restoreSpaceItemVersion",
    "variables": {
      "itemId": "<itemId>",
      "versionId": "<versionId>"
    }
  }'
```
