Skip to main content
POST
Create Document

Authorizations

X-API-Key
string
header
required

Body

application/json
title
string
required

Document title.

type_id
string
required

Document type id.

date
string

Document date, YYYY-MM-DD.

file_id
string

Id of a confirmed upload (FileService.ConfirmFileUpload) to build the document from, instead of a template. The file becomes the document's PDF and can be sent for signing as it is. Mutually exclusive with template_id.

number
string

Registration number to record on the document.

organization_id
string

Legal entity to attribute the document to.

subject_employee_ids
string[]

Employees the document is about (its subjects).

template_id
string

Template id and version the document is generated from. Discover these with ListDocumentTemplates (see DocumentTemplate.version). Required unless file_id is set.

template_values
object

Values for the template variables, keyed by variable id. Read the expected shape from the template's variable_schema (GetDocumentTemplate).

template_version
integer<int32>

Version of the template to use; take it from DocumentTemplate.version.

Response

OK

document
object

The created draft document.