Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Getting Invalid UTF-8 start byte 0xa0 Confluence REST API

Hi ,

I am getting the below error in Confluence logs while trying to create content in Confluence via it's REST API. I have written a Java client that makes the REST API call to https://<our_confluence_host>/confluence/rest/api/content with json paylaod to craete a page. It uses apache httpclient to make the call.

Below are the http request headers :

request.setHeader("Accept", "application/json");

request.setHeader("Content-Type", "application/json"); 

HttpResponse response = httpClient.execute(request);


I am getting http status code 500. The Confluence server's application logs prints the below stacktrace. This is an blocker issue for us. Any help is highly appreciated.

I even tried setting "Content-Type" header as "application/json:charset=UTF-8" but taht also did not help.

2018-05-24 10:20:52,760 ERROR [http-nio-8090-exec-8] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error :
-- url: /confluence/rest/api/content | traceId: 8f2a32f5543f5461 | userName: _stagegitportal
org.codehaus.jackson.JsonParseException: Invalid UTF-8 start byte 0xa0
at [Source: com.atlassian.confluence.plugins.restapi.filters.LimitingRequestFilter$1@50455f9c; line: 1, column: 951]
at org.codehaus.jackson.JsonParser._constructError(
at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(
at org.codehaus.jackson.impl.Utf8StreamParser._reportInvalidInitial(
at org.codehaus.jackson.impl.Utf8StreamParser._reportInvalidChar(
at org.codehaus.jackson.impl.Utf8StreamParser._finishString2(
at org.codehaus.jackson.impl.Utf8StreamParser._finishString(
at org.codehaus.jackson.impl.Utf8StreamParser.getText(

1 answer

0 votes
Thomas Deiler Community Leader May 24, 2018

Dear @Ayaskant Swain,

it seems that the JSON data you send is not correctly encoded. Try


before executing the request, Btw: The header seems to be fine,

So long


Hi Thomas,


I tried that but it did not work either :-( . Strangely the same jsonpayload works when i call the API via POSTMAN. Page is created successfully in Confluence.

The POSTMAN sends the below headers.

headers = {
'content-type': "application/json",
'accept': "application/json",
'cache-control': "no-cache",
'postman-token': "34a891d4-52f1-649e-3fff-298f207ac2a5"


The "cache-control" and "postman-token" headers have been added by POSTMAN internally. I don't think they are making any difference and should be added in my Java client program.

The json request payload is below:


{\"type\":\"page\",\"title\":\"ECMC TROUBLESHOOTING PROCEDURES_30\",\"space\":{\"key\":\"DEVPROD\"},\"body\":{\"storage\":{\"value\":\"h1. NOT WORKING\\n\\nFor most of the possible problems below, start with these steps.\\n\\n* Check when the config was last updated.\\n* Check to see how long the current config is active.\\n* If the current production config was recently activated, run a diff to compare the current with previous active config.\\n\\nh2. VERIFY_CONFIG_ACTIVATION\\n|| Action || Result ||\\n| \\n# Log in to the ECMC and see if the configuration file containing the digital property having problems was recently changed.  \\n# Select View Details and look at the data of the more resent revision pushed to production | \\n# If a recent change was made, the timestamp will be recent, or the configuration may still be propagating to the network. |\\n\\nh2. VERIFY_ORIGIN_IP_CHANGES\\n|| Action |","representation":"wiki"}}}




Thomas Deiler Community Leader May 25, 2018

Dear @Ayaskant Swain,

probably its a JVM properties issue - but this is just a wild guess. If you paste the whole class, where you construct the request, I can probably help you debugging.

So long


Can someone help in this regard?

Thomas Deiler Community Leader Feb 18, 2019

Dear @sudheer gaddam ,

where do you need help?

So long


@Ayaskant Swain  @Thomas Deiler  

Hi, I am using post method when I am passing the same payload using postman it is creating the account. but when I am creating using python code it is giving 400 error and UTA-8 start byte 0xa0 at column line1 and column 118.

I am creating three tickets passing two are passing and 1 is failing, and my pay load is

This is the error payload where the ticket is not creating. 

{"fields": {"project": {"key": "ABC"},"parent": {"key": "ABC-19"}, "summary": "Update Release Calendar  - A B Platform - 4.0","description": " Release calendar gets updated here -","issuetype": { "name": "Sub-task","subtask": true},"assignee": {"name": "RAM"}, "labels":["PAYLOAD", "XYZ"]}}

These are my headers

'Cache-Control': 'no-cache',
'Authorization': jira_auth,
'Cookie': jira_cookie,
'Content-Type': 'application/json',
'Accept': '*/*',


Can you help me with this

Hey I got solution the only thing is, i am adding one additional space bar in my text.

BhavaniM I'm New Here Dec 09, 2021

Which text?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

1,003 views 7 42
Read article

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