List space roles
Every role assignable in a space of this organization: the four platform presets (kind: "preset", read-only, id: null) followed by the organization's own bundles (kind: "custom").
GET
/api/rolesbetter-auth.session_token<token>
Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Header Parameters
X-Org-Id?string
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
Format
uuidcurl -X GET "https://your-instance/api/roles"{
"object": "list",
"data": [
{
"object": "role",
"kind": "preset",
"id": "string",
"key": "string",
"name": "string",
"description": "string",
"permissions": [
"string"
],
"unavailable_permissions": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"hasMore": true
}{
"type": "https://docs.appstrate.dev/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing session",
"code": "unauthorized",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}