https://docs.camunda.org/manual/7.5/reference/rest/task/variables/post-modify-task-variables/
The example REST request body provided is no valid JSON. According to the description, modifications should hold an object, not an array, resulting in valid JSON.
{
"modifications": [
"aVariable": { "value": "aValue", "type": "String" },
"anotherVariable": { "value": 42, "type": "Integer" }
],
"deletions": [
"aThirdVariable", "FourthVariable"
]
}