Adding multiple tags to a new Notion page via API: How to do it?

I’m struggling to add multiple tags when creating a page using the Notion API. Single tags are easy, but multiple ones are giving me trouble. Here’s what I’ve tried:

"Tags": {
  "multi_select": [
    {"name": "Important"},
    {"name": "Urgent"}
  ]
}

But it’s not working. I keep getting an error about validation failing. Does anyone have a working example of how to add multiple tags to a new page? I’d really appreciate some help with this.

My full request looks something like this:

page_data = {
  "parent": {"database_id": "abc123"},
  "properties": {
    "Title": {
      "title": [{"text": {"content": "My New Page"}}]
    },
    "Tags": {
      "multi_select": [
        {"name": "Important"},
        {"name": "Urgent"}
      ]
    },
    "Due": {
      "date": {"start": "2023-06-15"}
    }
  }
}

What am I doing wrong here? Thanks in advance for any tips!

hey, i’ve been there too. check that your notion db really has the tags pre-set and that you’re using the correct property id for ‘Tags’. sometimes, mismatched names or missing options cause it to fail. hope it sorts out!

I encountered a similar issue when working on a Notion integration for my team’s project tracking. Your multi-select structure looks correct, but the problem might lie elsewhere. Have you verified that your API token has the necessary permissions to modify the database? Sometimes, access issues can cause validation errors that aren’t immediately obvious.

Another potential culprit could be inconsistencies in property names. Notion is case-sensitive, so ensure ‘Tags’ in your code exactly matches the property name in your database. Even a slight mismatch like ‘tags’ instead of ‘Tags’ can cause problems.

If those checks don’t resolve the issue, try using the ‘retrieve database’ endpoint to fetch the current schema. This can help you confirm the exact structure and options available for your multi-select field, ensuring your request aligns perfectly with the database configuration.

I’ve actually dealt with this exact issue before when integrating Notion into our project management system. The problem isn’t with your multi-select structure - that looks correct. The issue is likely with the database schema.

Make sure the ‘Tags’ property in your target database is actually set up as a multi-select field. If it’s not, Notion will reject the input. You can check this in the database settings.

Also, double-check that ‘Important’ and ‘Urgent’ are pre-existing options in your Tags field. Notion won’t automatically create new options on the fly - they need to exist in the database already.

If those check out, try simplifying your request to isolate the issue. Create a page with just the title and tags, leaving out other properties. This can help pinpoint if there’s a problem with one of the other fields.

Lastly, ensure you’re using the latest version of the Notion API. They’ve made updates to property handling in recent versions that might affect this.

Hope this helps troubleshoot the problem. Let me know if you need any more specifics!