Skip to main content
DELETE
Permanently removes a listing owned by your organization. The listing row is hard-deleted; every attached file is best-effort deleted from Supabase Storage.
Irreversible. For a recoverable removal, PATCH status="archived" instead the listing drops out of the active marketplace feed but the row and attachments stay.

Headers

string
required
Bearer tdao_live_…
string
required
Your organization’s UUID.

Path parameters

string (UUID)
required

Auth requirements

Requires the seller capability. Cross-org access returns 404 not_found.

What happens, in order

  1. Listing is fetched and ownership checked. Otherwise 404.
  2. listing.deleted audit row written with key fields snapshotted in previous_state (title, msn, listing_type, status, country).
  3. Every URL in documents[] and images[] is parsed and best-effort deleted from Supabase Storage. Individual failures are logged but don’t fail the call.
  4. The listing row is hard-deleted from the database in the same transaction as the audit write.
  5. 204 No Content returned.
No other table foreign-keys back to listings (verified across all current migrations), so there are no cascading dependents.

Response

204 No Content. Empty body.

Soft-delete alternative

The listing’s status becomes archived, it drops out of browse results, but the row and attachments stay intact.

See also

  • Update for the soft-delete-via-PATCH pattern.
  • Errors for the 404 semantics.