---
title: "Revert schema to a version (as a patch)"
method: POST
path: "/schema/patch/{table}/revert-to-version"
tags: ["Schema Patches"]
---

# Revert schema to a version (as a patch)

`POST /schema/patch/{table}/revert-to-version`

## Request

- Base URL: `https://api.lytics.io/v2`
- URL: `https://api.lytics.io/v2/schema/patch/{table}/revert-to-version`
- Auth: API key in header `Authorization`

Creates a patch that reverts the live schema to the given published version, for the user to review and publish. Non-destructive until published.

## Path parameters

- `table` string, required

## Query parameters

- `account_id` string
- `version_id` string, required

## Response `200`

Revert patch result

- object
  - `_meta` object: Response Metadata
  - `data` object: Response Payload
    - `patch_id` string
    - `reverted` boolean
  - `request_id` string
  - `status` integer: HTTP Status Code

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-11-03** `d8e975057aec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lytics/apis/lytics-api/changes/schema/patch/:table/revert-to-version/post.md)

---

[API](https://skmtc.dev/lytics/apis/lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/lytics-api/revisions/d8e975057aec?raw)
