> ## Documentation Index
> Fetch the complete documentation index at: https://trysalty.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Trash & restore

> Deleted records move to a 30-day trash and can be restored.

Deleting a record doesn't destroy it. Every `DELETE` on a record — people, companies, deals,
notes, tasks, activities, and custom-object records — **soft-deletes** it: the record moves to a
per-workspace trash, stays recoverable for **30 days**, then is permanently purged. There is
deliberately no hard-delete, so an agent can never irreversibly destroy your data.

## Endpoints

| Method | Path                             | Purpose                         |
| ------ | -------------------------------- | ------------------------------- |
| `GET`  | `/trash/{resource}`              | List trashed records of a type  |
| `POST` | `/trash/{resource}/{id}/restore` | Restore a record from the trash |

`{resource}` is one of `people`, `companies`, `deals`, `notes`, `tasks`, `activities`,
`custom-objects`. Any other value returns `400`.

## List the trash

```bash theme={null}
curl $SALTY_API/trash/people \
  -H "Authorization: Bearer $SALTY_API_KEY"
```

```json theme={null}
{
  "data": [
    {
      "id": "08e7e7d4-31ff-4456-bd99-731252edb54c",
      "resource": "people",
      "label": "Ada Lovelace",
      "deleted_at": "2026-06-23T02:00:00Z"
    }
  ]
}
```

`label` is a human-readable summary of the record (a person's name/email, a company name, a deal
name, a note snippet, …). Up to 100 most-recently-deleted records are returned.

## Restore

```bash theme={null}
curl -X POST $SALTY_API/trash/people/08e7e7d4-.../restore \
  -H "Authorization: Bearer $SALTY_API_KEY"
```

```json theme={null}
{ "id": "08e7e7d4-31ff-4456-bd99-731252edb54c", "restored": true }
```

Restoring re-counts the record against your plan's record cap. If you're already at the cap,
restore returns `402` with code `records_cap_exceeded` — free up space or upgrade, then retry.
Restoring a record that isn't in the trash returns `404`.

<Note>
  After 30 days a trashed record is hard-deleted by a daily purge and can no longer be restored.
</Note>
