Import Document

Imports an external non-Lucid file as a new document within Lucid. The file is uploaded as multipart/form-data. Requires file, type, and product. Optionally, a title and parent folder can be provided. If no title is provided, the new document's title will be the imported filename.

📘

This endpoint can only create a new Lucidchart or Lucidspark document. It cannot modify an existing document's contents.

📘
Document Creation Location

When there is no parent field on the request, the new document will be created in a default location depending on the authorizing token's scopes.

  • If the token authorizing the request uses one of the document.app scopes, then the document will be created in an app-specific folder.
  • If one of the document.content scopes is used, the document will be created in the user's 'My Documents folder'.
  • If both types of scopes are authorized on the token, the document.content behavior will take priority and the document will be created in the user's 'My Documents' folder.
📘

Board import

  • The board import type only accepts pdfs that are exports of digital whiteboards.
  • The board import type can only be authorized by users with a Lucidspark Enterprise license.
  • The board import type is experimental and importing the same board may produce varying results over time.

Valid Authentication Methods

API Key Grants:

  • DocumentEdit

OAuth 2.0 User Token Scopes:

  • lucidchart.document.content
  • lucidchart.document.app.folder
  • lucidspark.document.content
  • lucidspark.document.app.folder
Body Params
file
required

The file from which to import the document.

string
enum
required

The type of file provided for import. Supported types:

  • x-application/vnd.lucid.drawio — draw.io files (.drawio, .xml) for Lucidchart
  • x-application/vnd.lucid.visio — Visio files (.vsdx, .vdx) for Lucidchart
  • x-application/vnd.lucid.gliffy — Gliffy files (.gliffy, .gon, .gxml) for Lucidchart
  • x-application/vnd.lucid.board — Board files (.pdf) for Lucidspark
Allowed:
string
enum
required

The Lucid Suite product types that can be created.

Allowed:
string

Title that should be given to the newly imported document. If no title is specified, the document will be automatically assigned the file name.

number

Folder ID for the new document.

Responses

403

Forbidden.

  • if the user doesn't have access to or permissions to create within the specified parent folder.
  • if the token authorizing the request has the document.app scope with a specified parent folder that is outside the app folder's folder tree.
  • if the token does not have the correct scope for the import type.
  • if the token requesting a board import does not have a Lucidspark Enterprise License.
415

Unsupported Media Type. The file type provided is not supported.

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json