I'm trying to create a new sheet with what I think is the correct JSON string, but I keep receiving "Unable to parse request." Does anyone know what would cause the error?
This is JSON string I am sending:
{"name":"MyNewSheet","columns":[{"title":"Name","primary":true,"type":"TEXT_NUMBER"},{"title":"Phone","type":"TEXT_NUMBER"},{"title":"Address","type":"TEXT_NUMBER"}]}
This is a response from Smartsheet.
{"errorCode":1008,"message":"Unable to parse request. The following error occurred: Unexpected End of File."}
Your JSON looks correct. You'll want to look at the Content-Type
you're sending in the header of your request. To create a new sheet you'll need Content-Type: application/json
.
A good example of this can be found in the Create Sheet section of the Smartsheet API docs. Look closer at the example on the right of that page.