If someone today needs to Create a Document in Cosmos DB, POST a key both in the header and body like this:
const headers = {
'x-ms-documentdb-partitionkey': '["yourPartitionKey"]'
};
const body = JSON.stringify({
id: 'someid',
partitionKey: 'yourPartitionKey'
})