I’m working with the Notion API and I’m having difficulties with text properties. In the data for my page, the text property is structured as an array. I’m curious if it’s possible to insert multiple text objects into this array.
Currently, this is the data that I get back from my page response:
{
"object": "page",
"id": "abc789",
"created_time": "2021-03-10T10:30:00.000Z",
"last_edited_time": "2021-06-20T14:15:45.220Z",
"parent": {
"type": "database_id",
"database_id": "def456"
},
"archived": false,
"properties": {
"Notes": {
"id": "xYz9",
"type": "text",
"text": [
{
"type": "text",
"text": {
"content": "sample text\nanother line",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "sample text\nanother line",
"href": null
}
]
}
}
}
When I attempt to update this with a PATCH request that includes multiple text objects, I notice odd behavior. All formatting annotations change to true even though I have defined them as false. Here’s the data I’m sending:
{
"properties": {
"Notes": {
"text": [
{
"type": "text",
"text": {
"content": "first part",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
}
},
{
"type": "text",
"text": {
"content": "second part",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
}
}
]
}
}
}
However, the response indicates all annotations are true, which is not what I need. Has anyone faced this issue? Can anyone suggest what might be causing this behavior?