When trying to add a new entry to a database using Notion's API, I receive these errors. I am trying to send a new entry, with 2 proporties. An owner property, which is a dropdown selection of all the people in the workspace, and a property called Priority, which is a select that has a dropdown selection of a few numbers, 1 to 4.
APIResponseError: body failed validation. Fix one: body.properties.Priority.type should be not present, instead was
"Select"
. body.properties.Priority.select should be not present, instead was{"value":"1"}
. body.properties.Priority.name should be defined, instead wasundefined
. body.properties.Priority.start should be defined, instead wasundefined
.
const properties = {
title: [{
text: {
content: "Test"
}
}],
Priority: {
id: "9~q3",
type: "Select",
select: {
value: "1"
}
},
Owner: {
people: [{
email: "[email protected]"
}]
}
};
I figured how to solve this. You need to follow your database's exact schema as well as follow the Notion's Property Values
This is the fix: