API

Detect a file

Check a file against the active marks in a Business or Enterprise workspace.

POST/api/v1/detect

Checks a file against this key's workspace. The body is multipart/form-data.

Authentication

Authorization: Bearer mf_…

Send this header. There is no session cookie. curl and other server clients are accepted. A browser on another site is rejected.

Parameters

NameTypeRequiredDescription
filefileYesThe file to check. The match is looked up only in this key's workspace. A file marked in another workspace does not resolve. An active Business or Enterprise workspace can also check a video file. A screenshot of one frame is not detected as an image; check the video file.

Request

curl -X POST https://markedfile.com/api/v1/detect \
  -H "Authorization: Bearer mf_…" \
  -F "file=@leaked.pdf"

Response

{
  "id": "northwind",
  "confidence": 0.95,
  "layers": [
    {
      "name": "Metadata",
      "hit": true,
      "detail": "Authenticated metadata matched this workspace",
      "screenshot": "No",
      "crop": "No",
      "reencode": "No"
    }
  ],
  "notes": [
    "Confidence is 99% for an exact file or when an authenticated mark agrees with another mark. A visual match alone stays lower, and weak bit agreement stays far from a high score."
  ]
}

id is the identifier you assigned when that copy was marked, or null when this workspace has no match. confidence is 99% for an exact file or when an authenticated mark agrees with another mark. A visual match alone stays lower. layers lists the carriers, and hit is true on the ones that agreed. notes describes what the check did. A deleted file does not resolve.

Errors

The error field in the JSON body is English.

StatusDescription
400The file is empty.
401The key is missing, revoked, or unknown. The JSON body includes "code": "api-key".
403The workspace no longer has an active Business or Enterprise plan (the body includes "code": "enterprise"), or the browser sent a cross-site or same-site fetch.
413The file is over the plan upload limit, or the PDF has more pages than the plan allows.
422The file could not be processed.
503The server is busy, or marking is paused for maintenance.
429This key has run more than 80 detections in the current minute.

Rate limit

80 requests per minute for this key. The counter is stored in the product database and survives a restart.