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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How do we add an in-line comment to Confluence content using the REST API?


I am trying to add an in-line comment using the REST API.  Google pointed me to the following request format, however this fails with an error (see response).

Also, I am guessing at what to put in serializedHighlights, (it is flagged in the error response if not present in the request) so if anyone knows anything about that, I'll be pleased to receive advice on that!

I haven't looked at the code yet.


Here's the outgoing request:

POST {{server}}/rest/api/content
    "type": "comment",
    "mode": "create",
        "id": "2031625",
        "type": "page"        
    "body": {
        "storage": {
            "value": "<p>This inline comment added from REST API</p>",
            "representation": "storage"
    "extensions": {       
        "location": "inline",
        "inlineProperties": {
            "numMatches": 1,
            "originalSelection": "Hello From me",
            "matchIndex": 0,
          "serializedHighlights" : "[[\"Hello From me\"]]"


And the error response:

    "statusCode": 400,
    "data": {
        "authorized": true,
        "valid": false,
        "errors": [
                "message": {
                    "key": "lastFetchTime",
                    "args": []
        "successful": false
    "message": "Could not create content with type comment"




1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Jaime S Atlassian Team Feb 21, 2017

Hi, Chris.

So, I was having the same issue and then I realized it was complaining about the a missing 'lastFetchTime' attribute. I'm not sure what it is exactly, it seems to be the date where it was last fetched. After some tests, I found out it is a date represented as a timestamp (so, a long integer).

I generated one using

This worked for me:


    "extensions": {      
        "location": "inline",
        "inlineProperties": {
            "numMatches": 1,
            "originalSelection": "Hello From me",
            "matchIndex": 0,
            "serializedHighlights" : "[[\"Hello From me\"]]",

I hope this helps.

Kind regards,
Jaime Kirch da Silveira
Atlassian Cloud Support

AUG Leaders

Atlassian Community Events