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-specific endpoints for a teardown your org owns. Images are not covered by the audience field they’re visible to anyone who can see the teardown.

Upload

POST /public/v1/teardown/images/{teardown_id}
Attach an image. URL is appended to the teardown’s images[] array.

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 form field is not accepted on image endpoints audience controls document visibility, not images. Sending it is silently ignored.

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/teardowns/<teardown_id>/images/<8-hex>_<filename>

Response

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

Delete by URL

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

Query parameters

url
string
required
The full image URL (URL-encoded).

Response

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

curl -X DELETE "$base_url/public/v1/teardown/images/$teardown_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)Teardown isn’t yours or doesn’t exist
502storage_unavailableSupabase Storage upstream issue retry

See also