hosting
POST /v1/media-offload/deletions
Delete this site's own offloaded files (the customer deleted them in WordPress).
Authentication
This endpoint does not take an API key. It takes its own credential, issued to the plugin or service that calls it, as a bearer token; see the description above.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/media-offload/deletions \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "keys": <string[]> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Called by the Zinn® Media Offload plugin with a bearer plugin token when the customer deletes a media file in WordPress, naming that attachment's object keys (the original and every generated size). This is how a customer frees space; nothing is deleted on Zinn®'s own initiative. Every key is the FULL object key, as the upload ticket named it, and must sit under this site's own storage folder (<prefix>/...). A key anywhere else (another site's or organisation's folder, the bucket root, the folder itself) refuses the whole request with 403 KEY_OUTSIDE_SITE, writes an audit row, and deletes nothing; it is never re-rooted. An empty key, a ./.. segment, a leading /, a backslash, %, * or any other character outside the key alphabet is refused with 422 INVALID_KEY and nothing is deleted. There is no wildcard, listing or empty-the-bucket form. At most 100 keys per request (422 TOO_MANY_KEYS with max_keys; the plugin sends smaller batches). Deleting a key that no longer exists succeeds, so a retry is safe. Works while uploads are refused at the storage cap, while offload is paused and while the account is not in good standing. Every call writes one audit row with the count and the site, never the file names. Usage, and so the cap, follows at the next measurement (within 24 hours).
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
keys | string[] | Yes | — |
plugin_version | string | No | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
deleted | integer | Yes | — |
Errors this endpoint can return
401 · 403 · 422 · 429 · 503