API

Mark a file

Mark a file in an Enterprise workspace and download the marked copy.

POST/api/v1/mark

Marks a file and returns the marked copy. 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 mark. Enterprise accepts up to 100 MB and 500 PDF pages. Upload size and PDF page count follow the workspace plan.
identifierstringYes1–32 characters, with no control characters. The label you see if this copy is detected later. It is not written into the file as readable text.

Request

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

Response

{
  "file": "JVBERi0xLjQK…",
  "mime": "application/pdf",
  "name": "contract.pdf",
  "kind": "pdf",
  "layers": [
    {
      "name": "Opaque PDF fields",
      "detail": "Three authenticated copies; no identifier text",
      "screenshot": "No",
      "crop": "No",
      "reencode": "No"
    }
  ],
  "remaining": 1
}

file is the marked bytes in base64. mime, name, and kind describe the download. layers lists the carriers that were applied. When the plan has no active-file cap, remaining is the number of active files after this mark. When it has a cap, remaining is how many new marks are left. Enterprise has no active-file cap. Deleting a file is what ends detection.

Errors

The error field in the JSON body is English.

StatusDescription
400The file is empty, or the identifier is empty, longer than 32 characters, or contains a control character.
401The key is missing, revoked, or unknown. The JSON body includes "code": "api-key".
403The workspace no longer has an active 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.
429This key has marked more than 40 files in the current minute.

Rate limit

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