Skip to main content

First time user here.  I’m just trying to get a basic api call to create a shape for me.  A ‘hello world’, so to speak.
What I have done:
1. Created document.json
2. Zipped it into a file.
3. Referenced file in Postman API request

Document is created in lucidchart, but there is nothing in it.

here is my document.json:
 

{
   "version":1,       
   "title": "Hello World",
          "product": "lucidchart",
          "pages":
            {
              "id": "page1",
              "title": "Main page",
              "shapes": l
                {
                  "id":"shape1",
                 "type":"rectangle",
                 "text":"hello",
                 "boundingBox":{
                    "x": 50,
                    "y": 30,
                    "w": 100,
                    "h": 150
                  }                }            
              ]              }
          ]        }

Here is my postman request:

{
  "title": "stupid helloworld",
  "product": "lucidchart",
  "file":"C:/Users/KTE2922/Downloads/document.zip"
}

Endpoint:
https://api.lucid.app/documents

The postman response is success:
{
  "documentId": "f07b9681-3cbc-4501-9605-cbe756f7f162",
  "title": "stupid helloworld",
  "editUrl": "https://lucid.app/lucidchart/f07b9681-3cbc-4501-9605-cbe756f7f162/edit",
  "viewUrl": "https://lucid.app/lucidchart/f07b9681-3cbc-4501-9605-cbe756f7f162/view",
  "version": 126,
  "pageCount": 1,
  "canEdit": true,
  "creatorId": 147315535,
  "lastModified": "2025-02-11T18:35:06Z",
  "lastModifiedUserId": 147315535,
  "trashed": null,
  "status": "Draft",
  "classification": null,
  "customAttributes": <],
  "customTags": "],
  "parent": null,
  "product": "lucidchart",
  "created": "2025-02-11T18:35:06Z"
}

I feel if something went wrong, I should not get a successful response.  What am I doing wrong?

I have tried researching this:
 

 


but have not found any answers.  I have also tried:

  • different filenames
  • zipping the file different ways,
  • using the .co endpoint instead of .app

     

How do I troubleshoot this?
Any help is appreciated.
john

Hey John, I’m Alec, I’m a developer at Lucid, hopefully I can help you figure out how to resolve the problem you’re having here. To clarify, you’re saying that when you go to the `editURL` that returned in the response body, you were taken to an empty document? Was the document named “stupid helloworld” like in your postman request?

I copied the document.json you provided, zipped it, and hit the endpoint via postman and it created the document as expected for me (I’ll include a screenshot), which leads me to believe your problem is related to the format of your postman request in some way, and not anything with your JSON.

 



I would have thought your problem was related to the naming of your file, since the setup you provide uses a .zip file instead of a .lucid file, but if that was your only issue you would have gotten an error message like this:
 


Once I get your answers to my clarifying questions above, I might be able to better investigate other theories about your problem, but currently I think it is a postman configuration issue. Hope this helps!


yes, I am taken to an empty document named ‘stupid helloworld’.
I did try using .lucid vs .zip, I saw no difference.
If you used my json, and it works, then yes, that means something is wrong with postman.   

This helps, thank you.  It is good to know I was doing things correctly.

It looks like It is not possible to use the API, the company firewall must be blocking uploading of files.  :(


@alec can I get a copy of your postman request as a curl command?  Maybe I am missing a header or something.


Here is a screenshot of my configuration. I think the “type” parameter might be the one which is misconfigured. Every time I do it in postman I have to re-remember how.

 

 


Reply