Limits and errors
What a file costs, what the API allows a minute, and what it answers when it refuses: what you need to write a script that does not stop at the first refusal.
Credits
A file sent through the API counts as in ValidFile: one file, taken from your plan for the period, then from your credits. It is reserved at the announcement and confirmed by the verdict. It is given back if the bytes never arrive, if our reader fails (unreadable), if the same bytes are already in the delivery (duplicate: true), and by the verdict guarantee when ValidFile got a file wrong and you report it in ValidFile. Balance says what is left.
Limits
| Limit | Agency | Volume |
|---|---|---|
| Calls a minute, per key | 120 | 300 |
| Files announced and not judged yet, per agency | 25 | 50 |
| Active keys | 5 | 20 |
| Webhook addresses | 2 | 10 |
| A file’s size | 5 GB | 5 GB |
| A file’s size, sent in one call | 25 MB | 25 MB |
The trial has Agency’s limits. Calls are counted per key, refused ones included: a key that tries again without waiting stays refused until the next minute. The files waiting share the measuring service among every agency; beyond the limit, wait for verdicts before announcing the next ones. On too_many_pending, Retry-After is always 10 seconds: a delay to read again, not a forecast of how long measuring takes.
Errors
Every error answers { "error": "<code>" }, and sometimes one more field, which the table names. The codes are fixed: automate on them, never on a text, nor on the HTTP status alone. The errors the server sees before the route, malformed JSON, a body of more than 64 KiB, a Content-Type other than application/json, answer in the same format; Validate a file, whose body is the file, takes the file’s own type. A POST with no body, /complete or /close, can do without Content-Type, or keep application/json.
| Status | error | What to do |
|---|---|---|
400 | invalid | Fix the request: a field is missing, too long or of another type, or the JSON is malformed. |
400 | empty | A 0-byte file: do not send it. |
400 | not_a_candidate | Choose a placement among candidates, which the response gives. |
401 | key_missing | Send the key in the Authorization: Bearer header. |
401 | key_invalid | No key matches, or the header is malformed: check the key. |
401 | key_revoked | The key was cut: make a new one. |
401 | key_maker_left | The person who made it left the agency: make a new one. |
402 | no_credits | No files left on the plan, and no credits; left says what is left. Buy some in ValidFile, or wait for the next period. |
402 | key_ceiling | The key’s ceiling is reached for the period; cap says what it is. |
403 | agency_suspended | ValidFile suspended the agency: its keys answer nothing until the suspension is lifted. Write to support. |
403 | plan_required | The agency’s plan has no API: it comes with the Custom offer. |
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. |
403 | no_drop_links | The agency’s plan gives it no drop link: a price the catalogue does not name, or a site without drop links. Every plan sold gives at least one, Free included. |
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 | not_uploaded | The bytes have not arrived: finish the upload, or give the file up. |
409 | size_mismatch | What arrived is not the size announced: announce the file again. |
409 | arrived | The bytes have arrived: the file can no longer be given up. |
409 | link_exists | The campaign already has a link that is neither cut nor expired: read it with GET, or send the call again with replace: true, which cuts the old one. |
409 | too_many_links | The agency already has as many links working as its plan allows; limit says how many. Cut one, or wait for a link to expire. |
409 | codes_off | This site cannot send a code by e-mail: make the link without allowedEmails. |
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. |
409 | format_limit | The agency reached its ceiling of new formats; limit and days say which. |
411 | length_required | Send Content-Length with the file: POST /validate refuses a body whose size it does not know before reading it, such as one sent in pieces (chunked). |
413 | too_large | A file of more than 5 GB, a file of more than 25 MB sent to POST /validate (announce it with POST …/files instead), or a JSON body of more than 64 KiB. |
413 | plan_too_large | Rare: the file is larger than the Free plan takes, the trial agency’s last credits having gone during the call (with no credits, the API first refuses any new file, plan_required); maxBytes says how large. Nothing is counted. A paid plan takes it. |
415 | zip_not_supported | A zip: unzip a zip of files and announce each file; an HTML5 banner is dropped in ValidFile, which judges it. |
415 | unsupported_content_type | Send the body as application/json; to POST /validate, the file’s bytes as they are, never a form. |
429 | rate_limited | Too many calls with this key in the minute: wait Retry-After seconds. |
429 | test_limit | The agency’s 10 test files in 24 h are taken: wait Retry-After seconds, until the oldest is erased. |
429 | too_many_pending | Too many files not judged yet: wait Retry-After seconds, or for verdicts. |
503 | busy | ValidFile is already receiving many files through POST /validate: wait Retry-After seconds (5) and send again, with the same Idempotency-Key. Nothing was read or reserved. |
500 | server | An error of ValidFile’s: try again with the same Idempotency-Key; if it goes on, write to support with ref (VF-XXXX-XXXX), which finds the error in our logs. |
Sending a call again without doing it again
A response lost on the way, a timeout, and your script does not know whether the delivery was made. Send an Idempotency-Key with each POST: the same key, on the same route, within 24 h, returns the first call’s response rather than doing it again, with the Idempotent-Replayed: true header.
curl https://validfile.ca/api/v1/deliveries \
-H "Authorization: Bearer $VALIDFILE_KEY" \
-H "Idempotency-Key: bynder-4471" \
-H "Content-Type: application/json" \
-d '{
"client": "Fromagerie Boivin",
"campaign": "Noël 2026",
"platforms": ["Meta", "Display"],
"campaignRef": "bynder:4471"
}'
- A key of 1 to 255 visible ASCII characters, with no space, your agency’s own. Take it from your own id of the operation, so that a script started again sends the same one.
- Only a call that succeeded is kept: a refused call is made again with the same key.
- The same key with another body answers
409 idempotency_mismatch; sent again while the first call is still running,409 idempotency_in_progress. - It holds for
POSTs.PUT …/placementgives the same result called twice, without it; aDELETEsent again answers404, the file being given up already.