object'document' required
namestring nullable required
The name you gave it (name when creating it).
operation'create' | 'review' | 'edit' required
format'docx' | 'pdf' | 'pptx' | 'xlsx' | 'artifact' nullable required
The file you want. docx → Word (with a PDF too), pdf → only the PDF, pptx → PowerPoint (with a PDF), xlsx → Excel (with a PDF). artifact → a web page that keeps data (in each visitor's browser, or shared by everyone), on a signed link; with retention: none, a page to download (see the artifacts guide). Without it, Doconda works it out from prompt.
type'report' | 'letter' | 'contract' | 'memo' | 'minutes' | 'presentation' | 'spreadsheet' | 'artifact' nullable required
What Doconda decided the document is. It sets the default look (a contract: serif, justified, numbered clauses; a letter: no page numbers). You don't choose it: say what you want in prompt, and the look in style.
mode'prompt' | 'content' nullable required
revisioninteger required
1 when it's made; +1 every time its file is saved by hand (PUT /documents/{id}/file). Send it back when saving so nobody's changes are overwritten.
status'queued' | 'running' | 'ready' | 'ready_with_warnings' | 'needs_review' | 'failed' | 'canceled' required
phasestring nullable required
pagesinteger nullable required
style_unsupportedstring[] required
retention'none' | '1d' | '7d' | '30d' | '90d' required
How long Doconda keeps a document's content (files, request, report, events; an artifact's page and data) once it finishes. none: 15 minutes. Then only what billing needs stays (status, format, pages, cost).
expires_atstring date-time nullable required
When its content will be deleted: retention counted from when it finished or was last saved by hand (with retention: none, from when it finished).
content_deleted_atstring date-time nullable required
When its content was deleted: its retention ended, or it was deleted.
created_atstring date-time required
completed_atstring date-time nullable required