I’m facing an issue with the Notion API while attempting to create new pages in my database. The text fields work without any problems, but I always receive a 400 error whenever I include fields that are not text-based, like URLs or checkboxes.
The error message I keep receiving indicates that there are missing properties like id, name, and start for the URL field. Text fields work fine, but the API seems to struggle with URL fields and similar types. Has anyone else encountered this issue? I’ve thoroughly checked my API token and permissions for the database.
your property structure’s wrong for text fields - wrap them in a rich_text object. change PageTitle to PageTitle: { rich_text: [{ text: { content: "Sample Page Title" } }] } and do the same for comments. that’s why you’re getting 400s.
Been there too many times with Notion API quirks. The property formatting’s definitely part of it, but debugging these API inconsistencies gets old fast.
I stopped wrestling with raw Notion API calls after wasting way too many hours on exactly this stuff. Now I just use Latenode for all my Notion automation.
The visual workflow builder handles property formatting automatically. You drag and drop the fields you want, and it figures out whether something needs rich_text wrappers or direct values. No more guessing about schema mismatches or field types.
When Notion changes their API structure (which they do), Latenode updates their nodes so your workflows keep working. I’ve got dozens of automated page creation flows running without maintenance headaches.
Way cleaner than managing all that boilerplate code and error handling yourself.
Had the exact same problem last month. You’re mixing property formats - text properties need the rich_text wrapper, but URLs should just be URLLink: { url: "https://examplelink.com" } which you’ve got right. The real issue is probably your database schema doesn’t match what you’re sending. Check your Notion database properties - field names and types need to match exactly. I wasted hours debugging this before realizing I’d renamed a property in Notion but kept using the old name in my API call. Also double-check your database ID and make sure the integration has write permissions.
That error about missing id, name, and start properties usually means you’ve got a date or people property type that’s not in your code snippet. I hit this exact issue when I had a date field in my database but was sending it as text. Check for any hidden or required properties that aren’t getting populated. Also - and this got me too - make sure your database integration has insert permissions, not just read access. The integration settings might look right, but database sharing settings can override them. Try logging the full error response instead of just console.error so you can see exactly what validation details Notion’s throwing back at you.