Confluence create space error

Hi all,
I’m trying to create a space in forge within a normal UI kit macro.
I’m following exactly the syntax in the reference but I keep on getting a 500 Internal server error. Still, it seems that the space is correctly created!
Any idea?

snippet below:

var bodyData = `{
    "key": "TCS",
    "name": "test create space",
    "description": {
      "plain": {
        "value": "test space",
        "representation": "plain"

  const response = await api
    .requestConfluence(route`/wiki/rest/api/space`, {
      method: "POST",
      headers: {
        Accept: "application/json",
        "Content-Type": "application/json",
      body: bodyData,


    - search:confluence
    - read:confluence-content.summary
    - read:confluence-space.summary
    - write:confluence-content
    - write:confluence-space



Hi @MatteoGubelliniSoftC,
Thank you for reaching out. I tried the same your are trying but couldn’t reproduce the issue. Please note that key in the bodyData should be unique. If it is already created once second try will give you status 400. Could you please retry with a different key and let us know if the issue still persists ? If you are getting the same error again could you please share the below details which will help us to trace the issue ?
Forge CLI version, new space key you used, ~time when you tried to execute this

name: z123name
key: z123
time: 10:27 GMT
CLI: 2.0.6
Yes, it is the same with any key. The space is created correctly but I still get the error. Could it be because the app needs global create space permissions but I’m on a free instance?

org.springframework.transaction.unexpectedrollbackexception: Transaction rolled back because it has been marked as rollback-only



Hi @MatteoGubelliniSoftC ,

I’ve tested this same scenario on a Free Confluence site and I was also able to create the space.
Would you be able to share with us the site URL on which you tested this and your app ID and Title?

If you’re don’t feel like sharing this information here, please feel free to raise a Developer Support ticket here.



The app is “Create DHF space”.



Thanks for sharing. I don’t see any missing permissions for your app user.
Did you try running the same app on another instance?
Or also isolating this logic to a new sample app?

That could help us determining whether this is something with permissions, or an issue with a given site.


Hi Gabriel,
I installed it on Confluence and in this case I get 200 OK. In this instance I can set permissions (although I did not do anything I just installed it through forge).
Any idea?



@MatteoGubelliniSoftC I can’t confirm it without analyzing it further, but it looks like the group that your app user is in doesn’t have the permission to create the space in Confluence.
Did you change any permissions for any groups on the instance your having issues?

If you can’t see any changes, maybe the Cloud Support Team can help you better.


As the first instance is free I’m not sure what permissions are set.
I’ll check if I can test it on another free instance.

1 Like