---
title: "List Deleted Items"
method: POST
path: "/deletedItems/{entityId}/list"
tags: ["Deleted Items"]
---

# List Deleted Items

`POST /deletedItems/{entityId}/list`

## Request

- Base URL: `https://api.gigwell.com/api`
- URL: `https://api.gigwell.com/api/deletedItems/{entityId}/list`
- Auth: HTTP bearer

Returns the items deleted from the organization identified by `entityId` — bookings, events, bookingless events, invoices, settlement messages and tasks — with what each item was and when it was deleted, newest deletion first.

`entityId` is the same identifier [List Organization Members](./list-members) returns for each of your memberships, and each read is scoped to the agency in the path: entries recorded for one agency are never returned for another. The stream reflects items currently deleted, not a deletion audit trail — restoring an item removes its entry, and a later deletion of the same item records a fresh one. The caller must hold the owner role on that organization; other members are refused with HTTP 403.

The request body is optional; when omitted the newest page of all types is returned. `types` narrows the stream to the listed types (case-insensitive, an unknown literal is refused with HTTP 400) and `limit` sets the page size between 1 and 200, defaulting to 50.

To get the next page, send the previous response's `nextCursor` back unchanged as `cursor`, and repeat until `nextCursor` comes back null. The cursor holds your place in the newest-first list, not a copy of it: an item restored before you reach it will not appear, and items deleted while you page, including ones deleted again, go to the top, where you will see them the next time you start from the newest page. A page can hold fewer than `limit` entries, or none, and still carry a `nextCursor`. This happens most often when `types` matches only a few items, because each call stops after looking through a limited number of deleted items. A short or empty page is not the end of the list; only a null `nextCursor` is.

Each entry carries the item `type`, its `itemId`, the owning `bookingId` where one exists (null for a bookingless event, and for a task with no linked booking), a human-readable `reference` built at delete time, and `deletedAt`. Treat `reference` as display text, not a parseable format. A deleted booking no longer appears in [Run Report](./run-custom-filtered-export) output, so this list is how you learn that a booking you reported on earlier was deleted.

## Path parameters

- `entityId` string, required

## Request body

- ListDeletedItemsRequest
  - `types` string[], nullable: Optional list of deleted-item types to return, case-insensitive. Omit it or send [] for all types. An unknown value or a null element is refused with HTTP 400.
  - `limit` integer, nullable: Optional page size from 1 to 200, default 50. A value outside that range is refused with HTTP 400.
  - `cursor` string, nullable: Opaque continuation token: pass the previous page's nextCursor. A malformed token is refused with HTTP 400; a blank token reads as absent and returns the newest page.

## Response `200`

OK

- ListDeletedItemsResponse
  - `status` 'OK' | 'FAIL' | 'ERROR'
  - `code` string, nullable: ResultCode enum name (e.g. SUCCESS, NOT_FOUND, RATE_LIMIT_EXCEEDED)
  - `message` string, nullable: Result message: OK on success; the error text when status is FAIL or ERROR.
  - `messages` string[], nullable: In rare, specific cases, additional error messages.
  - `data` object
    - `entries` object[]: The deleted items in this page, newest deletion first.
      - `type` 'booking' | 'event' | 'bookingless_event' | 'invoice' | 'settlement_message' | 'task': What the deleted item was: booking, event, bookingless_event, invoice, settlement_message or task.
      - `itemId` string: The deleted item's identifier within its `type`.
      - `bookingId` string, nullable: The owning booking id where one exists, null for a bookingless event and for a task with no linked booking.
      - `reference` string: Human-readable label built at delete time, ending in the item id. Display text, not a parseable format.
      - `deletedAt` string: When the item was deleted, an ISO-8601 UTC instant; newest first.
    - `nextCursor` string, nullable: Continuation token for the next page; null only at the end of the stream. A page shorter than `limit`, even an empty one, can still carry a token; keep paging until this is null.
  - `requestId` string, nullable: A request correlation id generated by the server.

## Changes

- **2026-10-30** `f761a02f0202`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gigwell/apis/gigwell-public-api/changes/deletedItems/:entityId/list/post.md)

---

[API](https://skmtc.dev/gigwell/apis/gigwell-public-api.md) - [All operations](https://skmtc.dev/gigwell/apis/gigwell-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gigwell/apis/gigwell-public-api/revisions/0e75f0ca0803?raw)
