I’m trying to reset a date property to empty using the Notion API but running into issues. When I send a PATCH request to update a page, I keep getting validation errors no matter what I try for the date value.
I want to essentially “clear” the date field completely, like you can do in the Notion interface with the clear button. But the API seems to always expect a valid date format.
I’ve attempted several approaches including empty strings, null values, undefined, and boolean values, but they all return validation errors. I don’t want to use a placeholder date because I need the field to be truly empty for my workflow.
Here’s what I’m trying:
const response = await fetch(`https://api.notion.com/v1/pages/${pageId}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Notion-Version': '2021-08-16',
'Authorization': `Bearer ${apiToken}`
},
body: JSON.stringify({
"properties": {
"Task Status": {
"select": {
"name": "Completed"
}
},
"Due Date": {
"date": {
"start": ""
}
}
}
})
});
This gives me an error saying the start date should be a valid ISO 8601 date string. Has anyone found a way to clear date properties through the API?