v2

latestOpenAPI 3.1.02026-08-0382170235.8 KB
ingestion

Extract facts from a stored document

Re-extract facts from an already-stored document into a POT.

This allows extracting the same document into multiple POTs without re-uploading the content.

post/pots/{pot_id}/extract-from-document

Path parameters

pot_idstring uuid required

Request body

document_idstring uuid required

ID of the stored document to extract from

languagestring nullable

ISO 639-1 override for extraction language. Falls back to POT default and then auto-detect when omitted.

context_attachment_idsstring[] nullable

Optional explicit list of context_attachment_ids to inject into the extraction prompt. None (default) = use all attachments on the document. Empty list = no context block. Cross-document or cross-workspace ids cause a 422 with ATTACHMENT_REF_INVALID. Duplicate ids are silently deduplicated (preserving first-occurrence order) so they don't double-count against caps or duplicate provenance.

Response

Re-extraction queued

job_idstring uuid required

Unique identifier for this ingestion job

pot_idstring uuid required

Target POT ID

status'pending'

Job status (always 'pending' for initial response)

messagestring

Human-readable status message

Example response

{
  "job_id": "01JH8KQMW3PG0HXNZV2QRST9YZ",
  "message": "Document ingestion queued",
  "pot_id": "01JH8KQMW3PG0HXNZV2QRST9YX",
  "status": "pending"
}