Skip to main content
Create a document per file

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Body

application/json
definitionType
string
required

Flavour of the document to create - edoc for a document whose content the system generates from its metadata definition, ext for a document built around an uploaded main file. It has to be one of the flavours the metadata definition allows.

Example:

"ext"

workflow
string
required

Identifier of the workflow definition that governs the created document. It has to match the workflow declared by the document's metadata definition.

Example:

"wf_archive"

actionId
integer | null

Identifier of the action from the document's workflow definition that is executed right after the document is created. It may be omitted only when the workflow's initial state is automatic.

Required range: x >= 0
Example:

3

addMentionRights
boolean

Grants read access to the users mentioned in comment, including those who could not see the document otherwise. Mentioned external addresses receive a view share as well, provided the comment is public.

body
object
comment
string

Comment stored on the workflow history record of the executed action. Its text is scanned for user and document mentions. May carry basic formatting — bold, italic, underline, https links and bullet lists; everything else is stripped on input.

Maximum string length: 2000
Example:

"Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>."

convertToPDF
boolean
default:false

Converts the uploaded main file to PDF before the document is created. Files listed in optionalData.merge are governed by optionalData.convert instead.

Example:

false

draftId
string

Identifier of the draft the document is created from. The draft is deleted once the document has been created.

Example:

"8b312068-ecdf-4fa6-8f13-c6183da85f43"

forcePdfA
boolean | null
default:false

Together with usePdfA, converts an already-signed main file to PDF/A as well, even though the conversion removes the existing signature. Without it such a file is left unconverted so that its signature survives.

Example:

false

groupReceiver
string[]

Groups receiving the document as recipients of the executed workflow action, by group identifier.

Example:
isPublicComment
boolean
default:false

Whether comment is visible to external recipients who open the document through a share. A comment that is not public is hidden from them, and mentions inside it do not reach them either.

Example:

false

optionalData
object

Advanced options applied while the document is created - its folder placement, file merging, tags, and the sign fields and content to embed.

receiver

Users receiving the document as recipients of the executed workflow action, by username. A value that matches no user but is a valid email address becomes an external recipient and is given a share.

Username that uniquely identifies a user in the system. Usually an email address. A single "+" sub-addressing tag (RFC 5233) is allowed in the local part.

Minimum string length: 1
Pattern: ^[A-Za-z0-9.@_+-]+$
usePdfA
boolean | null
default:false

Converts the produced PDF to PDF/A, the format suited to long-term archiving. The conversion re-renders the file, so its visual appearance may change.

Example:

false

Response

Returns the identifiers of the created documents, the positions of the entries that failed and the outcome of every entry.

count
integer
required

Number of items the request processed, successful and failed alike.

Example:

22

errors
boolean
required

Whether any item failed. Check it before treating the call as a clean success - the request itself answers 200 even when individual items did not go through.

Example:

false

failed
integer[]

Entries of the request that produced no document, given by their position in the submitted list counting from zero. The reason of each is in its entry of items.

Example:
items
object[]

Per-item outcomes. Endpoints report the failed items here; some also list the successful ones, so read each item's own status rather than inferring it from being listed.

success
string[]

Identifiers of the documents that were created.

Example: