These docs are for v1.0. Click to read the latest docs for v1.2.

Troubleshooting

Common File Errors

Error CodeError MessagePossible Solution
invalid_fileStandard import file entry does not existThis error commonly occurs when the parent folder containing the standard import files/folders (document.json, data<, images) is compressed into a zip archive instead of selecting the individual files/folders and compressing them as a group (refer to the example file structure on the right to see both the incorrect and the correct way to zip the files).
invalid_fileerror.expected.validenumvalueThis error commonly occurs when an invalid enum value is used on fields such as Stroke.style, Line.lineType, Line.text.side, Style.fill.type, and Style.fill.imageScale.
invalid_fileerror.expected.jsnumberThis error commonly occurs when a number is expected during JSON parsing, but something else is found instead. For example, this can happen when using the position property of the line endpoint object. For a shapeEndpoint, the position property expects a RelativePosition object. However, a lineEndpoint just expects a number for the position property. When an object is used instead of a number, this error is thrown.
import.lucid
└── folder
    ├── document.json
    └── data
        └── email-flow.csv

import.lucid
├── document.json
└── data
    └── email-flow.csv

Common Request Errors

Response CodeError MessagePossible Solution
415: Unsupported Media TypeinvalidImportType: Importing the provided file type is not supportedThis error commonly occurs when the type of the file in the form data is not set correctly. Refer to the Import Document endpoint or to the code to the right for an example in cURL of how to set the file type in the form data being sent. For the Standard Import, this file type must be set tox-application/vnd.lucid.standardImport
400: Bad RequestbadRequest: You must set the product field to either 'lucidchart' or 'lucidspark' when using the Lucid Standard ImportIf the product field is correctly being set in your request (as explained in the Overview), then this error commonly happens when the data is not being sent as form data. This causes the request to fail even if all the data independently is correct. Refer to the Import Document endpoint or to the code to the right for an example in cURL of how to send the request data as form data. Additionally, you may refer to the documentation for your specific API platform, such as Postman.
curl 'https://api.lucid.co/documents'\
     --request 'POST'\
     --header 'Authorization: Bearer <OAuth 2.0 Access Token>'\
     --header 'Lucid-Api-Version: 1'\
     --form 'file=@<location>/import.lucid;type=x-application/vnd.lucid.standardImport'\
     --form 'title=New Document'\
     --form 'product=lucidchart'\
     --form 'parent=1234'