Skip to content

CSAM Reporting API

Older endpoint notes

Rendered from ProjectInfo/api-docs/api/csam-reports.md on docs/encryption-modes-spec. These notes predate the REST API reference, which is canonical wherever the two overlap. They are published because they still cover endpoints the reference does not yet document — check shapes against the reference and the spec errata.

Allows users to report suspected CSAM attachments. Reports are processed by the worker service and filed with NCMEC.

Requires Authorization: Bearer <token>.


POST /api/reports/csam

Report a suspected CSAM attachment.

Request:

{
  "attachment_id": "uuid",
  "evidence_note": "string (optional)"
}

Duplicate reports (same reporter + same attachment, not yet dismissed) return 409 Conflict.

Response 201:

{ "report_id": "uuid" }

Rate limit: 1 report per attachment per user.


Client-Side Detection Flow

The client should scan media locally before displaying it (optional but recommended):

1. GET /media/csam/manifest        → download token + client_key
2. GET /media/csam/hashdb?token=.. → encrypted NCMEC hash database
3. Decrypt with client_key
4. Before displaying received image/video, compute perceptual hash
5. Compare against local DB — no network call
6. Match → blur media + warning + [Report] button
7. User consents → POST /api/reports/csam

Server always scans server-side too — client scanning is defence-in-depth only.

See csam-db.md for the hash DB download endpoints.