I’ve encountered similar issues with the Notion API before. From my experience, including the ‘rows’ parameter in your table definition—even if initially empty—is essential. I modified the payload as follows:
This payload creates a table with headers. You can add more rows by appending new objects to the ‘children’ list within the table object. Hope this helps!
I’ve worked with the Notion API extensively, and tables can be tricky. Your issue stems from the payload structure. The API expects a specific format for tables. Here’s a corrected version:
This creates a basic table with headers. You can add more rows by appending to the ‘children’ list. Remember to adjust the URL to ‘/blocks’ instead of ‘/pages/abc123/blocks’. Also, ensure your authorization header uses ‘Bearer’ instead of ‘Token’. These small details often cause issues with the Notion API.