Add Document


Adds a document along with its optional metadata and optional thumbnail. The DocumentGUID is returned in the response.

This call is an alternative for the sequence Create Document, Set Document Resource, Set Document Metadata and Set Document Thumbnail. The aforementioned allow to build the document and its properties step by step in case multipart/form-data is not possible.



Request Headers:

Content-Type : multipart/form-data
MisKey : see Authentication

Request Body:

Form data 1: required

  • Name: JsonString
  • Content-Type: application/json
  • JSON Object containing:
    • DocumentGUID – optional – the Document GUID, when specified this GUID is used and if it exists a new revision of the same document is added and made current.
    • Name – required – document name
    • Type – required – content type of the document
    • Meta – JSON object containing the metadata about the document
    • Dimensions – Size of the document in units

Form data 2: optional

  • Name: Original name of the document
  • Content-Type: application/octet-stream
  • Binary content of the document

Form data 3: optional

  • Name: JsonString
  • Content-Type: image/png
  • Binary content of the document thumbnail


Content type application/json containing the result of the operation.


200 OK : {“Message”: “Document successfully saved”, “DocumentGUID”:”00000000-0000-0000-0000-000000000000″}


  • 401 Unauthorised : {“Message”:”Invalid MisKey”}
  • 401 Unauthorised : {“Message”: “”MisKey” or “HardwareHash”, “SerialNumber” and “ApplicationVersion” header are required”}
  • 415 Unsupported Media Type : {“Message”:”This request is not properly formatted”}
  • 500 Internal Server Error : {“Message”:”Internal Server Error”}
Updated on May 19, 2022

Was this article helpful?