Skip to main content

Space Management

Spaces are isolated environments within a project — useful for separating dev, staging, and production workloads under the same project. All System API endpoints require X-Server-Key from your config.yml.


Create Spaces

Create one or more spaces under a project in a single request. Send an array of space objects.

Request Body

Send an array of space objects — even for a single space, always wrap in [].

FieldTypeRequiredDescription
owner_idstringYesIdentifier of the space owner
org_idstringYesOrganisation identifier
project_idstringYesProject identifier the space belongs to
namestringYesDisplay name of the space
descriptionstringNoOptional description
emailstringYesContact email for the space owner

Required Headers

HeaderDescription
X-Org-IdOrganisation identifier
X-Project-IdProject identifier
X-User-IdAuthenticated user's identifier
X-User-RolesComma-separated roles (e.g., admin,user)
X-Server-KeyServer key from config.yml

Response

201 Created:

{
"code": 201,
"status": "Created",
"message": "spaces created successfully"
}

Update Spaces

Update one or more existing spaces. Pass space_id in each object to identify which space to update.

Request Body

Send an array of space objects. Each object must include space_id to identify which space to update.

FieldTypeRequiredDescription
owner_idstringYesIdentifier of the space owner
space_idstringYesID of the space to update
org_idstringYesOrganisation identifier
project_idstringYesProject identifier the space belongs to
namestringYesUpdated display name of the space
descriptionstringNoOptional description
emailstringYesContact email for the space owner

Required Headers

HeaderDescription
X-Project-IdProject identifier
X-Org-IdOrganisation identifier
X-Space-IdSpace identifier
X-User-IdAuthenticated user's identifier
X-User-RolesComma-separated roles (e.g., admin,user)
X-Server-KeyServer key from config.yml

Response

200 OK:

{
"code": 200,
"status": "OK",
"message": "spaces updated successfully"
}

Get Spaces

Returns all spaces under a specific organisation and project.

Required Headers

HeaderDescription
X-Project-IdProject identifier
X-Org-IdOrganisation identifier
X-User-IdAuthenticated user's identifier
X-Server-KeyServer key from config.yml

Response

200 OK:

[
{
"space_id": "01KHX0DAD2654K2Z8CTG4V1ACQ",
"name": "my space",
"description": "My workspace",
"email": "admin@mycompany.com"
},
{
"space_id": "01KHX0DAD23T3CA4Q2DE5NSCW9",
"name": "your space",
"description": "Your workspace",
"email": "admin@mycompany.com"
}
]

Common Errors

CodeCause
400Body is not a valid JSON array, or a required field is missing
401Missing X-User-Id header
403Invalid or missing X-Server-Key
404Project or org not found — check X-Project-Id and X-Org-Id
208A space with the same name already exists under this project