---
title: "PATCH /api/user/undo/"
method: PATCH
path: "/api/user/undo/"
tags: ["User"]
---

# PATCH /api/user/undo/

`PATCH /api/user/undo/`

undoes the latest undoable action performed by the user making the request. a ClientSessionId header must be provided and only actions which were performed the same user with the same ClientSessionId value set on the api request that performed the action will be undone.Additionally the ClientSessionId header must be between 1 and 256 characters long and must only contain alphanumeric or the - characters.

## Headers

- `ClientSessionId` string, uuid, required

## Request body

- PatchedUndoRedoRequest
  - `scopes` ActionScopes — Mixin to a DRF serializer class to raise an exception if data with unknown fields is provided to the serializer.
    - `root` boolean, nullable — If set to true then actions registered in the root scope will be included when undoing or redoing.
    - `workspace` integer, nullable — If set to a workspaces id then any actions directly related to that workspace will be be included when undoing or redoing.
    - `application` integer, nullable — If set to an applications id then any actions directly related to that application will be be included when undoing or redoing.
    - `table` integer, nullable — If set to a table id then any actions directly related to that table will be be included when undoing or redoing.
    - `view` integer, nullable — If set to an view id then any actions directly related to that view will be be included when undoing or redoing.
    - `page` integer, nullable — If set to a page id then any actions directly related to that page will be included when undoing or redoing.
    - `shared_page` integer, nullable — If set to a shared page id then any actions related to that builder's shared elements will be included when undoing or redoing.
    - `workflow` integer, nullable — If set to a workflow id then any actions directly related to that workflow will be be included when undoing or redoing.
    - `teams_in_workspace` integer, nullable — If set to a workspace id then any actions directly related to that workspace will be be included when undoing or redoing.

## Response `200`

- UndoRedoResponse
  - `actions` UndoRedoAction[], required
    - `action_type` string, nullable — If an action was undone/redone/skipped due to an error this field will contain the type of the action that was undone/redone.
    - `action_scope` string, nullable — If an action was undone/redone/skipped due to an error this field will contain the scope of the action that was undone/redone.
  - `result_code` string, required — Indicates the result of the undo/redo operation. Will be 'SUCCESS' on success, 'NOTHING_TO_DO' when there is no action to undo/redo and 'SKIPPED_DUE_TO_ERROR' when the undo/redo failed due to a conflict or error and was skipped over.

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/versions/0c490e5b0c7f/schema)
