Validate a file

POST /api/v1/validate

A file of 25 MB at most, in one call: its bytes in the body, its verdict in the response. ValidFile puts it in the delivery you name, or makes one for it, reserves its credit, measures it and waits for its verdict.

Scope · deliveries:write Takes an Idempotency-Key

Query parameters

name string required
The file’s name, 500 characters at most. ValidFile reads it to choose the placement: Display_FR_300x250-noel.jpg helps, 001.jpg does not.
platforms string optional
Without delivery, required: where the file will run, one platform or more separated by commas, written as Platforms returns them (Meta,Display), and encoded as any value of an address (Vid%C3%A9o, La%20Presse). A delivery is made for this file.
delivery uuid optional
A delivery already made, to put the file in, judged on its platforms: the one a first response returned, for the next files of the same campaign. Never with platforms, client, campaign or campaignRef.
client string optional
The client of the delivery made, 200 characters at most; the key’s name by default.
campaign string optional
The campaign of the delivery made, 200 characters at most; the file’s name by default.
campaignRef string optional
Your id for the campaign, for the delivery made, as in Make a delivery.
wait integer optional
Wait for the verdict up to this many seconds, from 0 to 60; 30 by default. The response leaves as soon as the file has its verdict and the antivirus’s answer. ValidFile reads the file again meanwhile, without measuring it again. An agency has at most as many calls waiting at once as files not judged yet it may have (25 on Agency, 50 on Volume): past that, the response leaves at once, as without wait.

Request body

The file’s bytes, as they are, 25 MB at most, with its type as Content-Type (image/jpeg, video/mp4…) and its size as Content-Length. Neither a form (multipart/form-data) nor JSON: the body is the file.

What the response holds · 200

delivery delivery
The file’s delivery, named or made.

The fields of delivery

id uuid
The delivery’s id.
client string
The client, as you gave it.
campaign string
The campaign, as you gave it.
platforms array of string | null
The campaign’s platforms, in the order of GET /platforms, or null for a delivery started in ValidFile before its Campaign step: each of its files is judged on the whole catalogue.
campaignRef string | null
Your campaign reference, folded to lower case, or null.
closed boolean
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.
createdAt date-time
When it was made.
keptUntil date-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.
test boolean
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.
file file
The file and its verdict, as Read a file returns it.

The fields of file

id uuid
The file’s id.
name string
The name announced.
size integer
The size announced, in bytes.
ready boolean
True if ValidFile’s export would send this file as it is. It is the one to publish on.
heldReason string | null
Why the file is held, null if it is ready.
refused no_format to_confirm outside named_elsewhere wrong_box not_ordered unchecked unseen waiting unreadable duplicate scanning infected not_checked
verdict string
What the specs say of the file.
pass warn fail no_format needs_placement pending unreadable infected not_checked
placement placement | null
The placement it was judged on, or null.

The fields of placement

id string
The placement in ValidFile’s catalogue: the one PUT …/placement takes.
platform string
Its platform, as GET /platforms names it.
label string
Its name in ValidFile’s catalogue, as written there, in French for some: the English site says it in English (“Publicité à formulaire — Square 1:1” is “Lead ad — Square 1:1” there), the API never does.
rulesToConfirm boolean
True when one of its rules is not yet settled by the official page alone: a page not read in full, a value from another site, or a question open between two pages. The review says so under the verdict (“Format to confirm: one of its rules…”). A pass on such a placement is right by ValidFile’s rules, which may not be the platform’s. Always false for one of your agency’s own formats, whose rules are yours. Unrelated to heldReason: "to_confirm", which says it is the placement itself that is to confirm.
pageChanged boolean
True when the monthly check no longer found on the official page a sentence the catalogue quotes: the platform may ask for something other than what ValidFile checks, until the catalogue is reviewed.
nearest placement | null
For a file no format takes: the nearest placement, whose rules checks gives. Never the file’s placement.

The fields of placement

id string
The placement in ValidFile’s catalogue: the one PUT …/placement takes.
platform string
Its platform, as GET /platforms names it.
label string
Its name in ValidFile’s catalogue, as written there, in French for some: the English site says it in English (“Publicité à formulaire — Square 1:1” is “Lead ad — Square 1:1” there), the API never does.
rulesToConfirm boolean
True when one of its rules is not yet settled by the official page alone: a page not read in full, a value from another site, or a question open between two pages. The review says so under the verdict (“Format to confirm: one of its rules…”). A pass on such a placement is right by ValidFile’s rules, which may not be the platform’s. Always false for one of your agency’s own formats, whose rules are yours. Unrelated to heldReason: "to_confirm", which says it is the placement itself that is to confirm.
pageChanged boolean
True when the monthly check no longer found on the official page a sentence the catalogue quotes: the platform may ask for something other than what ValidFile checks, until the catalogue is reviewed.
candidates array of placement
For a needs_placement only: the placements to choose between.

