---
title: "Undo deletion"
description: "Reverse a DELETE by repeating it with undo=true — the record and its associations are restored."
canonical_url: https://developer.onepagecrm.com/api/undo-deletion/
source: Markdown mirror of https://developer.onepagecrm.com/api/undo-deletion/
---

Deleted the wrong record? Repeat the same `DELETE` request with
`undo=true` and it's restored.

| Parameter | Type | Description |
| --- | --- | --- |
| `undo` | boolean | When `true`, revert the delete instead of performing it |

## Example

Delete a contact:

```bash
curl -X DELETE -u "USER_ID:API_KEY" \
  "https://app.onepagecrm.com/api/v3/contacts/CONTACT_ID.json"
```

Undo that delete:

```bash
curl -X DELETE -u "USER_ID:API_KEY" \
  "https://app.onepagecrm.com/api/v3/contacts/CONTACT_ID.json?undo=true"
```

## Tips

- **Same endpoint, same id.** Undo is the delete request again with the
  `undo=true` flag — you don't need a separate "restore" call.
- **Keep the id.** You need the deleted record's id to undo, so hold onto
  it if a reversible delete matters to your flow.
- **Contacts, actions, and relationships.** These are the deletes the
  API can undo. Other records, like deals, can be restored from the
  Activity page in the app.
- **Undo is time-limited.** The restore window depends on your account's
  plan — from 1 day up to 60 days on higher plans. After the window
  closes, there is nothing left to restore and the request returns `404`.

## What to read next

- **[API reference](/api/reference/)** — the delete endpoint for each resource.
- **[Webhooks](/webhooks/overview/)** — `deleted` events fire on delete; an undo re-creates the record.
