Give up a file
DELETE /api/v1/deliveries/{id}/files/{fileId}
Gives up a file announced whose bytes have not arrived: its credit is given back at once, and so is its place under the key’s ceiling.
Scope · deliveries:write
Path parameters
iduuid required- The delivery, as
POST /deliveriesreturned it. fileIduuid required- The file, as
POST …/filesreturned it.
What the response holds · 204
No body.
Errors
| 404 | not_found | A delivery or file unknown, deleted, or erased at the end of its retention; or an address the API does not have. |
| 409 | arrived | The bytes have arrived: the file can no longer be given up. |
| 403 | scope | The key does not have the scope the route asks for: a read-only key tried to write, or a key without drop-links:write tried to make or cut a drop link. |
And those of any call, in Limits and errors.
Refused once the bytes are at Cloud Storage, even before /complete: what arrived is the agency’s work, and its credit follows its verdict.
curl -X DELETE https://validfile.ca/api/v1/deliveries/$DELIVERY/files/$FILE \
-H "Authorization: Bearer $VALIDFILE_KEY" \
-w "%{http_code}\n"