API docs

A hosted HTTP API. Authenticate with your x-api-key, call embed before you deliver a copy, and call extract when a copy surfaces.

Getting started

Each key is scoped to one product and metered monthly. Keys are issued when you buy a plan or start a pilot: you receive a one-time link, open it, and the key is shown once. Store it like a password. A lost key is re-issued, not recovered.

All requests go to https://api.tracereceipt.com and carry the key in a header:

Every request
x-api-key: pk_live_xxxxxxxx
content-type: application/json

Never put your API key in a browser or a mobile app. Call the API from your server.

Images

Issue a marked copy

Call this for every image before it reaches a specific recipient, and deliver the copy it returns.

POST/sdk/v1/watermark/embed
curl
curl -X POST https://api.tracereceipt.com/sdk/v1/watermark/embed \
  -H "x-api-key: $KEY" \
  -H "content-type: application/json" \
  -d '{"image_b64":"'"$(base64 -w0 photo.jpg)"'","recipient_id":"user-42","content_id":"launch-teaser"}'
Response
{
  "watermarked_image_b64": "...",
  "fingerprint": "a4b2...",
  "recipient_id": "user-42"
}

Find whose copy leaked

POST/sdk/v1/watermark/extract
Request body
{ "image_b64": "<base64 of the leaked image or screenshot>" }
Response
{
  "status": "detected",
  "found": true,
  "recipient_id": "user-42",
  "content_id": "launch-teaser",
  "issued_at": "2026-11-19T10:04:11Z",
  "content_match": true,
  "evidence": { ... }
}

recipient_id is your own id, exactly as you sent it. Nothing needs to be stored on your side.

Documents

PDF, Word, PowerPoint, Excel, plain text and Markdown, up to 25 MB. The format is detected from the content.

POST/sdk/v1/document/embed
Request body
{
  "document_b64": "<base64 of the file>",
  "filename": "board-pack.pdf",
  "recipient_id": "user-42",
  "content_id": "q3-board-pack"
}
Response
{
  "document_b64": "...",
  "filename": "board-pack.watermarked.pdf",
  "mime_type": "application/pdf",
  "layers": [ ... ],            // the protections applied to this copy
  "pages": 12,
  "units_charged": 12
}

What a protected document survives

How it leaksFormats
Screenshot of a page in a viewer: zoomed, scrolled, off-centre, PNG or JPEGPDF
Forwarding the file; opening, editing and saving itPDF, DOCX, PPTX, XLSX
Copying the text into email, chat or another documentDOCX, PPTX, TXT, MD

PDF copies protected against screenshots look the same, but their text can't be selected or searched. PDFs are billed per page, up to 50 per request by default (max_pages up to 100). Password-protected PDFs are refused. Excel copies are protected without changing any cell data.

Find the source

POST/sdk/v1/document/extract

Send whichever form the leak took:

Request body, one of
{ "document_b64": "<base64 of the leaked file>" }
{ "text": "<text pasted from wherever it leaked>" }
{ "image_b64": "<base64 screenshot of a page>" }

For PDFs, up to the first 3 pages are checked by default (scan_pages up to 10). evidence.pages_scanned shows the result for each page, and evidence.geometry says where a page was found inside a screenshot.

  • Page screenshots taken at 50%, 70% and 100% zoom, scrolled, off-centre, as PNG or JPEG, in a dark or light viewer, and phone-sized screenshots have all been attributed.
  • A screenshot from a light-theme viewer takes about 50 seconds to scan.
  • Pages issued before 19 November 2026 are still read from the file itself, but not from screenshots.
  • Phone photos of a page and print-and-scan are not covered yet.
GET/sdk/v1/document/formats

Lists supported formats and limits.

Video and audio

Video up to 50 MB and audio up to 25 MB, billed one unit per started 5 MB. Audio needs at least about five seconds.

POST/sdk/v1/video/embed or /sdk/v1/audio/embed
curl
curl -H "x-api-key: $KEY" \
  -F [email protected] -F recipient_id=editor-7 -F content_id=ep-12 \
  -F response=binary -o clip.editor-7.mp4 \
  https://api.tracereceipt.com/sdk/v1/video/embed

With response=binary the marked file comes back directly, with the attribution in the x-tracereceipt-recipient-id, x-tracereceipt-content-id, x-tracereceipt-fingerprint and x-tracereceipt-units-charged headers. Otherwise you get JSON with media_b64.

POST/sdk/v1/video/extract or /sdk/v1/audio/extract
curl
curl -H "x-api-key: $KEY" -F [email protected] https://api.tracereceipt.com/sdk/v1/video/extract

A public post that everyone sees carries one mark for everyone, so it identifies the post, not a person. Per-person attribution needs a separate copy per person.

Web app screens

For dashboards, portals and AI answers that only ever appear on screen. A small script gives each viewer an imperceptible mark of their own, so a screenshot can later be traced to the viewer who took it. It does not block screenshots; nothing in a browser can.

1. Your server mints a short-lived viewer token

POST/sdk/v1/protect/token
Request body (server to server, with your key)
{ "recipient_id": "user-42", "content_id": "dashboard", "ttl_seconds": 900 }

