Last reviewed September 1, 2026

How do I send documents with SSNs or PHI to an extraction API?

Direct answer

Get three answers in writing before you send anything: what the vendor stores, for how long, and who can read it. Then reduce the exposure you actually create — keep source files out of systems that do not need them, extract only the fields your workflow uses, and accept one uncomfortable fact: asking for fewer fields does not mean fewer pages were read. Recognition runs over the whole document, so schema design controls your structured output, not what the processor saw.

01

The distinction most teams get wrong

There are two different minimisations, and conflating them produces privacy claims that do not survive a question from a security reviewer.

Output minimisation is choosing which fields end up in your structured data. It is real and worth doing: if you never store the full Social Security number, it cannot leak from your database. Source minimisation is choosing which documents get sent at all. Only the second one reduces what the processor handles, because OCR and extraction operate on the entire page regardless of how narrow your schema is.

So when someone asks "does it see the SSN?", the honest answer for any document-extraction service is: the page was processed, so yes; whether the number lands in your output depends on your schema, and whether the source file is retained depends on the vendor’s retention practice.

02

The three answers you need in writing

Every other question is a variation on these. Get them from documentation you can link to, not from a sales call.

What is stored: source files, OCR text, extracted values, logs, and for how long each. Who can read it: which staff, which subprocessors, in which countries, and under what access controls. What happens on request: how deletion works, how long it takes, and whether it is self-service or operational.

For Dokyumi specifically, the public answers live on the security page: requests are served over TLS, uploaded files sit in Cloudflare R2 and extracted data in Neon Postgres, both encrypted at rest; document content is not used to train models; API keys are organisation-scoped and can be scoped further to specific schemas. Retention is deliberate rather than automatic — files, schemas and extraction records remain as part of account history unless a deletion request is processed, and self-service deletion is not currently available in the dashboard or API. If your workflow requires automatic or immediate deletion, confirm that operational process before you commit to it.

03

Which rules you may already be inside

In the US, health information handled on behalf of a covered entity brings HIPAA into scope, and the de-identification standard at 45 CFR 164.514 defines what it takes for data to stop being protected health information — either an expert determination or the removal of a specified list of identifiers. That list is a good checklist even outside healthcare, because it enumerates exactly which values make a record re-identifiable.

For personally identifiable information more broadly, NIST SP 800-122 provides the confidentiality impact framework most US security teams recognise, and the FTC publishes plain-language guidance on data security expectations for businesses. None of this is legal advice, and the point is not to become a compliance expert — it is to know which questions your own counsel will ask.

04

Reductions that are worth the effort

Some privacy work is theatre. These four are not, ranked roughly by return.

  • Do not send documents you do not need to extract. The largest reduction available is always at intake.
  • Store the minimum in your own systems: last four digits instead of a full identifier, a match result instead of a copy of the document.
  • Redact before upload when a workflow genuinely only needs part of a page, and confirm the redaction removed the content rather than drawing a black rectangle over it.
  • Use scoped keys and separate environments so a test integration cannot read production documents, and rotate keys when people leave.

Checklist

Vendor questionnaire: ten questions and what a good answer looks like

