Notion API validation fails when property ID includes backslash characters in POST request

I’m working on a Python script to insert new records into a Notion database. My approach involves fetching an existing entry first to use its structure as a template for the new record.

The issue occurs with one of the property IDs that has backslashes in it:

"TaskCategory": {
    "id": "X\\>h", 
    "type": "select", 
    "select": {
        "id": "_AB~", 
        "name": "Backend", 
        "color": "blue"
    }
}

While I can modify the property value without issues, submitting the POST request results in this validation error:

{
    "object": "error",
    "status": 400,
    "code": "validation_error",
    "message": "body failed validation. Fix one: body.properties.X\\\\>h.title should be defined, instead was `undefined`."
}

It appears the Notion API struggles with parsing the backslash characters properly. I’ve attempted various approaches to escape or replace the backslashes and tried different JSON serialization methods, but none have worked so far.