Skip to main content

Get one page of a document as context for a redaction prompt.

GET/api/v1/documents/{document_id}/page-contextdocuments:read

The page's image (base64 PNG, existing redactions drawn on), its text blocks with normalised boxes and a coordinate hint: what the Auto Redact chat shows a model for a follow-up prompt. The page is the page query member, from 1. A document with no file or no PDF is 409. Needs View Page Ai Context, View Document Content, View Redaction Annotations and access to the document.

Scopedocuments:read
AsynchronousNo
MCP toolget_document_page_context
Portal permissionsview_page_ai_context, view_document_content, view_redaction_annotations

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
pagequeryintegerRequiredThe 1-based page. ≥ -2147483648; ≤ 2147483647
Docwize-Versionheaderstring (date)Optional
If-None-MatchheaderstringOptionalAnswers 304 when the representation is unchanged (resources that publish an ETag).

Responses​

StatusDescriptionBody
200Success.application/json DocumentPageContext
304Not modified (If-None-Match matched the ETag).
400invalid_versionapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409conflictapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

DocumentPageContext​

FieldTypeRequiredDescription
contextobjectRequiredThe Portal's page context, format document_page_context: the page image (base64 PNG) with the existing redactions drawn on, the text blocks with normalised boxes (0 to 1), the page count and a coordinate hint.
pageintegerRequired≥ -2147483648; ≤ 2147483647