Send this to any document-processing vendor, including us. A vendor that answers all ten in writing is easy to review; one that answers in adjectives is the problem you are trying to avoid.

  1. 1

    What do you store, and for how long?

    Good: an itemised list — source file, OCR text, extracted values, request logs — each with a retention period or an explicit "until deletion is requested". Bad: "we take security seriously".

  2. 2

    Is deletion self-service or operational?

    Good: a named mechanism and a timeframe. Bad: implying instant deletion that is actually a support ticket. Dokyumi states plainly that self-service deletion is not currently available and deletion is requested by email.

  3. 3

    Who are your subprocessors, and where do they run?

    Good: a published list with the role of each and the regions involved. This is what your own DPA has to enumerate.

  4. 4

    Is my content used to train models?

    Good: an unambiguous no, in public documentation, covering both the vendor and its model providers.

  5. 5

    How is data encrypted, in transit and at rest?

    Good: TLS in transit plus named at-rest encryption for both file storage and the database.

  6. 6

    How is tenant isolation enforced?

    Good: a described mechanism — organisation-scoped keys and query filters — not just "each customer has their own account".

  7. 7

    Can API keys be scoped down?

    Good: keys limited to specific schemas or capabilities, revocable immediately, never displayed again after creation.

  8. 8

    What is logged, and who can read the logs?

    Good: a statement about whether document content appears in logs. Content in logs is a common and overlooked exposure.

  9. 9

    Will you sign a BAA or a DPA?

    Good: a direct yes or no with the process. Treat "HIPAA-compliant" on a marketing page as a starting point for the conversation, not as an executed agreement.

  10. 10

    What happens to my data if I stop paying?

    Good: a stated export path and a stated retention or deletion behaviour after cancellation.

Keep the answers with your vendor records. When a customer or auditor asks the same questions a year later, you will answer in minutes instead of re-running the whole evaluation.

Decision table

What schema design does and does not control

A short, honest map. The middle column is the claim people make; the right column is what is actually true for any service that performs recognition on a document.

DecisionCommon assumptionWhat is actually true
Leaving SSN out of the schemaThe processor never sees the SSNThe page is still processed; the number is absent from your structured output, which protects your database, not the processing path
Requesting only three fieldsOnly three fields are readThe document is read in full; three fields are returned
Uploading a redacted fileSame as not sending itCorrect, provided the redaction removed the underlying content rather than covering it visually
Using a scoped API keyLimits what data existsLimits which schemas that key can use — an access control, not a retention control
Deleting your local copyThe data is goneOnly your copy is gone; vendor-side retention follows the vendor’s stated process

Terminology bridge

This is data minimisation, and the paperwork is a DPA or BAA with a subprocessor list

Privacy programmes call the practice data minimisation and purpose limitation; the contract that governs a vendor processing personal data on your behalf is a data processing agreement, or a business associate agreement where HIPAA applies. The vendors your vendor uses are subprocessors, and enumerating them is usually the first thing a serious security review asks for.

  • data minimisation
  • DPA
  • BAA
  • subprocessors
  • de-identification
  • PII and PHI

Follow-up questions

Is Dokyumi HIPAA compliant?+
The security page describes a HIPAA-aware architecture — encryption in transit and at rest, organisation-scoped access — and is explicit that uploaded source files and OCR data follow the retention and deletion-request process rather than an automatic purge. Compliance is a property of your whole workflow and its agreements, not a checkbox on a vendor page, so raise a BAA directly before processing protected health information.
Can I delete a document immediately after extraction?+
Not through the dashboard or API today. Deletion is an operational request by email, and the security page says so plainly. If immediate deletion is a hard requirement of your workflow, confirm scope and timing in writing before you build on it.
Does redacting before upload actually help?+
Yes, when it is done properly. Removing the content is real minimisation; drawing a black box in a PDF viewer often leaves the underlying text intact and extractable. Flatten the page to an image or use a redaction tool that removes the objects, then verify by searching the file for the value.

Evidence notes

Sources and limitations

Sources used

Limitations

  • Nothing on this page is legal advice. It is a set of questions to take to your own counsel and security reviewer.
  • Dokyumi does not offer self-service deletion in the dashboard or API today; deletion is an operational request. Confirm scope and timing before relying on it.
  • A HIPAA-aware architecture is not the same as an executed business associate agreement. Ask for the agreement if you need one.

Published and last reviewed September 1, 2026. Product behavior can change; the linked API, pricing, and security pages are the controlling public references.

Read the data-handling page before you send anything

Encryption, subprocessors, retention, deletion requests, and the current limitations — written plainly, including the parts that are not automatic.