How do I create a new space giving admin rights to specific users, using confluence cloud API?

Using confluence cloud API, I need to create a new confluence space giving admin rights to a specific user for that new space.

I tried:

        payload = {
            "key": space_key,
            "name": space_name,
                    "plain": {
                        "value": "",
                        "representation": "plain"
                        "operation": {
                            "operation": "administer",
                            "targetType": "space"
                        "subjects": {
                                        "username": "dom"
                            "group": []
                        "anonymousAccess": False,
                        "unlicensedAccess": False
        response = + '/rest/api/space',
                                     data=json.dumps(payload), json=True,
                                     headers={'Content-Type': 'application/json'})

        response = response.json()

I see the following traces:

api_1       | XXX
api_1       | {'_links': {'self': '', 'webui': '/spaces/TESTDOMA', 'context': '/wiki', 'collection': '/rest/api/space', 'base': ''}, 'permissions': [], 'id': 40337735, 'key': 'TESTDOMA', 'description': {'plain': {'embeddedContent': [], 'representation': 'plain', 'value': ''}, '_expandable': {'view': ''}}, 'status': 'current', '_expandable': {'metadata': '', 'settings': '/rest/api/space/TESTDOMA/settings', 'icon': '', 'lookAndFeel': '/rest/api/settings/lookandfeel?spaceKey=TESTDOMA', 'theme': '/rest/api/space/TESTDOMA/theme', 'operations': '', 'homepage': '/rest/api/content/40337742'}, 'type': 'global', 'name': 'test-dom-admin13'}

so I assumed the space had been created… but it turned out it wasn’t. ;(
I get a “Oops, you’ve found a dead link” when I try to access the URL where the new space should be…

Any idea what went wrong?
An working example of the above payload would greatly help me.


Hey dom,

I looked into it and it seems to be a bug. I created a ticket you can follow here: