Adding link to Confluence Page Via Rest API

John Everett March 20, 2018

Hi Everyone,

I would appreciate it if someone would help me determine how to add links to external resources via the API.

... storage:{"value":"New content -- [Atlassian|]"} ...

Will just update/create a page with the bracketed string printed rather than creating an embedded link.


Thanks in advance,

1 answer

0 votes
Eric Lam
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

Hey John,

The actual format of the text to post is Confluence's internal Storage Format. The easiest way to check the correct syntax of a page is save a page in Confluence and then click on the top right "..." and click "View Storage Format". This is the text that would need to be posted via the REST API.

Here's an example!

My Confluence page:


And here's the raw JSON I am posting to:


"title":"Test page from REST API",
"body":{ "storage":{"value":
"<p>Link to&nbsp;<a href=\"\">Atlassian Community</a></p><p><br /></p><p><ac:link><ri:page ri:content-title=\"Test page\" /></ac:link></p>",

(remember to escape the quotes)

I've provided two linking methods in the above example:

  1. The first links to Atlassian Community
  2. The second link is to a Confluence page with page title "Test Page"




Pavel Potcheptsov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 27, 2018

Eric, do you have an idea how to get page's content through API ( i.e. content of "Value") in human readable format, I mean with line breaks as it looks if you open "View Storage Format" or open "Source editor" in Edit mode?

"View Storage Format"

kishore S June 17, 2020

Hello Eric,

I am currently looking for similar requirement of getting clickable links using json restful table. It would be helpful if u can suggest if you found a way for the problem



Venkatesh Nadamuni
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 21, 2024

Hi Eric,

I have the same question as Kishore.  Is there a way to get clickable links into the table as content?  I have tried a few iterations, but I keep getting just HTML syntax showing inside the cell

(such as:  <a href=></a>)



Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events