Skip to main content
POST
Save a version edited by hand: a new document from the edited file, with its PDF, previews and what changed (a Word file is also reviewed)

Autorizaciones

Authorization
string
header
requerido

Authorization: Bearer ak_eu_…, a key from the dashboard (API keys).

Parámetros de ruta

document_id
string
requerido

Cuerpo

file
requerido

The edited file: same format as the document (Word, Excel, PowerPoint or PDF).

Pattern: ^file_

Respuesta

The new document (mode: manual, parent_id). Free: no AI.

id
string
requerido
Pattern: ^doc_[0-9A-HJKMNP-TV-Z]{26}$
object
string
requerido
Allowed value: "document"
name
string | null
requerido

The name you gave it (name when creating it).

operation
enum<string>
requerido
Opciones disponibles:
create,
review,
edit
format
enum<string> | null
requerido

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.

Opciones disponibles:
docx,
pdf,
pptx,
xlsx,
artifact
type
enum<string> | null
requerido

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.

Opciones disponibles:
report,
letter,
contract,
memo,
minutes,
presentation,
spreadsheet,
artifact
mode
enum<string> | null
requerido

manual: a version someone edited by hand in the editor (POST /documents/{id}/versions).

Opciones disponibles:
prompt,
content,
manual
parent_id
string | null
requerido

The document this version was edited from.

Pattern: ^doc_[0-9A-HJKMNP-TV-Z]{26}$
status
enum<string>
requerido
Opciones disponibles:
queued,
running,
ready,
ready_with_warnings,
needs_review,
failed,
canceled
phase
string | null
requerido
pages
integer | null
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
style_applied
object | null
requerido
style_unsupported
string[]
requerido
validation_summary
object | null
requerido
repair_summary
object | null
requerido
error
object | null
requerido
versions
object
requerido
metadata
object
requerido
retention
enum<string>
requerido

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).

Opciones disponibles:
none,
1d,
7d,
30d,
90d
expires_at
string<date-time> | null
requerido

When its content will be deleted (set once it finishes, from retention).

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
route
object | null
requerido

How the file was made, and why. fast: in seconds, with the basic style (quality: "fast"). agent: in minutes, with any design, templates, comments, tracked changes and charts (standard and best).

quality
object | null
requerido

create and edit: the quality level asked for and the one used, which sets the price.

artifact
object | null
requerido

Artifacts only: where the page keeps its data.

content_deleted_at
string<date-time> | null
requerido

When its content was deleted: its retention ended, or it was deleted.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
created_at
string<date-time>
requerido
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
completed_at
string<date-time> | null
requerido
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
outputs
object[]

Present once finished.