How to create a new database on Notion API with the new "Status" property?

303 Views Asked by At

Notion API HTTP requests are not working when I add a new "Status" property for a new database creation.

I've been trying for a while to figure out why, sending Notion a simple HTTP POST request with a "Status" breaks it.

If I just replace "Status" with a simple "Select" it works fine...

This is the code that I tried on my latest attempt:

{
  "is_inline": true,
  "parent": {
    "type": "page_id",
    "page_id": page_id
  },
  "icon": {
    "type": "emoji",
    "emoji": ""
  },
  "title": [
    {
      "type": "text",
      "text": {
        "content": "Catches",
        "link": null
      }
    }
  ],
  "properties": {
    "Name": {
      "title": {}
    },
    "Status": {
      "status": {
        "options": [
          {
            "name": "Not started",
            "color": "default"
          },
          {
            "name": "25% Complete",
            "color": "blue"
          },
          {
            "name": "50% Complete",
            "color": "blue"
          },
          {
            "name": "75% Complete",
            "color": "blue"
          },
          {
            "name": "Done",
            "color": "green"
          },
          {
            "name": "Blocked",
            "color": "red"
          }
        ]
      }
    }
  }
}

Status ref page on Notions docs: https://developers.notion.com/reference/property-object#status-configuration

1

There are 1 best solutions below

0
On

According to the official documentation:

It is not possible to update a status database property's name or options values via the API.

Update these values from the Notion UI, instead.