Close a delivery
POST /api/v1/deliveries/{id}/close
Says nothing more is coming. delivery.judged goes out once all its received files are judged, at once if they already are; a delivery closed with no file sends none.
Scope · deliveries:write Takes an Idempotency-Key
Path parameters
iduuid required- The delivery, as
POST /deliveriesreturned it.
What the response holds · 200
deliverydelivery- The delivery, closed.
The fields of delivery
iduuid- The delivery’s id.
clientstring- The client, as you gave it.
campaignstring- The campaign, as you gave it.
platformsarray of string | null- The campaign’s platforms, in the order of
GET /platforms, ornullfor a delivery started in ValidFile before its Campaign step: each of its files is judged on the whole catalogue. campaignRefstring | null- Your campaign reference, folded to lower case, or
null. closedboolean- True once the delivery is closed: by
POST …/close, or by your client when it says on its drop link that its delivery is complete. A closed delivery still takes files. createdAtdate-time- When it was made.
keptUntildate-time- The day it will be erased if nothing happens to it before, by your plan’s retention. It moves later with each activity. Once erased, it answers
404. For a test delivery: 24 h after its making or its last file. testboolean- True for a delivery made with a test key (
vf_test_): its files cost nothing and are erased after 24 h, and ValidFile shows it nowhere. Authentication.
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. |
| 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. |
| 409 | idempotency_mismatch | The same Idempotency-Key with another body: take a new one. |
| 409 | idempotency_in_progress | The first call is still running: try again in a moment, with the same key. |
And those of any call, in Limits and errors.
Closed is not locked: a file added afterwards, by the API or in ValidFile, is taken, and delivery.judged goes out again once it is judged. Closing a delivery already closed changes nothing.
Your client also closes the delivery when it says, on its drop link, that it is complete: delivery.judged then goes out the same way. If it reopens it on its link, it stays closed here, and a file it drops afterwards sends the event again once judged.
curl -X POST https://validfile.ca/api/v1/deliveries/$DELIVERY/close \
-H "Authorization: Bearer $VALIDFILE_KEY"
{
"delivery": {
"id": "0b6c2f4e-8d1a-4c7b-9f3e-5a2d1c8b7e60",
"client": "Fromagerie Boivin",
"campaign": "Noël 2026",
"platforms": ["Meta", "Display"],
"campaignRef": "bynder:4471",
"closed": true,
"createdAt": "2026-10-28T18:40:02.114Z",
"keptUntil": "2027-10-28T18:42:10.531Z",
"test": false
}
}