API docsLog inCreate account
Media

Media uploads

POST/v1/media

Upload a file once, then send it by media_id as many times as you like.

Upload

POST https://api.api-supp.com/v1/media?filename=cat.jpg

The body is the raw file, not JSON and not multipart. Set Content-Type to the file's type.

ParamWhereNotes
filenamequeryRequired. Decides how the file is sent
evict_if_neededquerytrue deletes your oldest uploads to make room when you're over the cap
bash
curl -X POST "https://api.api-supp.com/v1/media?filename=cat.jpg" \
  -H "Authorization: Bearer wat_YOUR_TOKEN" \
  -H "Content-Type: image/jpeg" \
  --data-binary @cat.jpg

Response 201:

json
{
  "media_id": "mu_xyz...",
  "kind": "image",
  "mimetype": "image/jpeg",
  "size": 5234,
  "filename": "cat.jpg",
  "created_at": "2026-05-15T10:00:00.000Z",
  "last_sent_at": null,
  "send_count": 0,
  "used": 5234,
  "cap": 524288000,
  "evicted": []
}

Limits

  • One file can be up to 100 MB.
  • Each number has a storage cap, 500 MB by default (cap in the response).
  • A file is removed 24 hours after its last send (or after upload, if never sent). Sending it again resets the clock.

List and delete

EndpointDoes
GET /v1/media?limit=&offset=Your uploads, newest first, with used and cap
DELETE /v1/media/:media_idDeletes one upload
DELETE /v1/media?older_than=24hDeletes uploads older than Nh, Nd, Nm or a timestamp
DELETE /v1/media?all=trueDeletes every upload

Bulk delete needs exactly one of all or older_than; without one, or with an older_than it can't read, it returns 400.

Errors

  • 400 empty body or missing filename
  • 413 over your cap (the response shows used, cap and would_be; retry with evict_if_needed=true or delete files), or a single file over 100 MB or over the whole cap