# Undo my last change

Takes back the signed-in person's latest change in this workspace — whatever it was: a cell edit, a created or deleted record (it comes back with its trail, groups and follows), a bulk convert, a setting — or, with `?op=<id>` from get.undo.history, that one. Call it ONLY when the person asks to undo or reverse something; never on your own initiative. Answers {undone, op, label, notUndone}: notUndone names what already left and cannot be called back (texts or emails sent, changes already synced, notifications already read) — say those out loud. 404 when there is nothing of theirs to undo; 409 undo_refused with a sentence when something it changed has been changed again since — the undo never overwrites a later edit, so tell the person which change to undo first.

Access class: `workspace`.

## Endpoint

`POST /v1/undo/last`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| op | query | string | No |

## Request body

Content type: `application/json`.

```json
{}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "label": "string",
    "notUndone": [
      "string"
    ],
    "op": {
      "actor": "string",
      "changes": 1.5,
      "createdAt": "2026-01-01T00:00:00Z",
      "id": "",
      "label": "string",
      "route": "string",
      "undoneAt": "2026-01-01T00:00:00Z"
    },
    "undone": true
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
