Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically creating private pages without requiring individual user tokens or space IDs

Ilef Chebil
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!
July 15, 2025

Dear Community,

We are building an application that integrates with Confluence to push dynamically-generated pages directly into our enterprise users' personal Confluence spaces. 

Current Challenge:

  • We don't want to ask each individual user to provide their CONFLUENCE_ADMIN_TOKEN or their personal SPACE_ID.

  • Ideally, as an administrator, we would directly push a page into each user’s private Confluence area where only that specific user (and admin) can access it.

  • Creating a separate private space per user would be impractical at scale (e.g., 1000 users would lead to creating 1000 individual spaces).

Questions:

  1. Is it possible (as an administrator) to programmatically add pages directly into users' private/personal spaces via the Confluence REST API?

  2. If yes, could you provide the specific API endpoints, permissions/scopes, or example code snippets to achieve this?

  3. If not, is there a recommended alternative solution or best practice (e.g., permissions configuration, special shared space structure) to securely deliver private pages to individual users without extensive manual configuration?

Any guidance, API documentation links, or practical code examples would be greatly appreciated.

Thank you!

3 answers

1 accepted

4 votes
Answer accepted
Marc - Devoteam
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.
July 15, 2025

Hi @Ilef Chebil 

Welcome to the community.

Please revert your question to the Developer Community

Based on Private/personal pages, this can or can't be done, as a user can define the permissions on this space to be private only.

A Confluence admin can regain space access to a personal space.

The endpoint to create a page is, api-pages-post 

On point 3, make sure the Default Space permissions include the admin group, so any new space has this set. But a user, can still remove these groups, as a personal space is also by default managed by the user (this can't de undone)

Ilef Chebil
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!
July 15, 2025

thanks so much , and how can I programmatically find the personal space of a user ? (spaceID) ?

Marc - Devoteam
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.
July 15, 2025

HI @Ilef Chebil 

See #api-spaces-get and set the type parameter to personal, this wil get all personal spaces, there you shold also see all the id's

Ilef Chebil
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!
July 15, 2025

clear, thank you so much for your time! only the admin sees the personal spaces right ? if the user did not revoke their permission

Marc - Devoteam
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.
July 15, 2025

Hi @Ilef Chebil 

That depends on the default space permissions and if a user has granted other users access to their personal space.

Ilef Chebil
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!
July 15, 2025

also it depends how i can filter right ? i can filter with personal type but then I would have to know the  spaceOwnerId ?? That I do not have , I only have their email ...

Ilef Chebil
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!
July 15, 2025

i feel like this approach of directly writing to the personal space of a user is a dead end .. ?

idea 2: maybe i should create a common space and create pages inside it but then I want only the user who requested the page to see , not all users who have access to that space , is that doable ???

idea3: create spaces for each user to avoid security issues,

but in all i need ID for user knowing just their mail is that doable ???

Marc - Devoteam
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.
July 15, 2025

HI @Ilef Chebil 

Then you need to find the space owner, this can by done using the API to get the space by ID, then you will now the owner and based on the owner you can use the API to get the account id of a user.

See, https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search#api-rest-api-3-user-search-get 

1 vote
Tomislav Tobijas
Community Champion
July 15, 2025

Thinking out loud here: can you maybe use Confluence automation + incoming webhook for this?

Basically, you would send all the payload and make a connection with that one rule, and automation would do the rest 👀
The actor would need to be a user who has admin permissions everywhere they need to, but that could be easier way than to handle all of that administration with tokens and such...

2025-07-15_11-44-04.png

1 vote
Aron Gombas _Midori_
Community Champion
July 15, 2025

@Ilef Chebil My first reaction was that you should use the built-in "notifications" feature of Confluence Cloud (see the bell icon in the top right). It is personalized, there is no hassle with API tokens, scales well, etc.

But, to my surprise, there is no REST API end-point that allows you add new notifications to a user's list...

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events