Hi @Daniel Baird
Thanks for posting your query!
The 415 error you're facing is due to an issue with the Content-Type or body format of the request sent to the Monday.com GraphQL API. From your description, it looks like there is a formatting issue in the JSON body. The GraphQL query is not being correctly encoded, and this is causing the server to reject the request.
Headers Section:
The issues with the code include the use of single quotes (') instead of double quotes (") for JSON keys and values, which is incorrect according to JSON standards. Additionally, the arrow (->) is used incorrectly to separate key-value pairs, whereas JSON requires a colon (:) to properly assign values to keys.
Correct Code:
"headers": [
{"Content-Type": "application/json"},
{"API-Version": "2025-01"},
{"Authorization": "Some API Token"},
{"Accept": "application/json"}
],
The headers are now in the correct JSON format as an array of objects.
Body Section:
The issue stems from unnecessary extra quotes and commas in the body, where the query is improperly split, causing incorrect formatting. While escaping quotes inside strings is necessary, the body has excessive escape characters around the query itself, making it hard to read and incorrect. Additionally, the body is not properly wrapped as a valid JSON object, and the structure is fragmented with unnecessary quotes, leading to parsing errors.
Correct code:
"body": {
"query": "query { boards(ids: someid) { items_page(limit: 1) { cursor items { id name column_values { column { title } text } } } } }"
},
Once the request headers and body are properly formatted, the 415 error should no longer occur.
I hope this information helps. Please do let us know if you have any further queries.
Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.
Thank you.