Notion API validation error when creating database entry

I’m encountering a validation error while attempting to add a new record to my Notion database via the API. The database includes two fields: an Owner field that allows selection from workspace members and a Priority field that uses a dropdown with numbers ranging from 1 to 4.

The specific error message I have received is:

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 was undefined.
body.properties.Priority.start should be defined, instead was undefined.

Here is the code I am using:

const properties = {
    title: [{
        text: {
            content: "Test"
        }
    }],
    Priority: {
        id: "9~q3",
        type: "Select",
        select: {
            value: "1"
        }
    },
    Owner: {
        people: [{
            email: "[email protected]"
        }]
    }
};

Can someone help me identify what’s wrong with my property configuration?

You’re mixing database schema properties with page creation properties. When creating a page, just specify the actual values, not the field definitions. Your Priority field should be Priority: { select: { name: "1" } } - drop the id and type parameters. The Owner field structure looks right, but make sure that email matches an actual workspace member. I hit the same issue when I started with Notion API - the docs are confusing about when to use schema vs value properties. Also check that your title property is wrapped in the proper rich text object structure.

your properties object is messed up for page creation. drop the id and type fields from priority - those are only for db schema stuff. just use priority: { select: { name: "1" } } instead of value. also swap value for name in the select object.

You’re mixing schema definitions with actual data when creating the page - super easy mistake with the Notion API. Remove the id and type from your Priority property completely. The select should use name instead of value. So your Priority should be Priority: { select: { name: "1" } }. Your Owner field looks fine as long as that email belongs to someone in your workspace. Just double-check your database has the right property names and that “1” is actually an option in your Priority field.