I’m trying to add a new row to my Notion database using the API, but I’m having trouble with the Status field. Here’s the JSON I’m sending in my POST request:
I encountered a similar issue when I first started working with the Notion API. The key is to use the correct property type for each field. For the Status field, you should be using ‘status’ instead of ‘select’. Here’s the correct format:
"Progress": {
"status": {
"name": "In Progress"
}
}
Also, ensure that ‘Progress’ is the exact name of your status field in your Notion database. The API is case-sensitive, so a small mismatch can cause errors. Regarding your date field, using ISO 8601 format (for example, “2024-12-15T09:00:00Z”) is recommended. These adjustments should help resolve the validation error.
I’ve run into this issue before when working with Notion’s API. The problem is in how you’re formatting the Status property. For status fields, you need to use the ‘select’ type instead of ‘status’. Here’s how I fixed it in my projects:
Change your ‘Progress’ property to this:
"Progress": {
"select": {
"name": "In Progress"
}
}
This should resolve the validation error you’re getting. Make sure the status name exactly matches one of the options in your Notion database. Also, double-check that ‘Progress’ is indeed the name of your status field in Notion.
One more tip: for the date field, you might want to use ISO 8601 format without spaces. So instead of “2024-12-15 09:00:00”, use “2024-12-15T09:00:00Z”. This format is more universally accepted in APIs.
Hope this helps! Let me know if you run into any other issues.