Documents
65 endpoints
/api/v1/{org_id}/documentsList documents
List and search documents with filtering and pagination. Supports filtering by owner, document type, category, and status. Free-text search queries against title and OCR text.
Parameters
Path Parameters
org_idstringrequiredQuery Parameters
pageintegerPage number (1-based).
Default: 1
page_sizeintegerItems per page.
Default: 50
owner_typestringFilter by owner type. One of: patient, provider, location.
owner_uuidstringFilter by owning entity UUID.
document_typestringFilter by semantic document type.
category_uuidstringFilter by category UUID.
statusstringFilter by status. One of: uploading, processing, active, quarantined, error, archived.
searchstringFull-text search query.
sortstringSort field (e.g., created_at, title, file_size).
Default: "created_at"
orderstringSort order: asc or desc.
Default: "desc"
include_org_scopedbooleanInclude org-scoped documents in results. Default excludes them.
Default: false
Responses
itemsobject[]requiredpageintegerrequiredCurrent page number (1-based).
page_sizeintegerrequiredItems per page.
totalintegerrequiredTotal matching documents.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}Get document
Retrieve a single document by UUID. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
ai_classificationstringai_confidencenumbercategoryobjectLightweight reference to a related entity — exposes UUID and optional name.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_datestring (date)document_typeenumrequiredSemantic document type from the dental document taxonomy.
aclsadministrative_procedureaed_maintenance_recordanesthesia_consentannual_filingbaabackground_checkbiological_monitoring_resultbitewingboard_certificationbrand_assetbreach_logbuilding_permitbusiness_licensebylaws_operating_agreementcalibration_recordcase_presentationcbctce_certificatece_summarycephalometriccertificate_of_occupancyclaim_attachmentclinical_protocolcontrolled_substance_licensecorporate_resolutioncovid_screeningcpr_blscredentialing_packetdea_registrationdigital_impressionemergency_contact_formemergency_procedureemergency_protocolemployee_handbookemployment_agreementeobequipment_manualextraoral_photofacility_registrationfinancial_agreementfinancial_statementfire_inspectionform_1099formation_documentsgeneral_consenthealth_department_inspectionhealth_questionnairehipaa_acknowledgmenthipaa_training_certificateinfection_control_manualinsurance_card_backinsurance_card_frontinsurance_contractintraoral_photoit_agreementjob_descriptionlab_case_photoslab_contractlab_delivery_confirmationlab_prescriptionlease_agreementliability_insurancemaintenance_logmalpractice_insurancemarketing_collateralmarketing_templatemedical_historyminor_guardian_authorizationnarrativenpi_documentationnppodontogram_snapshotoffer_letterosha_compliance_documentosha_inspectionosha_training_certificateotherpanel_participation_letterpanoramicpatient_letterpatient_registrationpayment_plan_agreementpdmp_check_documentationperformance_reviewperiapicalperiodontal_chartphoto_id_backphoto_id_frontpreauth_requestpreauth_responseprescription_recordprivacy_policyprocedure_consentprogress_notesproperty_insuranceradiation_safety_inspectionradiation_safety_trainingrecall_noticereceiptreferral_letter_incomingreferral_letter_outgoingrisk_assessmentsds_sheetsecurity_policysedation_permitsmile_design_photospecialist_reportspecialty_certificationstate_dental_licensestatementsterilization_logtax_returntraining_manualtreatment_plan_signedtreatment_plan_unsignedvaccination_recordvendor_contractw9warranty_documentationwater_quality_reportworkers_compexpiration_datestring (date)file_namestringrequiredOriginal filename including extension.
file_sizeintegerrequiredFile size in bytes.
has_thumbnailbooleanrequiredWhether a thumbnail is available for the current version.
idstring (uuid)requiredDocument UUID.
is_lockedbooleanrequiredWhether the document is locked.
is_org_scopedbooleanrequiredTrue if this document belongs to the organization.
is_signedbooleanrequiredWhether the document has been signed.
is_starredbooleanrequiredWhether the document is starred.
legal_holdbooleanrequiredWhether the document is under legal hold.
link_targetsobject[]Resolved cross-entity links for this document.
mime_typestringrequiredMIME type.
ocr_statusenumrequiredOCR processing status. One of: pending, processing, completed, failed, skipped.
completedfailedpendingprocessingskippedowner_typestringpage_countintegerprocessing_statusstringstatusenumrequiredDocument lifecycle status. One of: uploading, processing, active, quarantined, error, archived.
activearchivederrorprocessingquarantineduploadingtagsstring[]Applied tags.
titlestringrequiredDisplay title.
updated_atstring (date-time)requiredLast update timestamp.
uploaded_bystringversionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/auditGet document audit trail
Get the audit trail for a specific document. Returns audit log entries ordered by newest first. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredQuery Parameters
pageintegerPage number (1-based).
Default: 1
page_sizeintegerItems per page.
Default: 50
Responses
itemsobject[]requiredpageintegerrequiredCurrent page number (1-based).
page_sizeintegerrequiredItems per page.
totalintegerrequiredTotal matching audit entries.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/audit" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/audit" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/downloadDownload document
Generate a pre-signed download URL for the current document version. The URL has ``Content-Disposition: attachment`` for browser downloads. Raises 404 if the document does not exist or has no confirmed version.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
download_urlstringrequiredPre-signed URL for downloading.
expires_inintegerrequiredSeconds until the pre-signed URL expires.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/download" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/download" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/linksList document links
List all cross-entity links for a document. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
itemsobject[]requireddetailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/links" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/links" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/previewPreview document
Generate a pre-signed inline URL for previewing the document. The URL has ``Content-Disposition: inline`` for browser rendering. Raises 404 if the document does not exist or has no confirmed version.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
download_urlstringrequiredPre-signed URL for downloading.
expires_inintegerrequiredSeconds until the pre-signed URL expires.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/preview" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/preview" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/processing-statusGet document processing status
Get the processing pipeline status for a document. Returns the status of each processing step (virus scan, OCR, AI classification) and overall progress. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
overall_progressstringrequiredOverall progress summary (e.g., '2/3 completed').
stepsobject[]requiredIndividual processing step statuses.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/processing-status" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/processing-status" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/signaturesList document signatures
Return all electronic signatures for a document, ordered by signing order. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
itemsobject[]requireddetailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/signatures" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/signatures" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/thumbnailGet thumbnail URL
Generate a pre-signed URL for the current version's thumbnail. Returns a JPEG thumbnail image URL with ``Content-Disposition: inline``. Raises 404 if the document has no thumbnail (e.g., non-image file types).
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
download_urlstringrequiredPre-signed URL for downloading.
expires_inintegerrequiredSeconds until the pre-signed URL expires.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/thumbnail" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/thumbnail" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/versionsList document versions
List all versions of a document, newest first. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
itemsobject[]requireddetailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/versions" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/versions" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/versions/{version_number}/downloadDownload specific version
Generate a pre-signed download URL for a specific document version. Raises 404 if the document or version does not exist.
Parameters
Path Parameters
document_uuidstringrequiredversion_numberintegerrequiredorg_idstringrequiredResponses
download_urlstringrequiredPre-signed URL for downloading.
expires_inintegerrequiredSeconds until the pre-signed URL expires.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/versions/{version_number}/download" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/versions/{version_number}/download" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/categoriesList categories by scope
Return the full category tree for a given scope. Categories are ordered by path and then sort_order.
Parameters
Path Parameters
org_idstringrequiredQuery Parameters
scope"location" | "organization" | "patient" | "provider"requiredCategory scope to filter by. One of: patient, provider, location, organization.
locationorganizationpatientproviderResponses
itemsobject[]requireddetailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/categories" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/categories" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/categories/{category_uuid}Get category
Retrieve a single document category by UUID. Raises 404 if the category does not exist.
Parameters
Path Parameters
category_uuidstringrequiredorg_idstringrequiredResponses
created_atstring (date-time)requiredCreation timestamp.
depthintegerrequiredNesting depth (0 = root).
descriptionstringidstring (uuid)requiredCategory UUID.
is_systembooleanrequiredTrue if this is a system-managed category.
namestringrequiredDisplay name.
parentobjectLightweight reference to a related entity — exposes UUID and optional name.
scopestringrequiredScope this category applies to. One of: patient, provider, location, organization.
slugstringrequiredURL-safe slug.
sort_orderintegerrequiredSort position within siblings.
versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/categories/{category_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/categories/{category_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/compliance/ai-statsAI pipeline stats
Return AI pipeline processing statistics. Includes OCR counts by status, AI classification count, and average confidence score.
Parameters
Path Parameters
org_idstringrequiredResponses
ai_classifiedintegerrequiredDocuments with AI classification.
avg_confidencenumberrequiredAverage AI confidence score.
ocr_completedintegerrequiredDocuments with OCR completed.
ocr_failedintegerrequiredDocuments with OCR failed.
ocr_pendingintegerrequiredDocuments with OCR pending.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/ai-stats" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/ai-stats" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/compliance/alertsCompliance alerts
Return compliance alerts based on current data state. Alerts are generated dynamically based on expired documents, unsigned consents, and other compliance indicators.
Parameters
Path Parameters
org_idstringrequiredResponses
itemsobject[]requireddetailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/alerts" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/alerts" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/compliance/auditCompliance audit log
List the compliance audit log for document-related actions. Supports filtering by date range and action type.
Parameters
Path Parameters
org_idstringrequiredQuery Parameters
date_fromstringFilter audit entries from this date (inclusive).
date_tostringFilter audit entries until this date (inclusive).
action_typestringFilter by action type (e.g., 'create', 'update').
pageintegerPage number (1-based).
Default: 1
page_sizeintegerItems per page.
Default: 50
Responses
itemsobject[]requiredpageintegerrequiredCurrent page number (1-based).
page_sizeintegerrequiredItems per page.
totalintegerrequiredTotal matching entries.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/audit" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/audit" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/compliance/expirationsExpiring documents
List documents with expiration dates. Can be filtered by expiration status (expired, expiring, valid), document type, and title search.
Parameters
Path Parameters
org_idstringrequiredQuery Parameters
statusstringFilter by expiration status. One of: expired, expiring, valid.
document_typestringFilter by document type.
searchstringSearch by document title.
pageintegerPage number (1-based).
Default: 1
page_sizeintegerItems per page.
Default: 50
Responses
itemsobject[]requiredpageintegerrequiredCurrent page number (1-based).
page_sizeintegerrequiredItems per page.
totalintegerrequiredTotal matching documents.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/expirations" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/expirations" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/compliance/metricsCompliance metrics
Return headline compliance metrics. Includes counts for expired documents, expiring documents, unsigned consents, active legal holds, and a compliance score.
Parameters
Path Parameters
org_idstringrequiredResponses
active_legal_holdsintegerrequiredNumber of active legal holds.
compliance_scoreintegerrequiredOverall compliance score (0-100).
expired_countintegerrequiredNumber of documents past their expiration date.
expiring_90dintegerrequiredNumber of documents expiring within 90 days.
unsigned_consentsintegerrequiredNumber of consent forms without signatures.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/metrics" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/metrics" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/compliance/storageStorage stats
Return document storage usage statistics. Includes total bytes, document count, patient count, and average size.
Parameters
Path Parameters
org_idstringrequiredResponses
avg_size_bytesintegerrequiredAverage document size in bytes.
document_countintegerrequiredTotal document count.
patient_countintegerrequiredNumber of patients with documents.
total_bytesintegerrequiredTotal storage used in bytes.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/storage" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/compliance/storage" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/legal-holdsList legal holds
Return all legal holds, separated into active and released history. Active holds are listed first, then historical (released) holds. Both sections are independently paginated.
Parameters
Path Parameters
org_idstringrequiredQuery Parameters
active_pageintegerPage number for active holds.
Default: 1
active_page_sizeintegerItems per page for active holds.
Default: 50
history_pageintegerPage number for released holds.
Default: 1
history_page_sizeintegerItems per page for released holds.
Default: 50
Responses
activeobject[]requiredCurrently active legal holds.
historyobject[]requiredReleased (historical) legal holds.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/legal-holds" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/legal-holds" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/retention-policiesList retention policies
List all retention policies, optionally filtered by scope and active status. Returns policies ordered by scope, then document type.
Parameters
Path Parameters
org_idstringrequiredQuery Parameters
scope"location" | "organization" | "patient" | "provider"Filter by scope. One of: patient, provider, location, organization.
is_activebooleanFilter by active status.
Responses
itemsobject[]requiredRetention policy records.
totalintegerrequiredTotal number of matching policies.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/retention-policies" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/retention-policies" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/searchSearch documents
Full-text search with filtering, pagination, and faceted counts. When ``q`` is provided, results are ranked by relevance against title, description, and OCR text. When omitted, standard sort applies. Facet counts (by document_type, owner_type, tag, mime_type) are computed after scope filtering, before pagination.
Parameters
Path Parameters
org_idstringrequiredQuery Parameters
qstringFull-text search query.
owner_typestringFilter by owner type. One of: patient, provider, location.
owner_uuidstringFilter by owner UUID.
include_org_scopedbooleanInclude organization-scoped documents in results.
Default: false
document_typestringFilter by semantic document type.
category_uuidstringFilter by category UUID.
tagsstring[]Filter by tags (OR logic — any match).
mime_typestringFilter by MIME type.
date_fromstringDocument date range start (inclusive).
date_tostringDocument date range end (inclusive).
is_signedbooleanFilter by signed status.
is_starredbooleanFilter by starred status.
expiring_beforestringFind documents expiring before this date.
statusstringFilter by status. One of: uploading, active, quarantined, archived.
pageintegerPage number (1-based).
Default: 1
page_sizeintegerItems per page.
Default: 50
sortstringSort field (e.g., created_at, title, file_size).
Default: "created_at"
orderstringSort order: asc or desc.
Default: "desc"
include_facetsbooleanInclude facet counts in response.
Default: true
Responses
facetsobjectAggregated facet counts for search refinement.
itemsobject[]requiredpageintegerrequiredCurrent page number (1-based).
page_sizeintegerrequiredItems per page.
query_time_msintegertotalintegerrequiredTotal matching documents.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/search" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/search" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/templatesList templates
Return a paginated list of document templates. Templates can be filtered by scope, document type, and active status.
Parameters
Path Parameters
org_idstringrequiredQuery Parameters
scope"location" | "organization" | "patient" | "provider"Filter by scope. One of: patient, provider, location, organization.
document_typestringFilter by semantic document type.
is_activebooleanFilter by active status. Pass true/false to filter, omit for all.
pageintegerPage number (1-based).
Default: 1
page_sizeintegerItems per page.
Default: 50
sortstringSort column. One of: name, created_at, updated_at, document_type.
Default: "name"
orderstringSort order. One of: asc, desc.
Default: "asc"
Responses
itemsobject[]requiredpageintegerrequiredCurrent page number (1-based).
page_sizeintegerrequiredItems per page.
totalintegerrequiredTotal matching templates.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/templates" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/templates" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/templates/{template_uuid}Get template
Retrieve a single document template by UUID. Raises 404 if the template does not exist.
Parameters
Path Parameters
template_uuidstringrequiredorg_idstringrequiredResponses
category_slugstringcontent_formatstringrequiredContent format. One of: html, markdown, pdf.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_typestringrequiredSemantic document type produced by this template.
idstring (uuid)requiredTemplate UUID.
is_activebooleanrequiredWhether the template is active.
is_dso_managedbooleanrequiredWhether the template is DSO-managed.
merge_fieldsobject[]namestringrequiredTemplate display name.
required_for_proceduresstring[]requires_signaturebooleanrequiredWhether documents require signatures.
scopestringrequiredEntity scope. One of: patient, provider, location, organization.
signature_partiesstring[]updated_atstring (date-time)requiredLast update timestamp.
versionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/templates/{template_uuid}/versionsList template versions
Return all versions for a template, newest first. Raises 404 if the template does not exist.
Parameters
Path Parameters
template_uuidstringrequiredorg_idstringrequiredResponses
itemsobject[]requireddetailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}/versions" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}/versions" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/templates/merge-fieldsList available merge fields
Return available merge fields grouped by entity type. Used by the template editor to offer field insertion.
Parameters
Path Parameters
org_idstringrequiredResponses
groupsobject[]requireddetailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/templates/merge-fields" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/templates/merge-fields" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/triageList triage queue
List unfiled documents in the triage queue, oldest first. Returns documents that are active with no category assignment. Optionally filtered by the upload source of the current version.
Parameters
Path Parameters
org_idstringrequiredQuery Parameters
pageintegerPage number (1-based).
Default: 1
page_sizeintegerItems per page.
Default: 50
source"api" | "email" | "migration" | "mobile" | "portal" | "scanner" | "web"Filter by upload source. One of: web, mobile, scanner, email, portal, api, migration.
Responses
itemsobject[]requiredpageintegerrequiredCurrent page number (1-based).
page_sizeintegerrequiredItems per page.
totalintegerrequiredTotal matching documents.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/triage" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/triage" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/triage/countGet triage count
Return the number of unclassified documents in the triage queue.
Parameters
Path Parameters
org_idstringrequiredResponses
countintegerrequiredNumber of unclassified documents in the triage queue.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/triage/count" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/triage/count" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/triage/statsGet triage stats
Return triage queue statistics. Includes counts for unassigned, AI-classified, needs-review, and filed-today documents.
Parameters
Path Parameters
org_idstringrequiredResponses
ai_classifiedintegerrequiredUnfiled documents with AI classification suggestion.
filed_todayintegerrequiredDocuments filed from triage today.
needs_reviewintegerrequiredUnfiled documents with low AI confidence (< 0.90).
unassignedintegerrequiredTotal unfiled documents in the triage queue.
detailobject[]curl -X GET "https://api.example.com/api/v1/{org_id}/documents/triage/stats" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X GET "https://api.example.com/api/v1/{org_id}/documents/triage/stats" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/archiveArchive document
Archive (soft-delete) a document. Blocked if the document is locked or under legal hold — raises 422. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
ai_classificationstringai_confidencenumbercategoryobjectLightweight reference to a related entity — exposes UUID and optional name.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_datestring (date)document_typeenumrequiredSemantic document type from the dental document taxonomy.
aclsadministrative_procedureaed_maintenance_recordanesthesia_consentannual_filingbaabackground_checkbiological_monitoring_resultbitewingboard_certificationbrand_assetbreach_logbuilding_permitbusiness_licensebylaws_operating_agreementcalibration_recordcase_presentationcbctce_certificatece_summarycephalometriccertificate_of_occupancyclaim_attachmentclinical_protocolcontrolled_substance_licensecorporate_resolutioncovid_screeningcpr_blscredentialing_packetdea_registrationdigital_impressionemergency_contact_formemergency_procedureemergency_protocolemployee_handbookemployment_agreementeobequipment_manualextraoral_photofacility_registrationfinancial_agreementfinancial_statementfire_inspectionform_1099formation_documentsgeneral_consenthealth_department_inspectionhealth_questionnairehipaa_acknowledgmenthipaa_training_certificateinfection_control_manualinsurance_card_backinsurance_card_frontinsurance_contractintraoral_photoit_agreementjob_descriptionlab_case_photoslab_contractlab_delivery_confirmationlab_prescriptionlease_agreementliability_insurancemaintenance_logmalpractice_insurancemarketing_collateralmarketing_templatemedical_historyminor_guardian_authorizationnarrativenpi_documentationnppodontogram_snapshotoffer_letterosha_compliance_documentosha_inspectionosha_training_certificateotherpanel_participation_letterpanoramicpatient_letterpatient_registrationpayment_plan_agreementpdmp_check_documentationperformance_reviewperiapicalperiodontal_chartphoto_id_backphoto_id_frontpreauth_requestpreauth_responseprescription_recordprivacy_policyprocedure_consentprogress_notesproperty_insuranceradiation_safety_inspectionradiation_safety_trainingrecall_noticereceiptreferral_letter_incomingreferral_letter_outgoingrisk_assessmentsds_sheetsecurity_policysedation_permitsmile_design_photospecialist_reportspecialty_certificationstate_dental_licensestatementsterilization_logtax_returntraining_manualtreatment_plan_signedtreatment_plan_unsignedvaccination_recordvendor_contractw9warranty_documentationwater_quality_reportworkers_compexpiration_datestring (date)file_namestringrequiredOriginal filename including extension.
file_sizeintegerrequiredFile size in bytes.
has_thumbnailbooleanrequiredWhether a thumbnail is available for the current version.
idstring (uuid)requiredDocument UUID.
is_lockedbooleanrequiredWhether the document is locked.
is_org_scopedbooleanrequiredTrue if this document belongs to the organization.
is_signedbooleanrequiredWhether the document has been signed.
is_starredbooleanrequiredWhether the document is starred.
legal_holdbooleanrequiredWhether the document is under legal hold.
link_targetsobject[]Resolved cross-entity links for this document.
mime_typestringrequiredMIME type.
ocr_statusenumrequiredOCR processing status. One of: pending, processing, completed, failed, skipped.
completedfailedpendingprocessingskippedowner_typestringpage_countintegerprocessing_statusstringstatusenumrequiredDocument lifecycle status. One of: uploading, processing, active, quarantined, error, archived.
activearchivederrorprocessingquarantineduploadingtagsstring[]Applied tags.
titlestringrequiredDisplay title.
updated_atstring (date-time)requiredLast update timestamp.
uploaded_bystringversionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/archive" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/archive" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/{document_uuid}/confirm-uploadConfirm upload
Confirm that a file upload completed successfully. 1. Verifies the file exists at the staging location. 2. Verifies the SHA-256 checksum matches. 3. Scans the file for viruses via ClamAV. 4. If clean: moves file to permanent storage, creates the first ``DocumentVersion``, and transitions the document to ``status='active'``. 5. If infected: moves file to quarantine storage, sets document ``status='quarantined'``, and returns 422. Raises 409 if the document has already been confirmed. Raises 422 if checksum verification fails or virus is detected. Raises 503 if the virus scanner is temporarily unavailable. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredRequest Body
checksum_sha256stringrequiredSHA-256 hex digest of the uploaded file.
Responses
ai_classificationstringai_confidencenumbercategoryobjectLightweight reference to a related entity — exposes UUID and optional name.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_datestring (date)document_typeenumrequiredSemantic document type from the dental document taxonomy.
aclsadministrative_procedureaed_maintenance_recordanesthesia_consentannual_filingbaabackground_checkbiological_monitoring_resultbitewingboard_certificationbrand_assetbreach_logbuilding_permitbusiness_licensebylaws_operating_agreementcalibration_recordcase_presentationcbctce_certificatece_summarycephalometriccertificate_of_occupancyclaim_attachmentclinical_protocolcontrolled_substance_licensecorporate_resolutioncovid_screeningcpr_blscredentialing_packetdea_registrationdigital_impressionemergency_contact_formemergency_procedureemergency_protocolemployee_handbookemployment_agreementeobequipment_manualextraoral_photofacility_registrationfinancial_agreementfinancial_statementfire_inspectionform_1099formation_documentsgeneral_consenthealth_department_inspectionhealth_questionnairehipaa_acknowledgmenthipaa_training_certificateinfection_control_manualinsurance_card_backinsurance_card_frontinsurance_contractintraoral_photoit_agreementjob_descriptionlab_case_photoslab_contractlab_delivery_confirmationlab_prescriptionlease_agreementliability_insurancemaintenance_logmalpractice_insurancemarketing_collateralmarketing_templatemedical_historyminor_guardian_authorizationnarrativenpi_documentationnppodontogram_snapshotoffer_letterosha_compliance_documentosha_inspectionosha_training_certificateotherpanel_participation_letterpanoramicpatient_letterpatient_registrationpayment_plan_agreementpdmp_check_documentationperformance_reviewperiapicalperiodontal_chartphoto_id_backphoto_id_frontpreauth_requestpreauth_responseprescription_recordprivacy_policyprocedure_consentprogress_notesproperty_insuranceradiation_safety_inspectionradiation_safety_trainingrecall_noticereceiptreferral_letter_incomingreferral_letter_outgoingrisk_assessmentsds_sheetsecurity_policysedation_permitsmile_design_photospecialist_reportspecialty_certificationstate_dental_licensestatementsterilization_logtax_returntraining_manualtreatment_plan_signedtreatment_plan_unsignedvaccination_recordvendor_contractw9warranty_documentationwater_quality_reportworkers_compexpiration_datestring (date)file_namestringrequiredOriginal filename including extension.
file_sizeintegerrequiredFile size in bytes.
has_thumbnailbooleanrequiredWhether a thumbnail is available for the current version.
idstring (uuid)requiredDocument UUID.
is_lockedbooleanrequiredWhether the document is locked.
is_org_scopedbooleanrequiredTrue if this document belongs to the organization.
is_signedbooleanrequiredWhether the document has been signed.
is_starredbooleanrequiredWhether the document is starred.
legal_holdbooleanrequiredWhether the document is under legal hold.
link_targetsobject[]Resolved cross-entity links for this document.
mime_typestringrequiredMIME type.
ocr_statusenumrequiredOCR processing status. One of: pending, processing, completed, failed, skipped.
completedfailedpendingprocessingskippedowner_typestringpage_countintegerprocessing_statusstringstatusenumrequiredDocument lifecycle status. One of: uploading, processing, active, quarantined, error, archived.
activearchivederrorprocessingquarantineduploadingtagsstring[]Applied tags.
titlestringrequiredDisplay title.
updated_atstring (date-time)requiredLast update timestamp.
uploaded_bystringversionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/confirm-upload" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"checksum_sha256": "string"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/confirm-upload" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"checksum_sha256": "string"
}'/api/v1/{org_id}/documents/{document_uuid}/confirm-versionConfirm version upload
Confirm that a new version upload completed successfully. 1. Verifies the file exists at the staging location. 2. Verifies the SHA-256 checksum matches. 3. Scans the file for viruses via ClamAV. 4. If clean: moves file to permanent storage, creates the ``DocumentVersion`` record, and updates denormalized fields. 5. If infected: moves file to quarantine, returns 422. Must be called after the file has been uploaded to the pre-signed URL returned by ``POST /{document_uuid:uuid}/upload-version``. Raises 422 if the file is not found in storage, checksum mismatches, or virus is detected. Raises 503 if the virus scanner is temporarily unavailable. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredRequest Body
change_notestringchecksum_sha256stringrequiredSHA-256 hex digest of the uploaded file.
file_namestringrequiredFilename of the uploaded version.
file_sizeintegerrequiredFile size in bytes.
mime_typestringrequiredMIME type of the uploaded file.
version_numberintegerrequiredVersion number returned by the upload-version endpoint.
Responses
ai_classificationstringai_confidencenumbercategoryobjectLightweight reference to a related entity — exposes UUID and optional name.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_datestring (date)document_typeenumrequiredSemantic document type from the dental document taxonomy.
aclsadministrative_procedureaed_maintenance_recordanesthesia_consentannual_filingbaabackground_checkbiological_monitoring_resultbitewingboard_certificationbrand_assetbreach_logbuilding_permitbusiness_licensebylaws_operating_agreementcalibration_recordcase_presentationcbctce_certificatece_summarycephalometriccertificate_of_occupancyclaim_attachmentclinical_protocolcontrolled_substance_licensecorporate_resolutioncovid_screeningcpr_blscredentialing_packetdea_registrationdigital_impressionemergency_contact_formemergency_procedureemergency_protocolemployee_handbookemployment_agreementeobequipment_manualextraoral_photofacility_registrationfinancial_agreementfinancial_statementfire_inspectionform_1099formation_documentsgeneral_consenthealth_department_inspectionhealth_questionnairehipaa_acknowledgmenthipaa_training_certificateinfection_control_manualinsurance_card_backinsurance_card_frontinsurance_contractintraoral_photoit_agreementjob_descriptionlab_case_photoslab_contractlab_delivery_confirmationlab_prescriptionlease_agreementliability_insurancemaintenance_logmalpractice_insurancemarketing_collateralmarketing_templatemedical_historyminor_guardian_authorizationnarrativenpi_documentationnppodontogram_snapshotoffer_letterosha_compliance_documentosha_inspectionosha_training_certificateotherpanel_participation_letterpanoramicpatient_letterpatient_registrationpayment_plan_agreementpdmp_check_documentationperformance_reviewperiapicalperiodontal_chartphoto_id_backphoto_id_frontpreauth_requestpreauth_responseprescription_recordprivacy_policyprocedure_consentprogress_notesproperty_insuranceradiation_safety_inspectionradiation_safety_trainingrecall_noticereceiptreferral_letter_incomingreferral_letter_outgoingrisk_assessmentsds_sheetsecurity_policysedation_permitsmile_design_photospecialist_reportspecialty_certificationstate_dental_licensestatementsterilization_logtax_returntraining_manualtreatment_plan_signedtreatment_plan_unsignedvaccination_recordvendor_contractw9warranty_documentationwater_quality_reportworkers_compexpiration_datestring (date)file_namestringrequiredOriginal filename including extension.
file_sizeintegerrequiredFile size in bytes.
has_thumbnailbooleanrequiredWhether a thumbnail is available for the current version.
idstring (uuid)requiredDocument UUID.
is_lockedbooleanrequiredWhether the document is locked.
is_org_scopedbooleanrequiredTrue if this document belongs to the organization.
is_signedbooleanrequiredWhether the document has been signed.
is_starredbooleanrequiredWhether the document is starred.
legal_holdbooleanrequiredWhether the document is under legal hold.
link_targetsobject[]Resolved cross-entity links for this document.
mime_typestringrequiredMIME type.
ocr_statusenumrequiredOCR processing status. One of: pending, processing, completed, failed, skipped.
completedfailedpendingprocessingskippedowner_typestringpage_countintegerprocessing_statusstringstatusenumrequiredDocument lifecycle status. One of: uploading, processing, active, quarantined, error, archived.
activearchivederrorprocessingquarantineduploadingtagsstring[]Applied tags.
titlestringrequiredDisplay title.
updated_atstring (date-time)requiredLast update timestamp.
uploaded_bystringversionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/confirm-version" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"change_note": "string",
"checksum_sha256": "string",
"file_name": "string",
"file_size": 1,
"mime_type": "string",
"version_number": 1
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/confirm-version" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"change_note": "string",
"checksum_sha256": "string",
"file_name": "string",
"file_size": 1,
"mime_type": "string",
"version_number": 1
}'/api/v1/{org_id}/documents/{document_uuid}/linksCreate document link
Create a cross-entity link from a document to another entity. Raises 409 if the link already exists. Raises 404 if the document or target entity does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredRequest Body
link_typestringLink type (e.g., 'reference', 'attachment', 'supporting'). Defaults to 'reference'.
target_typeenumrequiredEntity type to link to. One of: patient, provider, location, claim. Additional types (appointment, treatment_plan) will be added when those domain resolvers are available.
claimlocationpatientprovidertarget_uuidstring (uuid)requiredUUID of the target entity.
Responses
created_atstring (date-time)requiredCreation timestamp.
idstring (uuid)requiredLink UUID.
link_typestringrequiredLink relationship type (e.g., 'reference', 'attachment').
target_displaystringtarget_typestringrequiredTarget entity type (e.g., 'patient', 'appointment').
target_uuidstring (uuid)requiredUUID of the target entity.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/links" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"link_type": "reference",
"target_type": "claim",
"target_uuid": "00000000-0000-0000-0000-000000000000"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/links" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"link_type": "reference",
"target_type": "claim",
"target_uuid": "00000000-0000-0000-0000-000000000000"
}'/api/v1/{org_id}/documents/{document_uuid}/signSign document
Record an electronic signature on a document. Raises 404 if the document does not exist. Raises 422 if the document is locked or the party has already signed.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredRequest Body
content_hash_sha256stringrequiredSHA-256 hex digest of the document content at signing time. Used for tamper detection.
signature_datastringsignature_methodenumrequiredSignature capture method. One of: drawn, typed, uploaded.
drawntypeduploadedsigner_namestringrequiredDisplay name of the signer.
signer_typeenumrequiredType of signer. One of: patient, provider, guardian, witness.
guardianpatientproviderwitnesssigner_uuidstring (uuid)Responses
idstring (uuid)requiredSignature UUID.
signature_methodstringrequiredCapture method. One of: drawn, typed, uploaded.
signed_atstring (date-time)requiredTimestamp of the signature.
signer_namestringrequiredDisplay name of the signer.
signer_typestringrequiredSigner type. One of: patient, provider, guardian, witness.
signer_uuidstring (uuid)signing_orderintegerrequiredOrder in which the signature was recorded.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/sign" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content_hash_sha256": "string",
"signature_data": "string",
"signature_method": "drawn",
"signer_name": "string",
"signer_type": "guardian"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/sign" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content_hash_sha256": "string",
"signature_data": "string",
"signature_method": "drawn",
"signer_name": "string",
"signer_type": "guardian"
}'/api/v1/{org_id}/documents/{document_uuid}/upload-versionInitiate version upload
Initiate a new version upload and receive a pre-signed URL. This is the first step of a two-step process: 1. Call this endpoint to get an upload URL and version number. 2. Upload the file to the pre-signed URL (staging location). 3. Call ``POST /{document_uuid:uuid}/confirm-version`` to trigger virus scanning and finalize. No version record is created until confirm — if the upload fails, no stale data remains. Raises 422 if MIME type or file size is invalid. Raises 404 if the document does not exist.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredRequest Body
change_notestringfile_namestringrequiredOriginal filename including extension.
file_sizeintegerrequiredFile size in bytes.
mime_typestringrequiredMIME type (e.g., 'application/pdf', 'image/jpeg').
Responses
documentobjectrequiredFull document representation.
uploadobjectrequiredPre-signed upload target returned to the client.
version_numberintegerrequiredServer-assigned version number. Pass this to confirm-version after uploading.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/upload-version" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"change_note": "string",
"file_name": "string",
"file_size": 1,
"mime_type": "string"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/upload-version" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"change_note": "string",
"file_name": "string",
"file_size": 1,
"mime_type": "string"
}'/api/v1/{org_id}/documents/bulk/archiveBulk archive documents
Archive (soft-delete) multiple documents. Maximum 100 documents per request. Locked documents and documents on legal hold are skipped with an error. Raises 404 if any document UUID is not found.
Parameters
Path Parameters
org_idstringrequiredRequest Body
document_uuidsstring (uuid)[]requiredUUIDs of documents to archive (max 100).
Responses
errorsstring[]failedintegerrequiredNumber of documents that failed processing.
succeededintegerrequiredNumber of documents processed successfully.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/bulk/archive" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"document_uuids": []
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/bulk/archive" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"document_uuids": []
}'/api/v1/{org_id}/documents/bulk/downloadBulk download as ZIP
Request a bulk download of multiple documents as a ZIP archive. Maximum 100 documents per request. Returns a pre-signed URL for the generated ZIP file. Raises 501 until async ZIP generation is implemented (M7 — Export & Reporting).
Parameters
Path Parameters
org_idstringrequiredRequest Body
document_uuidsstring (uuid)[]requiredUUIDs of documents to download (max 100).
Responses
document_countintegerrequiredNumber of documents in the ZIP.
download_urlstringrequiredPre-signed URL for the ZIP file.
expires_inintegerrequiredSeconds until the URL expires.
total_sizeintegerrequiredTotal size of all files in bytes.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/bulk/download" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"document_uuids": []
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/bulk/download" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"document_uuids": []
}'/api/v1/{org_id}/documents/bulk/moveBulk move to category
Move multiple documents to a target category. Maximum 100 documents per request. Raises 404 if the category or any document UUID is not found.
Parameters
Path Parameters
org_idstringrequiredRequest Body
category_uuidstring (uuid)requiredUUID of the target category.
document_uuidsstring (uuid)[]requiredUUIDs of documents to move (max 100).
Responses
errorsstring[]failedintegerrequiredNumber of documents that failed processing.
succeededintegerrequiredNumber of documents processed successfully.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/bulk/move" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category_uuid": "00000000-0000-0000-0000-000000000000",
"document_uuids": []
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/bulk/move" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category_uuid": "00000000-0000-0000-0000-000000000000",
"document_uuids": []
}'/api/v1/{org_id}/documents/bulk/tagBulk add tags
Add tags to multiple documents in a single operation. Maximum 100 documents and 20 tags per request. Duplicate tags on individual documents are silently ignored. Raises 404 if any document UUID is not found.
Parameters
Path Parameters
org_idstringrequiredRequest Body
document_uuidsstring (uuid)[]requiredUUIDs of documents to tag (max 100).
tagsstring[]requiredTags to apply (max 20).
Responses
errorsstring[]failedintegerrequiredNumber of documents that failed processing.
succeededintegerrequiredNumber of documents processed successfully.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/bulk/tag" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"document_uuids": [],
"tags": []
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/bulk/tag" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"document_uuids": [],
"tags": []
}'/api/v1/{org_id}/documents/categoriesCreate category
Create a new document category. Raises 404 if ``parent_uuid`` references a non-existent category.
Parameters
Path Parameters
org_idstringrequiredRequest Body
descriptionstringnamestringrequiredCategory display name.
parent_uuidstring (uuid)scopeenumrequiredScope this category applies to. One of: patient, provider, location, organization.
locationorganizationpatientprovidersort_orderintegerSort position within siblings.
Responses
created_atstring (date-time)requiredCreation timestamp.
depthintegerrequiredNesting depth (0 = root).
descriptionstringidstring (uuid)requiredCategory UUID.
is_systembooleanrequiredTrue if this is a system-managed category.
namestringrequiredDisplay name.
parentobjectLightweight reference to a related entity — exposes UUID and optional name.
scopestringrequiredScope this category applies to. One of: patient, provider, location, organization.
slugstringrequiredURL-safe slug.
sort_orderintegerrequiredSort position within siblings.
versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/categories" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "string",
"name": "string",
"parent_uuid": "string",
"scope": "location",
"sort_order": 0
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/categories" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "string",
"name": "string",
"parent_uuid": "string",
"scope": "location",
"sort_order": 0
}'/api/v1/{org_id}/documents/categories/{category_uuid}/archiveArchive category
Archive a document category (soft-delete). System categories cannot be archived — raises 422. Raises 404 if the category does not exist.
Parameters
Path Parameters
category_uuidstringrequiredorg_idstringrequiredResponses
created_atstring (date-time)requiredCreation timestamp.
depthintegerrequiredNesting depth (0 = root).
descriptionstringidstring (uuid)requiredCategory UUID.
is_systembooleanrequiredTrue if this is a system-managed category.
namestringrequiredDisplay name.
parentobjectLightweight reference to a related entity — exposes UUID and optional name.
scopestringrequiredScope this category applies to. One of: patient, provider, location, organization.
slugstringrequiredURL-safe slug.
sort_orderintegerrequiredSort position within siblings.
versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/categories/{category_uuid}/archive" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X POST "https://api.example.com/api/v1/{org_id}/documents/categories/{category_uuid}/archive" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/compliance/exportExport compliance report
Export a compliance report (PDF/CSV). Not yet implemented — deferred to M10.
Parameters
Path Parameters
org_idstringrequiredResponses
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/compliance/export" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X POST "https://api.example.com/api/v1/{org_id}/documents/compliance/export" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/legal-holdsCreate legal hold
Create a legal hold on one or more documents. Sets ``legal_hold=True`` on each document and prevents modification or deletion until the hold is released. Raises 404 if any document UUID does not exist or is soft-deleted.
Parameters
Path Parameters
org_idstringrequiredRequest Body
case_referencestringdocument_uuidsstring (uuid)[]requiredUUIDs of documents to place on hold (max 100). Duplicates are automatically removed.
reasonstringrequiredReason for the legal hold (e.g., litigation, regulatory).
Responses
case_referencestringcreated_atstring (date-time)requiredCreation timestamp.
document_countintegerrequiredNumber of documents under this hold.
document_uuidsstring (uuid)[]requiredDocuments under this hold.
held_atstring (date-time)requiredTimestamp when the hold was placed.
held_bystringidstring (uuid)requiredLegal hold UUID.
reasonstringrequiredReason for the legal hold.
release_reasonstringreleased_atstring (date-time)released_bystringstatusstringrequiredHold status. One of: active, released.
updated_atstring (date-time)requiredLast update timestamp.
versionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/legal-holds" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"case_reference": "string",
"document_uuids": [],
"reason": "string"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/legal-holds" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"case_reference": "string",
"document_uuids": [],
"reason": "string"
}'/api/v1/{org_id}/documents/retention-policiesCreate retention policy
Create a new retention policy for a scope + document type. Raises 422 if a policy for the given (scope, document_type) already exists.
Parameters
Path Parameters
org_idstringrequiredRequest Body
auto_disposebooleanIf true, documents are automatically disposed when the retention period expires.
disposal_methodenumMethod of disposal after retention expires. One of: archive, delete, shred.
archivedeleteshreddocument_typestringrequiredSemantic document type this policy governs (e.g., 'consent_form', 'periapical').
minor_extension_yearsintegerAdditional years added when the patient is a minor (only used with age_of_majority trigger).
retention_triggerenumEvent that starts the retention clock. One of: upload_date, document_date, last_visit, age_of_majority, expiration_date, termination_date.
age_of_majoritydocument_dateexpiration_datelast_visittermination_dateupload_dateretention_yearsintegerrequiredNumber of years to retain documents of this type.
scopeenumrequiredEntity scope this policy applies to. One of: patient, provider, location, organization.
locationorganizationpatientproviderResponses
auto_disposebooleanrequiredWhether automatic disposal is enabled.
created_atstring (date-time)requiredCreation timestamp.
disposal_methodstringrequiredDisposal method: archive, delete, or shred.
document_typestringrequiredSemantic document type this policy governs.
idstring (uuid)requiredRetention policy UUID.
is_activebooleanrequiredWhether this policy is currently active.
minor_extension_yearsintegerrequiredAdditional years for minor patients.
retention_triggerstringrequiredEvent that starts the retention clock.
retention_yearsintegerrequiredNumber of years to retain.
scopestringrequiredEntity scope. One of: patient, provider, location, organization.
updated_atstring (date-time)requiredLast update timestamp.
versionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/retention-policies" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"auto_dispose": false,
"disposal_method": "archive",
"document_type": "string",
"minor_extension_years": 0,
"retention_trigger": "age_of_majority",
"retention_years": 1,
"scope": "location"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/retention-policies" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"auto_dispose": false,
"disposal_method": "archive",
"document_type": "string",
"minor_extension_years": 0,
"retention_trigger": "age_of_majority",
"retention_years": 1,
"scope": "location"
}'/api/v1/{org_id}/documents/search/semanticSemantic search
Natural-language semantic search using vector similarity. Uses document embeddings and pgvector for cosine-similarity ranking. Raises 501 until embedding pipeline is implemented (M7).
Parameters
Path Parameters
org_idstringrequiredRequest Body
limitintegerMaximum results to return.
owner_typeenumlocationpatientproviderowner_uuidstring (uuid)querystringrequiredNatural language query (e.g., 'wisdom tooth X-ray from last year').
Responses
facetsobjectAggregated facet counts for search refinement.
itemsobject[]requiredpageintegerrequiredCurrent page number (1-based).
page_sizeintegerrequiredItems per page.
query_time_msintegertotalintegerrequiredTotal matching documents.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/search/semantic" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"limit": 20,
"owner_type": "string",
"owner_uuid": "string",
"query": "string"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/search/semantic" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"limit": 20,
"owner_type": "string",
"owner_uuid": "string",
"query": "string"
}'/api/v1/{org_id}/documents/templatesCreate template
Create a new document template with initial content (v1). Raises 422 if validation fails.
Parameters
Path Parameters
org_idstringrequiredRequest Body
category_slugstringcontentstringrequiredTemplate body content for the initial version (v1).
content_formatenumContent format. One of: html, markdown, pdf. Defaults to html.
htmlmarkdownpdfdescriptionstringdocument_typestringrequiredSemantic document type produced by this template (e.g., 'general_consent', 'treatment_plan_unsigned').
is_dso_managedbooleanIf true, the template is managed at the DSO level and cannot be modified by individual practices.
merge_fieldsobject[]namestringrequiredTemplate display name (e.g., 'Standard Adult Consent').
required_for_proceduresstring[]requires_signaturebooleanWhether documents created from this template require signatures.
scopeenumrequiredEntity scope this template applies to. One of: patient, provider, location, organization.
locationorganizationpatientprovidersignature_partiesstring[]Responses
category_slugstringcontent_formatstringrequiredContent format. One of: html, markdown, pdf.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_typestringrequiredSemantic document type produced by this template.
idstring (uuid)requiredTemplate UUID.
is_activebooleanrequiredWhether the template is active.
is_dso_managedbooleanrequiredWhether the template is DSO-managed.
merge_fieldsobject[]namestringrequiredTemplate display name.
required_for_proceduresstring[]requires_signaturebooleanrequiredWhether documents require signatures.
scopestringrequiredEntity scope. One of: patient, provider, location, organization.
signature_partiesstring[]updated_atstring (date-time)requiredLast update timestamp.
versionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category_slug": "string",
"content": "string",
"content_format": "html",
"description": "string",
"document_type": "string",
"name": "string",
"scope": "location"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category_slug": "string",
"content": "string",
"content_format": "html",
"description": "string",
"document_type": "string",
"name": "string",
"scope": "location"
}'/api/v1/{org_id}/documents/templates/{template_uuid}/archiveArchive template
Archive a document template (soft-delete). Raises 404 if the template does not exist.
Parameters
Path Parameters
template_uuidstringrequiredorg_idstringrequiredResponses
category_slugstringcontent_formatstringrequiredContent format. One of: html, markdown, pdf.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_typestringrequiredSemantic document type produced by this template.
idstring (uuid)requiredTemplate UUID.
is_activebooleanrequiredWhether the template is active.
is_dso_managedbooleanrequiredWhether the template is DSO-managed.
merge_fieldsobject[]namestringrequiredTemplate display name.
required_for_proceduresstring[]requires_signaturebooleanrequiredWhether documents require signatures.
scopestringrequiredEntity scope. One of: patient, provider, location, organization.
signature_partiesstring[]updated_atstring (date-time)requiredLast update timestamp.
versionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}/archive" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}/archive" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/templates/{template_uuid}/generateGenerate document from template
Render a template with merge data and create a new document. Resolves ``{{namespace.field}}`` placeholders in the template's latest published version using the provided ``merge_data``. The rendered content is stored as a new HTML document linked to the source template version. Raises 404 if template not found. Raises 422 if template has no published versions or owner validation fails.
Parameters
Path Parameters
template_uuidstringrequiredorg_idstringrequiredRequest Body
is_org_scopedbooleanIf true, document is org-scoped (no owner).
location_uuidstringmerge_dataobjectMerge field values as flat key→value pairs (e.g., {"patient.name": "John Doe", "date.today": "2026-03-14"}).
owner_typeenumlocationpatientproviderowner_uuidstringtitlestringResponses
ai_classificationstringai_confidencenumbercategoryobjectLightweight reference to a related entity — exposes UUID and optional name.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_datestring (date)document_typeenumrequiredSemantic document type from the dental document taxonomy.
aclsadministrative_procedureaed_maintenance_recordanesthesia_consentannual_filingbaabackground_checkbiological_monitoring_resultbitewingboard_certificationbrand_assetbreach_logbuilding_permitbusiness_licensebylaws_operating_agreementcalibration_recordcase_presentationcbctce_certificatece_summarycephalometriccertificate_of_occupancyclaim_attachmentclinical_protocolcontrolled_substance_licensecorporate_resolutioncovid_screeningcpr_blscredentialing_packetdea_registrationdigital_impressionemergency_contact_formemergency_procedureemergency_protocolemployee_handbookemployment_agreementeobequipment_manualextraoral_photofacility_registrationfinancial_agreementfinancial_statementfire_inspectionform_1099formation_documentsgeneral_consenthealth_department_inspectionhealth_questionnairehipaa_acknowledgmenthipaa_training_certificateinfection_control_manualinsurance_card_backinsurance_card_frontinsurance_contractintraoral_photoit_agreementjob_descriptionlab_case_photoslab_contractlab_delivery_confirmationlab_prescriptionlease_agreementliability_insurancemaintenance_logmalpractice_insurancemarketing_collateralmarketing_templatemedical_historyminor_guardian_authorizationnarrativenpi_documentationnppodontogram_snapshotoffer_letterosha_compliance_documentosha_inspectionosha_training_certificateotherpanel_participation_letterpanoramicpatient_letterpatient_registrationpayment_plan_agreementpdmp_check_documentationperformance_reviewperiapicalperiodontal_chartphoto_id_backphoto_id_frontpreauth_requestpreauth_responseprescription_recordprivacy_policyprocedure_consentprogress_notesproperty_insuranceradiation_safety_inspectionradiation_safety_trainingrecall_noticereceiptreferral_letter_incomingreferral_letter_outgoingrisk_assessmentsds_sheetsecurity_policysedation_permitsmile_design_photospecialist_reportspecialty_certificationstate_dental_licensestatementsterilization_logtax_returntraining_manualtreatment_plan_signedtreatment_plan_unsignedvaccination_recordvendor_contractw9warranty_documentationwater_quality_reportworkers_compexpiration_datestring (date)file_namestringrequiredOriginal filename including extension.
file_sizeintegerrequiredFile size in bytes.
has_thumbnailbooleanrequiredWhether a thumbnail is available for the current version.
idstring (uuid)requiredDocument UUID.
is_lockedbooleanrequiredWhether the document is locked.
is_org_scopedbooleanrequiredTrue if this document belongs to the organization.
is_signedbooleanrequiredWhether the document has been signed.
is_starredbooleanrequiredWhether the document is starred.
legal_holdbooleanrequiredWhether the document is under legal hold.
link_targetsobject[]Resolved cross-entity links for this document.
mime_typestringrequiredMIME type.
ocr_statusenumrequiredOCR processing status. One of: pending, processing, completed, failed, skipped.
completedfailedpendingprocessingskippedowner_typestringpage_countintegerprocessing_statusstringstatusenumrequiredDocument lifecycle status. One of: uploading, processing, active, quarantined, error, archived.
activearchivederrorprocessingquarantineduploadingtagsstring[]Applied tags.
titlestringrequiredDisplay title.
updated_atstring (date-time)requiredLast update timestamp.
uploaded_bystringversionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}/generate" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"is_org_scoped": false,
"location_uuid": "string",
"merge_data": {},
"owner_type": "string",
"owner_uuid": "string"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}/generate" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"is_org_scoped": false,
"location_uuid": "string",
"merge_data": {},
"owner_type": "string",
"owner_uuid": "string"
}'/api/v1/{org_id}/documents/templates/{template_uuid}/publishPublish new template version
Publish a new version of a document template. Creates an immutable ``DocumentTemplateVersion`` record with an incremented version number. Raises 404 if the template does not exist. Raises 409 if the ``base_version`` is stale.
Parameters
Path Parameters
template_uuidstringrequiredorg_idstringrequiredRequest Body
base_versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
change_notestringcontentstringrequiredNew template body content for this version.
Responses
category_slugstringcontent_formatstringrequiredContent format. One of: html, markdown, pdf.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_typestringrequiredSemantic document type produced by this template.
idstring (uuid)requiredTemplate UUID.
is_activebooleanrequiredWhether the template is active.
is_dso_managedbooleanrequiredWhether the template is DSO-managed.
merge_fieldsobject[]namestringrequiredTemplate display name.
required_for_proceduresstring[]requires_signaturebooleanrequiredWhether documents require signatures.
scopestringrequiredEntity scope. One of: patient, provider, location, organization.
signature_partiesstring[]updated_atstring (date-time)requiredLast update timestamp.
versionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}/publish" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"change_note": "string",
"content": "string"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}/publish" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"change_note": "string",
"content": "string"
}'/api/v1/{org_id}/documents/templates/validate-codesValidate procedure codes
Validate a list of procedure codes against the system catalog. Returns which codes are valid (exist) and which are invalid.
Parameters
Path Parameters
org_idstringrequiredRequest Body
codesstring[]requiredProcedure codes to validate (max 100).
Responses
invalidstring[]requiredCodes that do not exist.
validstring[]requiredCodes that exist in the system.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates/validate-codes" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"codes": []
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/templates/validate-codes" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"codes": []
}'/api/v1/{org_id}/documents/triage/{document_uuid}/fileFile triage document
File a triage document into a category. Raises 404 if the document or category does not exist. Raises 422 if the document is already filed in a category.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredRequest Body
category_uuidstring (uuid)requiredUUID of the category to file the document into.
document_typestringResponses
ai_classificationstringai_confidencenumbercategoryobjectLightweight reference to a related entity — exposes UUID and optional name.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_datestring (date)document_typeenumrequiredSemantic document type from the dental document taxonomy.
aclsadministrative_procedureaed_maintenance_recordanesthesia_consentannual_filingbaabackground_checkbiological_monitoring_resultbitewingboard_certificationbrand_assetbreach_logbuilding_permitbusiness_licensebylaws_operating_agreementcalibration_recordcase_presentationcbctce_certificatece_summarycephalometriccertificate_of_occupancyclaim_attachmentclinical_protocolcontrolled_substance_licensecorporate_resolutioncovid_screeningcpr_blscredentialing_packetdea_registrationdigital_impressionemergency_contact_formemergency_procedureemergency_protocolemployee_handbookemployment_agreementeobequipment_manualextraoral_photofacility_registrationfinancial_agreementfinancial_statementfire_inspectionform_1099formation_documentsgeneral_consenthealth_department_inspectionhealth_questionnairehipaa_acknowledgmenthipaa_training_certificateinfection_control_manualinsurance_card_backinsurance_card_frontinsurance_contractintraoral_photoit_agreementjob_descriptionlab_case_photoslab_contractlab_delivery_confirmationlab_prescriptionlease_agreementliability_insurancemaintenance_logmalpractice_insurancemarketing_collateralmarketing_templatemedical_historyminor_guardian_authorizationnarrativenpi_documentationnppodontogram_snapshotoffer_letterosha_compliance_documentosha_inspectionosha_training_certificateotherpanel_participation_letterpanoramicpatient_letterpatient_registrationpayment_plan_agreementpdmp_check_documentationperformance_reviewperiapicalperiodontal_chartphoto_id_backphoto_id_frontpreauth_requestpreauth_responseprescription_recordprivacy_policyprocedure_consentprogress_notesproperty_insuranceradiation_safety_inspectionradiation_safety_trainingrecall_noticereceiptreferral_letter_incomingreferral_letter_outgoingrisk_assessmentsds_sheetsecurity_policysedation_permitsmile_design_photospecialist_reportspecialty_certificationstate_dental_licensestatementsterilization_logtax_returntraining_manualtreatment_plan_signedtreatment_plan_unsignedvaccination_recordvendor_contractw9warranty_documentationwater_quality_reportworkers_compexpiration_datestring (date)file_namestringrequiredOriginal filename including extension.
file_sizeintegerrequiredFile size in bytes.
has_thumbnailbooleanrequiredWhether a thumbnail is available for the current version.
idstring (uuid)requiredDocument UUID.
is_lockedbooleanrequiredWhether the document is locked.
is_org_scopedbooleanrequiredTrue if this document belongs to the organization.
is_signedbooleanrequiredWhether the document has been signed.
is_starredbooleanrequiredWhether the document is starred.
legal_holdbooleanrequiredWhether the document is under legal hold.
link_targetsobject[]Resolved cross-entity links for this document.
mime_typestringrequiredMIME type.
ocr_statusenumrequiredOCR processing status. One of: pending, processing, completed, failed, skipped.
completedfailedpendingprocessingskippedowner_typestringpage_countintegerprocessing_statusstringstatusenumrequiredDocument lifecycle status. One of: uploading, processing, active, quarantined, error, archived.
activearchivederrorprocessingquarantineduploadingtagsstring[]Applied tags.
titlestringrequiredDisplay title.
updated_atstring (date-time)requiredLast update timestamp.
uploaded_bystringversionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/triage/{document_uuid}/file" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category_uuid": "00000000-0000-0000-0000-000000000000",
"document_type": "string"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/triage/{document_uuid}/file" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category_uuid": "00000000-0000-0000-0000-000000000000",
"document_type": "string"
}'/api/v1/{org_id}/documents/triage/auto-classifyAuto-classify triage documents
Auto-classify unfiled documents using AI. Not yet implemented — requires M7 AI pipeline.
Parameters
Path Parameters
org_idstringrequiredResponses
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/triage/auto-classify" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X POST "https://api.example.com/api/v1/{org_id}/documents/triage/auto-classify" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/triage/bulk-fileBulk file by AI confidence
Bulk-file triage documents with sufficient AI confidence. Files documents whose ``ai_confidence`` is at or above the specified threshold. Documents without a clear category mapping are skipped.
Parameters
Path Parameters
org_idstringrequiredRequest Body
min_confidencenumberMinimum AI confidence score required for auto-filing (0.0-1.0).
Responses
filed_countintegerrequiredNumber of documents successfully filed.
skipped_countintegerrequiredNumber of documents skipped (no clear mapping).
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/triage/bulk-file" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"min_confidence": 0.9
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/triage/bulk-file" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"min_confidence": 0.9
}'/api/v1/{org_id}/documents/uploadInitiate upload
Initiate a document upload and receive a pre-signed URL. 1. Validates MIME type against allowlist and file size against org limit. 2. Resolves ``owner_uuid`` to internal ID if provided. 3. Creates a Document record with ``status='uploading'``. 4. Generates a pre-signed upload URL for the staging prefix. The client uploads directly to the staging location. After upload, call ``POST /{document_uuid:uuid}/confirm-upload`` to trigger virus scanning and promotion to permanent storage. Raises 422 if MIME type or file size is invalid, or if mutual exclusion between ``is_org_scoped`` and ``owner_type``/``owner_uuid`` is violated. Raises 404 if the owner or category entity is not found.
Parameters
Path Parameters
org_idstringrequiredRequest Body
category_uuidstring (uuid)descriptionstringdocument_datestring (date)document_typestringrequiredSemantic document type (e.g., 'consent_form', 'periapical').
expiration_datestring (date)file_namestringrequiredOriginal filename including extension.
file_sizeintegerrequiredFile size in bytes.
is_org_scopedbooleanIf true, document belongs to the organization. owner_type and owner_uuid must both be omitted.
location_uuidstring (uuid)mime_typestringrequiredMIME type (e.g., 'application/pdf', 'image/jpeg').
owner_typeenumlocationpatientproviderowner_uuidstring (uuid)tagsstring[]titlestringrequiredDisplay title for the document.
Responses
documentobjectrequiredFull document representation.
uploadobjectrequiredPre-signed upload target returned to the client.
detailobject[]curl -X POST "https://api.example.com/api/v1/{org_id}/documents/upload" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category_uuid": "string",
"description": "string",
"document_date": "string",
"document_type": "string",
"expiration_date": "string",
"file_name": "string",
"file_size": 1,
"mime_type": "string",
"title": "string"
}'curl -X POST "https://api.example.com/api/v1/{org_id}/documents/upload" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"category_uuid": "string",
"description": "string",
"document_date": "string",
"document_type": "string",
"expiration_date": "string",
"file_name": "string",
"file_size": 1,
"mime_type": "string",
"title": "string"
}'/api/v1/{org_id}/documents/{document_uuid}Update document metadata
Update document metadata fields. Requires ``base_version`` for optimistic concurrency. Raises 409 if the version is stale. Raises 404 if document not found.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredRequest Body
base_versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
category_uuidstring (uuid)descriptionstringdocument_datestring (date)document_typestringexpiration_datestring (date)is_starredbooleantitlestringResponses
ai_classificationstringai_confidencenumbercategoryobjectLightweight reference to a related entity — exposes UUID and optional name.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_datestring (date)document_typeenumrequiredSemantic document type from the dental document taxonomy.
aclsadministrative_procedureaed_maintenance_recordanesthesia_consentannual_filingbaabackground_checkbiological_monitoring_resultbitewingboard_certificationbrand_assetbreach_logbuilding_permitbusiness_licensebylaws_operating_agreementcalibration_recordcase_presentationcbctce_certificatece_summarycephalometriccertificate_of_occupancyclaim_attachmentclinical_protocolcontrolled_substance_licensecorporate_resolutioncovid_screeningcpr_blscredentialing_packetdea_registrationdigital_impressionemergency_contact_formemergency_procedureemergency_protocolemployee_handbookemployment_agreementeobequipment_manualextraoral_photofacility_registrationfinancial_agreementfinancial_statementfire_inspectionform_1099formation_documentsgeneral_consenthealth_department_inspectionhealth_questionnairehipaa_acknowledgmenthipaa_training_certificateinfection_control_manualinsurance_card_backinsurance_card_frontinsurance_contractintraoral_photoit_agreementjob_descriptionlab_case_photoslab_contractlab_delivery_confirmationlab_prescriptionlease_agreementliability_insurancemaintenance_logmalpractice_insurancemarketing_collateralmarketing_templatemedical_historyminor_guardian_authorizationnarrativenpi_documentationnppodontogram_snapshotoffer_letterosha_compliance_documentosha_inspectionosha_training_certificateotherpanel_participation_letterpanoramicpatient_letterpatient_registrationpayment_plan_agreementpdmp_check_documentationperformance_reviewperiapicalperiodontal_chartphoto_id_backphoto_id_frontpreauth_requestpreauth_responseprescription_recordprivacy_policyprocedure_consentprogress_notesproperty_insuranceradiation_safety_inspectionradiation_safety_trainingrecall_noticereceiptreferral_letter_incomingreferral_letter_outgoingrisk_assessmentsds_sheetsecurity_policysedation_permitsmile_design_photospecialist_reportspecialty_certificationstate_dental_licensestatementsterilization_logtax_returntraining_manualtreatment_plan_signedtreatment_plan_unsignedvaccination_recordvendor_contractw9warranty_documentationwater_quality_reportworkers_compexpiration_datestring (date)file_namestringrequiredOriginal filename including extension.
file_sizeintegerrequiredFile size in bytes.
has_thumbnailbooleanrequiredWhether a thumbnail is available for the current version.
idstring (uuid)requiredDocument UUID.
is_lockedbooleanrequiredWhether the document is locked.
is_org_scopedbooleanrequiredTrue if this document belongs to the organization.
is_signedbooleanrequiredWhether the document has been signed.
is_starredbooleanrequiredWhether the document is starred.
legal_holdbooleanrequiredWhether the document is under legal hold.
link_targetsobject[]Resolved cross-entity links for this document.
mime_typestringrequiredMIME type.
ocr_statusenumrequiredOCR processing status. One of: pending, processing, completed, failed, skipped.
completedfailedpendingprocessingskippedowner_typestringpage_countintegerprocessing_statusstringstatusenumrequiredDocument lifecycle status. One of: uploading, processing, active, quarantined, error, archived.
activearchivederrorprocessingquarantineduploadingtagsstring[]Applied tags.
titlestringrequiredDisplay title.
updated_atstring (date-time)requiredLast update timestamp.
uploaded_bystringversionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"category_uuid": "string",
"description": "string",
"document_date": "string",
"document_type": "string"
}'curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"category_uuid": "string",
"description": "string",
"document_date": "string",
"document_type": "string"
}'/api/v1/{org_id}/documents/categories/{category_uuid}Update category
Update a document category. Raises 404 if the category or new parent does not exist.
Parameters
Path Parameters
category_uuidstringrequiredorg_idstringrequiredRequest Body
base_versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
descriptionstringnamestringparent_uuidstring (uuid)sort_orderintegerResponses
created_atstring (date-time)requiredCreation timestamp.
depthintegerrequiredNesting depth (0 = root).
descriptionstringidstring (uuid)requiredCategory UUID.
is_systembooleanrequiredTrue if this is a system-managed category.
namestringrequiredDisplay name.
parentobjectLightweight reference to a related entity — exposes UUID and optional name.
scopestringrequiredScope this category applies to. One of: patient, provider, location, organization.
slugstringrequiredURL-safe slug.
sort_orderintegerrequiredSort position within siblings.
versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
detailobject[]curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/categories/{category_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"description": "string",
"name": "string",
"parent_uuid": "string",
"sort_order": 1
}'curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/categories/{category_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"description": "string",
"name": "string",
"parent_uuid": "string",
"sort_order": 1
}'/api/v1/{org_id}/documents/legal-holds/{hold_uuid}/releaseRelease legal hold
Release a legal hold, allowing held documents to be modified again. Only clears the ``legal_hold`` flag on documents that have no other active holds remaining. Raises 404 if the hold does not exist. Raises 409 if the version is stale. Raises 422 if the hold has already been released.
Parameters
Path Parameters
hold_uuidstringrequiredorg_idstringrequiredRequest Body
base_versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
release_reasonstringResponses
case_referencestringcreated_atstring (date-time)requiredCreation timestamp.
document_countintegerrequiredNumber of documents under this hold.
document_uuidsstring (uuid)[]requiredDocuments under this hold.
held_atstring (date-time)requiredTimestamp when the hold was placed.
held_bystringidstring (uuid)requiredLegal hold UUID.
reasonstringrequiredReason for the legal hold.
release_reasonstringreleased_atstring (date-time)released_bystringstatusstringrequiredHold status. One of: active, released.
updated_atstring (date-time)requiredLast update timestamp.
versionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/legal-holds/{hold_uuid}/release" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"release_reason": "string"
}'curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/legal-holds/{hold_uuid}/release" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"release_reason": "string"
}'/api/v1/{org_id}/documents/retention-policies/{policy_uuid}Update retention policy
Update a retention policy. Requires ``base_version`` for optimistic concurrency. Raises 409 if the version is stale. Raises 404 if policy not found.
Parameters
Path Parameters
policy_uuidstringrequiredorg_idstringrequiredRequest Body
auto_disposebooleanbase_versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
disposal_methodenumarchivedeleteshredis_activebooleanminor_extension_yearsintegerretention_triggerenumage_of_majoritydocument_dateexpiration_datelast_visittermination_dateupload_dateretention_yearsintegerResponses
auto_disposebooleanrequiredWhether automatic disposal is enabled.
created_atstring (date-time)requiredCreation timestamp.
disposal_methodstringrequiredDisposal method: archive, delete, or shred.
document_typestringrequiredSemantic document type this policy governs.
idstring (uuid)requiredRetention policy UUID.
is_activebooleanrequiredWhether this policy is currently active.
minor_extension_yearsintegerrequiredAdditional years for minor patients.
retention_triggerstringrequiredEvent that starts the retention clock.
retention_yearsintegerrequiredNumber of years to retain.
scopestringrequiredEntity scope. One of: patient, provider, location, organization.
updated_atstring (date-time)requiredLast update timestamp.
versionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/retention-policies/{policy_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"auto_dispose": null,
"base_version": 1,
"disposal_method": "string",
"is_active": null,
"minor_extension_years": 1
}'curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/retention-policies/{policy_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"auto_dispose": null,
"base_version": 1,
"disposal_method": "string",
"is_active": null,
"minor_extension_years": 1
}'/api/v1/{org_id}/documents/templates/{template_uuid}Update template
Update document template metadata. Raises 404 if the template does not exist. Raises 409 if the ``base_version`` is stale.
Parameters
Path Parameters
template_uuidstringrequiredorg_idstringrequiredRequest Body
base_versionintegerrequiredCurrent version for optimistic concurrency — rejected with 409 if stale.
category_slugstringcontent_formatenumhtmlmarkdownpdfdescriptionstringdocument_typestringis_activebooleanmerge_fieldsobject[]namestringrequired_for_proceduresstring[]requires_signaturebooleansignature_partiesstring[]Responses
category_slugstringcontent_formatstringrequiredContent format. One of: html, markdown, pdf.
created_atstring (date-time)requiredCreation timestamp.
descriptionstringdocument_typestringrequiredSemantic document type produced by this template.
idstring (uuid)requiredTemplate UUID.
is_activebooleanrequiredWhether the template is active.
is_dso_managedbooleanrequiredWhether the template is DSO-managed.
merge_fieldsobject[]namestringrequiredTemplate display name.
required_for_proceduresstring[]requires_signaturebooleanrequiredWhether documents require signatures.
scopestringrequiredEntity scope. One of: patient, provider, location, organization.
signature_partiesstring[]updated_atstring (date-time)requiredLast update timestamp.
versionintegerrequiredOptimistic concurrency version.
detailobject[]curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"category_slug": "string",
"content_format": "string",
"description": "string",
"document_type": "string"
}'curl -X PATCH "https://api.example.com/api/v1/{org_id}/documents/templates/{template_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_version": 1,
"category_slug": "string",
"content_format": "string",
"description": "string",
"document_type": "string"
}'/api/v1/{org_id}/documents/{document_uuid}/links/{link_uuid}Delete document link
Delete a cross-entity link from a document. Raises 404 if the document, link does not exist, or link does not belong to the specified document.
Parameters
Path Parameters
document_uuidstringrequiredlink_uuidstringrequiredorg_idstringrequiredResponses
detailobject[]curl -X DELETE "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/links/{link_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X DELETE "https://api.example.com/api/v1/{org_id}/documents/{document_uuid}/links/{link_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/retention-policies/{policy_uuid}Delete retention policy
Hard-delete a retention policy. Raises 404 if the policy does not exist.
Parameters
Path Parameters
policy_uuidstringrequiredorg_idstringrequiredResponses
detailobject[]curl -X DELETE "https://api.example.com/api/v1/{org_id}/documents/retention-policies/{policy_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X DELETE "https://api.example.com/api/v1/{org_id}/documents/retention-policies/{policy_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"/api/v1/{org_id}/documents/triage/{document_uuid}Delete triage item
Delete (soft-delete) an unfiled triage document. Raises 404 if the document does not exist. Raises 422 if the document is already filed in a category.
Parameters
Path Parameters
document_uuidstringrequiredorg_idstringrequiredResponses
detailobject[]curl -X DELETE "https://api.example.com/api/v1/{org_id}/documents/triage/{document_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"curl -X DELETE "https://api.example.com/api/v1/{org_id}/documents/triage/{document_uuid}" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"