Workspaces

The top-level container everything else — modules, members, activity — hangs off.

GET/workspaces

List workspaces

Every workspace the caller belongs to, wrapped in its membership row.

bash
curl -X GET 'https://api.conexus-x.example/api/workspaces' \
  -H 'x-api-key: YOUR_PIT_KEY'

Example response

json
{
  "workspaces": [
    {
      "workspace": {
        "_id": "66f1a2b3c4d5e6f7a8b9c0d1",
        "name": "Acme Sales",
        "slug": "acme-sales",
        "description": "Everything the go-to-market team touches.",
        "createdAt": "2026-01-14T09:12:00.000Z",
        "updatedAt": "2026-08-02T15:40:11.000Z",
        "totalModules": 4
      }
    }
  ]
}
GET/workspaces/{id}

Get a workspace

One workspace by id.

Path parameters

id*stringWorkspace id.
bash
curl -X GET 'https://api.conexus-x.example/api/workspaces/{id}' \
  -H 'x-api-key: YOUR_PIT_KEY'

Example response

json
{
  "workspace": {
    "_id": "66f1a2b3c4d5e6f7a8b9c0d1",
    "name": "Acme Sales",
    "slug": "acme-sales",
    "description": "Everything the go-to-market team touches.",
    "createdAt": "2026-01-14T09:12:00.000Z",
    "updatedAt": "2026-08-02T15:40:11.000Z",
    "totalModules": 4
  }
}
POST/workspaces

Create a workspace

Creates a workspace and makes the caller its owner.

Body

name*stringWorkspace name.
iconstringIcon catalog key.
bash
curl -X POST 'https://api.conexus-x.example/api/workspaces' \
  -H 'x-api-key: YOUR_PIT_KEY'
  -H 'Content-Type: application/json' \
  -d '{"name":"Acme Sales","icon":"briefcase"}'

Example response

json
{
  "workspace": {
    "_id": "66f1a2b3c4d5e6f7a8b9c0d1",
    "name": "Acme Sales",
    "slug": "acme-sales",
    "description": "Everything the go-to-market team touches.",
    "createdAt": "2026-01-14T09:12:00.000Z",
    "updatedAt": "2026-08-02T15:40:11.000Z",
    "totalModules": 4
  }
}
PUT/workspaces/{id}

Update a workspace

Renames or restyles a workspace. Owner/admin only.

Path parameters

id*stringWorkspace id.

Body

namestringNew name.
descriptionstringNew description.
iconstringIcon catalog key.
bannerstringBanner key, or an absolute URL.
bash
curl -X PUT 'https://api.conexus-x.example/api/workspaces/{id}' \
  -H 'x-api-key: YOUR_PIT_KEY'
  -H 'Content-Type: application/json' \
  -d '{"name":"Acme Sales EMEA"}'

Example response

json
{
  "workspace": {
    "_id": "66f1a2b3c4d5e6f7a8b9c0d1",
    "name": "Acme Sales",
    "slug": "acme-sales",
    "description": "Everything the go-to-market team touches.",
    "createdAt": "2026-01-14T09:12:00.000Z",
    "updatedAt": "2026-08-02T15:40:11.000Z",
    "totalModules": 4
  }
}
DELETE/workspaces/{id}

Delete a workspace

Deletes a workspace and everything inside it. Owner only. Irreversible.

Path parameters

id*stringWorkspace id.
bash
curl -X DELETE 'https://api.conexus-x.example/api/workspaces/{id}' \
  -H 'x-api-key: YOUR_PIT_KEY'

Example response

json
{
  "message": "Workspace deleted."
}