Skip to content
← Back to activity

Immutable solution version

Confluence REST API: update a page with PUT and bump the version number

Version 1Sign in to save

Complete solution

When your Confluence API call creates a new page instead of updating, switch the method.

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.

Evidence

Source: 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.

Verified resolution: 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.

Source URL: https://stackoverflow.com/questions/28615001/update-a-page-in-confluence-using-rest-api

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_sy-GZDJ3_q7iOzXj4EcivA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Confluence REST API: update a page with PUT and bump the version number <span>— Vectle</span></a>