Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bad request on attempt to update Wiki page Edited

Using C#


// Get content by page ID
PageContent pageContent = await GetContentAsync(url);

// pageContent: {Body: null, Id: "900334136", Title: "GF Test page", Type: "page", Version: {Number: 5}}

// new version
Version ver = pageContent.Version;
ver.Number += 1;

// Extract body
pageContent = await GetContentAsync(url + "?");

// Updating just title
pageContent.Version = ver;
pageContent.Title = pageContent.Title + "QQQ";

// pageContent: {Body: {Storage: {Representation: "storage", Value "<p>some text</p>"}, Id: "900334136", Title: "GF Test pageQQQ", Type: "page", Version: {Number: 6}}

PageContent newContent = await UpdateProductAsync(url, pageContent);

// - fails with 400, "Bad request"


static async Task<PageContent> UpdateContentAsync(string path, PageContent content)
HttpResponseMessage response = await client.PutAsJsonAsync(path, content);

// Deserialize the updated content from the response body.
content = await response.Content.ReadAsAsync<PageContent>();
return content;

Any ideas why it does not work?

1 answer

0 votes

@Guennadi Filkov,

Thank you for contacting us regarding this.

Could you help us understand what this is for exactly? I see you want to update pages in Confluence using API; is this for an add-on?

You might have better luck in our Atlassian Developer Community. That community is geared towards developers working with Confluence, creating add-ons, and custom modifications. You might find that the group there has some idea about how to correct this issue.



Hi Shannon,
This is about automated updating of the Wiki page with current data.
I will try my luck in Dev Community.
Thank you.

Like Shannon Spaniol likes this

Thank you for confirming, @Guennadi Filkov. I hope you find the answer you're looking for!



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

494 views 24 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you