Tokens last 15 minutes by default and at most an hour.

2. The page starts protection with that token

In your page
TraceReceiptProtect.start({
  endpoint: "https://api.tracereceipt.com",
  token: viewerToken,                 // from your server, never your API key
  getToken: () => fetch("/viewer-token").then((r) => r.text()),
  sessionId: myAuditLogId,            // optional, joins results to your logs
  onError: (err) => console.warn(err.code, err.status),
});

The browser script is supplied to pilot customers. Your API key never goes to the browser. The page authenticates with the viewer token alone, so a viewer cannot create a mark naming a colleague.

3. Scan a leaked screenshot

Send the screenshot to /sdk/v1/watermark/extract as above. The result names the viewer's recipient id and the content id from the token.

Script errors

codeMeaningWhat to do
viewport_too_smallThe window is under about 1000×750 device pixels and can't carry the markNothing; a larger window fixes it
token_expiredThe token expired and getToken was missing or failedSupply getToken
rate_limitedStill limited after one retry that honoured retry-afterBack off

Browser support

  • Chromium (Chrome, Edge), Firefox and WebKit (Safari) engines, at normal and zoomed-in views.
  • The mark stays sharp at any zoom level and display density, and covers modal dialogs and pop-overs.

What it survives and its limits

Reading a result

statusMeaning
detectedA mark issued under your key was read; the recipient and content ids are returned.
inconclusiveA mark is present but cannot be attributed to one copy. No identity is returned.
unrecognisedA mark exists but was not issued under your key. No identity is returned.
camera_detectedA photo of a protected screen was traced to one viewer you issued it to. Reserved: photo-of-screen tracing is in development and not yet enabled for customer keys.
camera_capture_insufficientA protected screen was photographed too poorly to read. capture.advice says what to change. Reserved, as above.
not_detectedNo mark found.
scan_incomplete (504)The scan did not finish. Retry it, and never treat it as clean.

A match identifies the copy that was issued, not the person who shared it. A recipient may have passed their copy to someone else. Treat a match as the start of an investigation, never as proof of who leaked.

Signed receipts

Every scan result carries a receipt signed with Ed25519. Anyone holding a receipt can check it, with no API key, so you can pass it to counsel, an auditor or the other side.

GET/sdk/v1/evidence/public-key
Response
{
  "algorithm": "Ed25519",
  "public_key": "...",
  "encoding": "base64url, raw 32-byte key",
  "signed_message": "canonical JSON of receipt.payload (keys sorted at every level, no whitespace)"
}
POST/sdk/v1/evidence/verify
Request and response
{ "receipt": { "payload": { ... }, "signature": "..." } }

{ "valid": true }

Because the signed message is defined, a receipt can also be verified offline with any Ed25519 library. Receipts are cryptographically verifiable and tamper-evident; whether they are admissible in a particular case is for counsel to assess.

POST/sdk/v1/evidence/report
Request
{
  "receipt": { "payload": { ... }, "signature": "..." },
  "case": {
    "reference": "HR-2026-114",
    "title": "...", "found_at_url": "...", "found_at": "...",
    "prepared_by": "...", "organisation": "...", "notes": "..."
  }
}

Returns a printable HTML evidence report (print it to PDF to keep it): the finding, the file's SHA-256, a timeline, the decoder's measurements, the full receipt and the steps to verify it. A receipt that doesn't verify gets 422 invalid_receipt and no report. case is optional and is printed as your own statements. No key is needed, and nothing is stored. You can also create a report on this site.

Managing your key

These calls are authenticated by the key itself. The two GET calls can also be made from a browser, which is how the dashboard shows your usage live. Rotate and revoke only work server to server.

GET/sdk/v1/key

Key status, product and this month's usage.

GET/sdk/v1/key/events

Recent calls made with the key, for your own audit trail.

POST/sdk/v1/key/rotate

Issue a replacement key and retire the current one.

POST/sdk/v1/key/revoke

Stop the key working immediately. Use this if it was exposed.

Billing units

Usage is counted in units when a copy is issued. Embed responses report what they used in units_charged (or the x-tracereceipt-units-charged header for binary media responses).

ContentUnits
Image1 unit per recipient copy
PDF1 unit per page (up to 50 pages a request by default, 100 maximum)
Word, PowerPoint, Excel, text, Markdown1 unit per recipient copy
Video and audio1 unit per started 5 MB
Web app screen1 unit per viewer mark issued
Leak scansIncluded, subject to a per-key rate limit

A monthly limit applies per key; GET /sdk/v1/key shows what you've used. See pricing.

Errors

StatusMeaning
401Missing or invalid x-api-key
403Key revoked, or used for the wrong product
413Document over 25 MB, video over 50 MB, or audio over 25 MB
415Unsupported document format
422Unreadable or password-protected document, too many pages, or media that cannot be decoded or is too short. The message explains which
429Rate limit or monthly quota reached. Check x-ratelimit-remaining and retry-after
502Watermark engine temporarily unavailable. Safe to retry
503PDF engine unavailable. Safe to retry later
504scan_incomplete. Retry; this does not mean the content is clean

Questions about an integration: [email protected]