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

LimitAgencyVolume
Calls a minute, per key120300
Files announced and not judged yet, per agency2550
Active keys520
Webhook addresses210
A file’s size5 GB5 GB
A file’s size, sent in one call25 MB25 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.

StatuserrorWhat to do
400invalidFix the request: a field is missing, too long or of another type, or the JSON is malformed.
400emptyA 0-byte file: do not send it.
400not_a_candidateChoose a placement among candidates, which the response gives.
401key_missingSend the key in the Authorization: Bearer header.
401key_invalidNo key matches, or the header is malformed: check the key.
401key_revokedThe key was cut: make a new one.
401key_maker_leftThe person who made it left the agency: make a new one.
402no_creditsNo files left on the plan, and no credits; left says what is left. Buy some in ValidFile, or wait for the next period.
402key_ceilingThe key’s ceiling is reached for the period; cap says what it is.
403agency_suspendedValidFile suspended the agency: its keys answer nothing until the suspension is lifted. Write to support.
403plan_requiredThe agency’s plan has no API: it comes with the Custom offer.
403scopeThe 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.
403no_drop_linksThe 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.
404not_foundA delivery or file unknown, deleted, or erased at the end of its retention; or an address the API does not have.
409not_uploadedThe bytes have not arrived: finish the upload, or give the file up.
409size_mismatchWhat arrived is not the size announced: announce the file again.
409arrivedThe bytes have arrived: the file can no longer be given up.
409link_existsThe 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.
409too_many_linksThe agency already has as many links working as its plan allows; limit says how many. Cut one, or wait for a link to expire.
409codes_offThis site cannot send a code by e-mail: make the link without allowedEmails.
409idempotency_mismatchThe same Idempotency-Key with another body: take a new one.
409idempotency_in_progressThe first call is still running: try again in a moment, with the same key.
409format_limitThe agency reached its ceiling of new formats; limit and days say which.
411length_requiredSend 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).
413too_largeA 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.
413plan_too_largeRare: 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.
415zip_not_supportedA zip: unzip a zip of files and announce each file; an HTML5 banner is dropped in ValidFile, which judges it.
415unsupported_content_typeSend the body as application/json; to POST /validate, the file’s bytes as they are, never a form.
429rate_limitedToo many calls with this key in the minute: wait Retry-After seconds.
429test_limitThe agency’s 10 test files in 24 h are taken: wait Retry-After seconds, until the oldest is erased.
429too_many_pendingToo many files not judged yet: wait Retry-After seconds, or for verdicts.
503busyValidFile 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.
500serverAn 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 …/placement gives the same result called twice, without it; a DELETE sent again answers 404, the file being given up already.