Delete a hosted upload

Delete a hosted upload and immediately stop serving it.

Deletes a hosted upload. The file stops being served immediately: existing links in already-delivered emails answer 410 Gone (not a broken 404), and the file's bytes stop counting toward your storage quota. Deletion is permanent — re-uploading the same file produces a new id and URL.

DELETE /v3/uploads/{id}

Path parameters

ParameterTypeRequiredDescription
idstringRequiredThe upload id returned by POST /v3/uploads — always starts with up_ (e.g. up_9f3KzQ7wXt2mB4hN).

Responses

StatusDescription
204Deleted. No body.
404No upload with this id on your account.

Code examples

cURL
curl -X DELETE https://api.wemail.io/v3/uploads/{id} \
  -H "Authorization: Bearer afn_live_…"
Node.js
const res = await fetch("https://api.wemail.io/v3/uploads/{id}", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
  },
});
const data = await res.json();
Python
import os, requests

r = requests.delete(
    "https://api.wemail.io/v3/uploads/{id}",
    headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()