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 [].
| Field | Type | Required | Description |
|---|---|---|---|
owner_id | string | Yes | Identifier of the space owner |
org_id | string | Yes | Organisation identifier |
project_id | string | Yes | Project identifier the space belongs to |
name | string | Yes | Display name of the space |
description | string | No | Optional description |
email | string | Yes | Contact email for the space owner |
Required Headers
| Header | Description |
|---|---|
X-Org-Id | Organisation identifier |
X-Project-Id | Project identifier |
X-User-Id | Authenticated user's identifier |
X-User-Roles | Comma-separated roles (e.g., admin,user) |
X-Server-Key | Server 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.
| Field | Type | Required | Description |
|---|---|---|---|
owner_id | string | Yes | Identifier of the space owner |
space_id | string | Yes | ID of the space to update |
org_id | string | Yes | Organisation identifier |
project_id | string | Yes | Project identifier the space belongs to |
name | string | Yes | Updated display name of the space |
description | string | No | Optional description |
email | string | Yes | Contact email for the space owner |
Required Headers
| Header | Description |
|---|---|
X-Project-Id | Project identifier |
X-Org-Id | Organisation identifier |
X-Space-Id | Space identifier |
X-User-Id | Authenticated user's identifier |
X-User-Roles | Comma-separated roles (e.g., admin,user) |
X-Server-Key | Server 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
| Header | Description |
|---|---|
X-Project-Id | Project identifier |
X-Org-Id | Organisation identifier |
X-User-Id | Authenticated user's identifier |
X-Server-Key | Server 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
| Code | Cause |
|---|---|
400 | Body is not a valid JSON array, or a required field is missing |
401 | Missing X-User-Id header |
403 | Invalid or missing X-Server-Key |
404 | Project or org not found — check X-Project-Id and X-Org-Id |
208 | A space with the same name already exists under this project |