The fields of placement

id string
The placement in ValidFile’s catalogue: the one PUT …/placement takes.
platform string
Its platform, as GET /platforms names it.
label string
Its name in ValidFile’s catalogue, as written there, in French for some: the English site says it in English (“Publicité à formulaire — Square 1:1” is “Lead ad — Square 1:1” there), the API never does.
rulesToConfirm boolean
True when one of its rules is not yet settled by the official page alone: a page not read in full, a value from another site, or a question open between two pages. The review says so under the verdict (“Format to confirm: one of its rules…”). A pass on such a placement is right by ValidFile’s rules, which may not be the platform’s. Always false for one of your agency’s own formats, whose rules are yours. Unrelated to heldReason: "to_confirm", which says it is the placement itself that is to confirm.
pageChanged boolean
True when the monthly check no longer found on the official page a sentence the catalogue quotes: the platform may ask for something other than what ValidFile checks, until the catalogue is reviewed.
checks array of check
The checks of the placement, or of the nearest one. Empty until the file is measured.

The fields of check

key string
What is checked: dimensions, duration, clickTag… Reading a verdict gives each key. A key can come twice, for a rule and for a recommendation.
status string
The result. Reading a verdict says what each means.
pass warn fail skipped note
expected string | null
What the placement asks for, as text.
actual string | null
What ValidFile measured, as text.
message string | null
ValidFile’s sentence in English, when there is something to say. text says it in French and in English, in the review’s words, which can differ. To automate, read key and status.
text checkText
The check as a person reads it in ValidFile’s review, in French and in English: to show as it is. Reading a verdict says how.

The fields of checkText

fr checkWords
In French.

The fields of checkWords

rule string | null
The rule’s name: “File size”, “Colour space”.
expected string | null
What the placement asks for, written as the review writes it: “≤ 150 KB”, “sRGB, Greyscale”.
actual string | null
What ValidFile measured, written the same way.
message string | null
ValidFile’s sentence in this language, when there is something to say. A sentence ValidFile cannot say in French yet stays in English.
en checkWords
In English.

The fields of checkWords

rule string | null
The rule’s name: “File size”, “Colour space”.
expected string | null
What the placement asks for, written as the review writes it: “≤ 150 KB”, “sRGB, Greyscale”.
actual string | null
What ValidFile measured, written the same way.
message string | null
ValidFile’s sentence in this language, when there is something to say. A sentence ValidFile cannot say in French yet stays in English.
accepted boolean
On a fail or a warn only: true if your team let this rule through in ValidFile (“Accept anyway”). The check still fails, but no longer holds the file.
unmeasured boolean
On a skipped only: true if a measurement was missing, false if there was nothing to check, an absent audio track for instance.
fix fix | null
What to change in the file, in French and in English: the lines your team writes to your client from the review, with “Message to the client”. null when there is no change to ask of it: the file is ready, not judged yet, held for your team to check, or infected: that one is asked for again whole, there is nothing to change in it. Reading a verdict.

The fields of fix

required boolean
True for a file refused or that no format takes: it must be made again to go out. False for a remark: the file can go as it is.
doubtful boolean
True when the refusal may not be your client’s to fix: the file is judged outside the campaign, under a name that names another platform, on the platform its name names while another platform’s placement takes it, on a placement ValidFile chose among several, in a box that may not be the right one, or it is an HTML5 banner whose dimensions were not read. Look at it in the review before asking for a new file.
fr array of string
The lines to give whoever makes the file, in French.
en array of string
The same lines, in English.
antivirus antivirus | null
What the antivirus says of it. A file is ready only once scanned.

The fields of antivirus

state string
Where the antivirus stands: scanning, clean (no known threat found), infected or unscanned.
scanning clean infected unscanned
threat string | null
For an infected: the threat’s name, as ClamAV gives it.
reason string | null
For an unscanned: why nobody looked.
too_large limits encrypted failed before
signatures date-time | null
The date of the signatures it was scanned with.
origin string
Where it came from: client, dropped by your client on its drop link; api, sent by one of your keys; agency, added by a person of your agency in ValidFile.
client api agency
replaces uuid | null
The file it is the corrected version of, which your client replaced on its link, or null. The file replaced is no longer in the delivery.
declaredPlatform string | null
The platform in whose box your client dropped it, as the review reads it, or null when the review reads no box: a file that came from no box, or from a platform the campaign no longer has; a file whose shape you assigned to a placement, your choice coming before the box; a file that fills an ordered placement of a platform the campaign does not tick; a file not judged yet (pending, unreadable, infected), whose shape is not known yet. If that platform refuses it and another of the campaign takes it, it is judged on the other and held as wrong_box, unless another reason to hold it comes first, until your client says which platform it is for: it is then judged on that one alone, refused if it must be.
judgedAt date-time
When this verdict was given: at this read, with the day’s specs.
catalogue catalogue
Which specs judged it.

