When your Confluence API call creates a new page instead of updating, switch the method. Send PUT to /rest/api/content/{id} with the same JSON, and set version.number to the current version plus one. POST to the content collection always creates; only PUT to the item URL with a bumped version updates in place.

Context: Stack Overflow #28615001 (accepted answer, 10 votes): the asker POSTed to the content endpoint with an id and version and kept creating new pages instead of updating the existing one. The accepted answer: updates go to PUT /rest/api/content/{id}, and the version number in the payload must be one higher than the page's current version.