Workspaces list
GET
https://app.sulus.ai/api/workspaces
List workspaces the current user belongs to
Authentication
Send a bearer token created on your dashboard's Developer page:
Authorization: Bearer <YOUR_API_KEY>
Errors
| Status | Meaning | Body |
|---|---|---|
401 |
Missing or invalid bearer token | |
403 |
Feature workspaces not enabled | {"message":"This feature is not enabled for your account. Please contact your administrator.","feature":"workspaces"} |
Notes
- Ordered personal first, then by name.
- Also used by the workspace switcher, not only the Team page.
curl --request GET \
--url https://app.sulus.ai/api/workspaces \
--header 'Authorization: Bearer <YOUR_API_KEY>'
import requests
url = "https://app.sulus.ai/api/workspaces"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
response = requests.get(url, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://app.sulus.ai/api/workspaces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
200
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Jane's Workspace",
"is_personal": true,
"role": "owner",
"member_count": 3,
"owner_has_active_subscription": true,
"owner": {
"id": 12,
"name": "Jane Cooper",
"email": "[email protected]"
}
}
]
}
Response — GET
/workspaces
200
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Jane's Workspace",
"is_personal": true,
"role": "owner",
"member_count": 3,
"owner_has_active_subscription": true,
"owner": {
"id": 12,
"name": "Jane Cooper",
"email": "[email protected]"
}
}
]
}