Workspaces
Returns what the presented credential is: userId, organisationId, workspaceId (the workspace the credential is pinned to, or null for org-wide), scopes, authType (apiKey | oauth), and rateLimit (requests per minute; null for OAuth connections, which share the fixed OAuth limit). Needs no scopes — any authenticated caller may ask who it is. Use it to fail fast on missing scopes before starting a workflow.
An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.
Successful response
Unauthorized
Forbidden
Too Many Requests; the response carries Retry-After
Internal Server Error
GET /api/v1/me HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"userId": "text",
"organisationId": "text",
"workspaceId": null,
"scopes": [
"text"
],
"authType": "apiKey",
"rateLimit": null
}
}Lists workspaces the user can access within the organisation. Filtered by resource access: only workspaces where the user has at least read permission (owner, accessRights, or org role) are returned. Not paginated.
An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.
Successful response
Unauthorized
Forbidden
Too Many Requests; the response carries Retry-After
Internal Server Error
GET /api/v1/workspaces HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"id": "text",
"organisationId": "text",
"name": "text",
"createdAt": "text",
"isOrgLibrary": true
}
]
}Creates a new workspace with name and optional description. The caller becomes the owner. Workspace is scoped to the organisation from the auth context.
An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.
Successful response
Bad Request
Unauthorized
Forbidden
Unprocessable Entity
Too Many Requests; the response carries Retry-After
Internal Server Error
POST /api/v1/workspaces HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"name": "text"
}{
"data": {
"id": "text",
"organisationId": "text",
"name": "text",
"createdAt": "text",
"isOrgLibrary": true
}
}Returns the workspace by id. wsId is resolved from the request URL; workspace must belong to the organisation and user must have access (enforced by middleware).
An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.
Path parameter: wsId
123Successful response
Unauthorized
Forbidden
Not Found
Too Many Requests; the response carries Retry-After
Internal Server Error
GET /api/v1/workspaces/{wsId} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"id": "text",
"organisationId": "text",
"name": "text",
"createdAt": "text",
"isOrgLibrary": true
}
}Permanently deletes the workspace. Requires sources:delete scope and full permission. Does not necessarily delete data in the data-service; workspace-scoped resources may remain until explicitly cleaned.
An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.
Path parameter: wsId
123No Content
No content
Unauthorized
Forbidden
Not Found
Too Many Requests; the response carries Retry-After
Internal Server Error
DELETE /api/v1/workspaces/{wsId} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Updates workspace name and/or description. Only these fields are writable. Used for display and organisation.
An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.
Path parameter: wsId
123Successful response
Bad Request
Unauthorized
Forbidden
Not Found
Unprocessable Entity
Too Many Requests; the response carries Retry-After
Internal Server Error
PATCH /api/v1/workspaces/{wsId} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"name": "text"
}{
"data": {
"id": "text",
"organisationId": "text",
"name": "text",
"createdAt": "text",
"isOrgLibrary": true
}
}Last updated

