Skip to main content
Create a document

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.

Query Parameters

photoSize
enum<string>
default:nano

Rendition of the profile photo to embed for every user in the users map of the response.

Available options:
nano,
small,
medium,
big
Example:

"small"

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 created document together with the users it references.

results
object[]

The documents and folders the call resolved to. A folder is represented in the folder shape, everything else in the document shape.

Full representation of a document.

users
object

Minimum profile of every user the results refer to - the creator, the workflow participants, the users mentioned in comments or sign fields and the users named in the rights. Keys are usernames for internal users and e-mail addresses for external ones.