The fields of catalogue

version string
The version of ValidFile’s specs that judged it.
agencyVersion integer
The version of your agency’s own formats, 0 if it has none.
duplicate boolean
The same bytes were already in the delivery: its credit is given back.
reviewUrl uri | null
The delivery’s review in ValidFile, where your team approves and exports; null for a test delivery, which ValidFile does not show.

Errors

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.
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.
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.
404not_foundA delivery or file unknown, deleted, or erased at the end of its retention; or an address the API does not have.
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.
415zip_not_supportedA zip: unzip a zip of files and announce each file; an HTML5 banner is dropped in ValidFile, which judges it.
429too_many_pendingToo many files not judged yet: wait Retry-After seconds, or for verdicts.
429test_limitThe agency’s 10 test files in 24 h are taken: wait Retry-After seconds, until the oldest is erased.
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.
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.

And those of any call, in Limits and errors.

No verdict after wait seconds, or more calls waiting than the agency has (wait, above): the response is 202, of the same shape, the file pending or its antivirus scanning. The file is received and its credit reserved; read it again with Read a file and wait, or wait for file.judged.

One credit, as the three calls of Sending a file, and the same limits. The same bytes twice in one delivery cost one; a file refused costs none, and leaves no empty delivery behind.

Past 25 MB, a long video for instance, or for an upload that must be able to resume, go through Sending a file: its bytes go straight to Cloud Storage.

curl "https://validfile.ca/api/v1/validate?name=Display_FR_300x250-noel.jpg&platforms=Display" \
  -H "Authorization: Bearer $VALIDFILE_KEY" \
  -H "Content-Type: image/jpeg" \
  --data-binary @Display_FR_300x250-noel.jpg
{
  "delivery": {
    "id": "5c1e8a2f-7d4b-4e93-a6f0-3b9d2c7e1a58",
    "client": "Bynder",
    "campaign": "Display_FR_300x250-noel.jpg",
    "platforms": ["Display"],
    "campaignRef": null,
    "closed": false,
    "createdAt": "2026-11-11T15:02:41.318Z",
    "keptUntil": "2027-11-11T15:02:41.322Z",
    "test": false
  },
  "file": {
    "id": "e7a3b5c9-1f2d-4c8e-9b6a-0d4f8e2c1a73",
    "name": "Display_FR_300x250-noel.jpg",
    "size": 48213,
    "ready": true,
    "heldReason": null,
    "verdict": "pass",
    "placement": { "id": "display.300x250", "platform": "Display", "label": "Medium Rectangle 300x250", "rulesToConfirm": false, "pageChanged": false },
    "nearest": null,
    "checks": [
      { "key": "mime", "expected": "JPG, PNG, GIF", "actual": "JPG", "message": null,
        "text": {
          "fr": { "rule": "Format de fichier", "expected": "JPG, PNG, GIF", "actual": "JPG", "message": null },
          "en": { "rule": "File format", "expected": "JPG, PNG, GIF", "actual": "JPG", "message": null }
        },
        "status": "pass" },
      { "key": "maxBytes", "expected": "≤ 150 KB", "actual": "47.1 KB", "message": null,
        "text": {
          "fr": { "rule": "Poids", "expected": "≤ 150 Ko", "actual": "47,1 Ko", "message": null },
          "en": { "rule": "File size", "expected": "≤ 150 KB", "actual": "47.1 KB", "message": null }
        },
        "status": "pass" },
      { "key": "dimensions", "expected": "300x250 or 600x500", "actual": "300x250", "message": null,
        "text": {
          "fr": { "rule": "Dimensions", "expected": "300x250 ou 600x500", "actual": "300x250", "message": null },
          "en": { "rule": "Dimensions", "expected": "300x250 or 600x500", "actual": "300x250", "message": null }
        },
        "status": "pass" },
      { "key": "colorSpace", "expected": "sRGB, Greyscale", "actual": "sRGB", "message": null,
        "text": {
          "fr": { "rule": "Espace colorimétrique", "expected": "sRGB, Niveaux de gris", "actual": "sRGB", "message": null },
          "en": { "rule": "Colour space", "expected": "sRGB, Greyscale", "actual": "sRGB", "message": null }
        },
        "status": "pass" }
    ],
    "fix": null,
    "antivirus": { "state": "clean", "threat": null, "reason": null, "signatures": "2026-11-11T09:27:01.000Z" },
    "origin": "api",
    "replaces": null,
    "declaredPlatform": null,
    "judgedAt": "2026-11-11T15:02:43.904Z",
    "catalogue": { "version": "2026.11.10.1", "agencyVersion": 0 }
  },
  "duplicate": false,
  "reviewUrl": "https://validfile.ca/livraisons/5c1e8a2f-7d4b-4e93-a6f0-3b9d2c7e1a58/revue"
}