# revert_contact_change

**Revert a change to a contact**

Users with access to a group · destructive

Takes back one change from [`contact_history`](https://withopenbook.com/docs/tools/contact_history): its values and name back as they were before it, refused where a field it touched or the name changed after it, so nobody’s later change is lost. With whole, puts the contact back as that change left it instead, every field you see and its name, which also undoes what changed after it. Never a photo, its groups or its notes. Needs Change history on one of its groups and edit access. The change applies across the directory, and everyone who sees the contact sees it. Show the person what will change and ask them first.

## Parameters

| Parameter | Type | Required | Limits | What |
|---|---|---|---|---|
| `contact` | `string` | required |  |  |
| `change` | `integer` | required | at least 1 | The change’s number, from [`contact_history`](https://withopenbook.com/docs/tools/contact_history). |
| `whole` | `boolean` | optional |  | true puts the contact back as the change left it, undoing later changes to the fields you see too; left out, only that one change is taken back. |

## Who can use it

Users get it once they have access to a group, and each call is checked against that access. A person’s tool list only includes it when they can use it, and clients like ChatGPT see the same list.

Annotated **destructive**, so clients like ChatGPT ask the person before calling it.

## Errors

Errors carry a stable code and a message written for people. See [errors and their status codes](https://withopenbook.com/docs/api#errors).

HTTP:

```bash
curl https://api.withopenbook.com/v1/actions/revert_contact_change \
  -H "Authorization: Bearer $OPENBOOK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "contact": "5e8b2d4f-7a1c-4e9b-8d3f-6c2a9e1b4d70",
  "change": 42
}'
```

MCP:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "revert_contact_change",
    "arguments": {
      "contact": "5e8b2d4f-7a1c-4e9b-8d3f-6c2a9e1b4d70",
      "change": 42
    }
  }
}
```

> IDs are made up. Get real ones from `my_access` and `search_contacts`, and send the person’s own OAuth token.
