Skip to main content

Documentation Index

Fetch the complete documentation index at: https://teardowns.aero/docs/llms.txt

Use this file to discover all available pages before exploring further.

Image endpoints for a listing your org owns. Images aren’t covered by the audience field they’re visible to anyone who can see the listing.

Upload

POST /public/v1/sales-lease-exchange/images/{listing_id}

Headers

Authorization
string
required
Bearer tdao_live_…
X-Organization-Id
string
required
Content-Type
string
required
multipart/form-data

Form fields

file
file
required
The image file.
The audience field is not accepted on listing images audience applies to documents only.

File rules

  • Max size: 50 MB.
  • Allowed types: JPEG, PNG, WEBP, GIF.
  • One file per call.

Storage path

{SUPABASE_URL}/storage/v1/object/public/teardowns-media/listings/<listing_id>/images/<8-hex>_<filename>

Response

200 OK:
{
  "url": "https://.../teardowns-media/listings/<id>/images/abcd1234_engine.jpg",
  "filename": "engine.jpg",
  "size": 234567,
  "content_type": "image/jpeg"
}
The URL is appended to listing.images[] automatically.
curl -X POST "$base_url/public/v1/sales-lease-exchange/images/$listing_id" \
  -H "Authorization: Bearer $api_key" \
  -H "X-Organization-Id: $org_id" \
  -F "file=@/absolute/path/to/engine.jpg"

Delete by URL

DELETE /public/v1/sales-lease-exchange/images/{listing_id}/by-url?url=<encoded-url>
Removes a single image URL from images[]. Best-effort deletes the underlying storage file. Idempotent.

Query parameters

url
string
required
URL-encoded.

Response

200 OK:
{ "status": "ok" }
encoded_url=$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1]))" "$IMG_URL")

curl -X DELETE "$base_url/public/v1/sales-lease-exchange/images/$listing_id/by-url?url=$encoded_url" \
  -H "Authorization: Bearer $api_key" \
  -H "X-Organization-Id: $org_id"

Common errors

Statuserror_codeWhy
400(no code)File empty, or content type isn’t an image
400file_too_largeOver 50 MB
404(no code)Listing isn’t yours or doesn’t exist
502storage_unavailableSupabase Storage upstream issue retry

See also