There is a slight discrepancy in API Docs:
Documentation says: PUT /posts/{id}.json with payload
Content type: application/json
{
"post[raw]": "string",
"post[raw_old]": "string",
"post[edit_reason]": "string",
"post[cooked]": "string"
}
but this only works with PUT /posts/{id} and Content-Type: application/x-www-form-urlencoded.
The correct payload for PUT /posts/{id}.json should be:
Content type: application/json
{
"post": {
"raw": "string",
"raw_old": "string",
"edit_reason": "string",
"cooked": "string"
}
}
The raw parameter is sufficient for replacing the entire post.