For clarity (and to link to this from another thread I’m about to respond to) this is what a request that both creates the task and sets the section memberships in the same request looks like:
POST /tasks
{
"data": {
"name": "My Task",
"memberships": [
{
"project": 123,
"section": 456,
},
{
"project": 789,
"section": 1011,
}
]
}
}