Skip to navigation

Upload a document

Requires the DOCUMENT.CREATE permission.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version

Headers

x-platform-idstringOptional
Platform ID.

Request

This endpoint expects an object.
namestringOptionalformat: "^.*$"0-256 characters
The name of the document.
descriptionstring or nullOptional
An optional description of the document.
content_typestringOptional

Content type of the file. Supported: application/pdf, application/json, text/html, text/markdown, application/vnd.openxmlformats-officedocument.presentationml.presentation (pptx) and application/vnd.openxmlformats-officedocument.presentationml.template (potx). text/plain is accepted only for a markdown file, i.e. when the name ends in .md or .markdown.

contentstringOptional
The file content, BASE64 encoded. Max 10MB, or 25MB for pptx and potx.

Response

Created
object_typestring or nullOptionalRead-only
idstring or nullOptionalRead-only
created_atstring or nullOptionalRead-only
namestringOptionalformat: "^.*$"0-256 characters
The name of the document.
descriptionstring or nullOptional
An optional description of the document.
content_typestringOptional

Content type of the file. Supported: application/pdf, application/json, text/html, text/markdown, application/vnd.openxmlformats-officedocument.presentationml.presentation (pptx) and application/vnd.openxmlformats-officedocument.presentationml.template (potx). text/plain is accepted only for a markdown file, i.e. when the name ends in .md or .markdown.

file_sizelong or nullOptionalRead-only
The file size in bytes.
downloaded_atstring or nullOptionalRead-only
Timestamp of the most recent download.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error