Skip to main content

Is anyone else able to get it working with Curl? Or PostMan?


I have been trying to upload files to a Item Update for several days now. No matter how I try it I keep getting a 500 error back from Monday. I also get a similar error in PostMan.


Here is the Curl command


curl --location --request POST ‘https://api.monday.com/v2/file

–header ‘Authorization: API_KEY’

–form ‘query=“mutation add_file($file: File!, $update_id: Int!) {add_file_to_update(update_id: $update_id, file: $file) {id}}”’

–form ‘variables=“{"update_id":1234567890}”’

–form ‘map=“{"image":"variables.file"}”’

–form ‘image=@“/Path/To/polarBear.jpg”’



  • The file path is a full path to a file.

  • The update_id is one that really exists

  • The API Key is one that works on other API requests, and is attached to an Admin.


No matter what I do I get a 500 error.

{“error_message”:“Internal server error”,“status_code”:500}

Hello @weshays and welcome to the community!


I hope you like it here 💪


I just recreated this in Postman and exported this cURL for you to follow:


curl --location 'https://api.monday.com/v2/file' \\
--header 'Authorization: MYAPITOKEN' \\
--header 'API-version: 2023-10' \\
--form 'query="mutation ($file: File!) {
add_file_to_update (file: $file, update_id: 123456789) {id}}"' \\
--form 'map="{\\"image\\":\\"variables.file\\"}
"' \\
--form 'image=@"/Users/myuser/Downloads/IMG_1233.jpg"'

What happens if you do it like that instead of passing the update ID as a variable?


Hi @Matias.Monday

Thanks for the reply. What you have still has the same problem with both giving me errors. I get a 500 error using curl, and a “400 Bad Request” using Postman. Attached is the actual commandline request with curl.


Note that I did change my personal api key before I sent this



Hello again @weshays,


I am not sure why this could be failing for you. Here it is working on my end:



Would you be able to please send us an email to appsupport@monday.com explaining the issue and mentioning this community topic so we can take a closer look from there?


Looking forward to hearing from you via email!


Cheers,

Matias


I just emailed appsupport@monday.com. Thanks.


To close this out, support did help me find the issue.


The long story short… I was using an “item ID” and not an “update ID”.


After reviewing the API docs, I see where I misread it.


Thanks again for helping me look into this.


Hello again @weshays,


I am glad we found the issue 😁


Reply