manage_document

Create, read, update, delete, or cancel individual documents. Uses PUT for upsert. Supply external_id (and optional external_source) for idempotent writes from external systems — the internal UUID is auto-generated. Use document_id (internal UUID) for get/delete/cancel or to update a known document. Documents may be archived (_archived: true in response) — archived documents are read-only and cannot be upserted, but can be cancelled or deleted.

Parameters

NameTypeRequiredDescription
actionenum: upsert | get | delete | cancelYes
database_idstringYesTarget database ID
collectionstringYesCollection name or ID
document_idstringNoInternal document ID (UUID). Required for get/delete. For upsert, use to update a known document by internal ID.
external_idstringNoExternal/agent-supplied ID for upsert. Enables idempotent upsert by external identity (e.g. stripe_inv_123).
external_sourcestringNoSource system for external_id (e.g. 'stripe', 'salesforce'). Scopes uniqueness of external_id.
dataobjectNoDocument data conforming to collection schema
manage_document — Rekor