Skip to main content
Update a draft

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.

Path Parameters

id
string
required

Identifier of the draft to overwrite.

Minimum string length: 1
Example:

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

version
integer
required

Version the caller last saw. It guards the draft from overwriting a newer state, which matters because the same draft is typically saved from one screen repeatedly.

Required range: x > 0
Example:

3

Body

application/json
body
object
required

The document as it stands now, in the shape it is stored in, with the metadata definition's own fields alongside as further keys. It replaces the stored draft rather than being merged into it.

cloneFiles
boolean
default:false

Gives the draft its own copies of the attachments, on the same grounds as cloneMainFile.

Example:

false

cloneMainFile
boolean
default:false

Gives the draft its own copy of the main file instead of pointing at the one it was taken from, so editing the draft cannot affect the original.

Example:

false

Response

Returns the draft's identifier and its new version.

id
string

Value the request produced: the identifier of the object it created or acted upon, or - on the endpoints that issue one - the token it granted.

Example:

"e58cc1acbba3cd8056ce6adb44d46a11a113170e884509c179701270b915b59b"

version
integer

Current version of the record. Send it back with the next update so a concurrent change is not overwritten silently.

Example:

3