---
title: "Revert -- creates a NEW commit copying a past version's snapshot. History is never rewritten."
method: POST
path: "/entries/{entryId}/reverts"
tags: ["Versions"]
---

# Revert -- creates a NEW commit copying a past version's snapshot. History is never rewritten.

`POST /entries/{entryId}/reverts`

## Request

- Base URL: `https://whatareyoudo.ing/api/v1`
- URL: `https://whatareyoudo.ing/api/v1/entries/{entryId}/reverts`
- Auth: HTTP bearer

## Path parameters

- `entryId` string, uuid, required

## Request body

- RevertRequest
  - `targetVersionId` string, uuid, required
  - `commitMessage` string, nullable
  - `expectedHeadCommitId` string, uuid, nullable

## Response `201`

Created

- object
  - `data` object, required
    - `headCommitId` string, uuid, required
  - `meta` object, required
    - `requestId` string, required

## Other responses

- `409`: VERSION_CONFLICT -- expectedHeadCommitId didn't match the current head

---

[API](https://skmtc.dev/whatareyoudo/apis/whatcha-api.md) · [All operations](https://skmtc.dev/whatareyoudo/apis/whatcha-api/llms.txt) · [OpenAPI document](https://skmtc.dev/whatareyoudo/apis/whatcha-api/revisions/48dd8a54abea?raw)
