- API
- Roles endpoints
Roles endpoints
The Qualithm API's Roles endpoints: what each takes and returns.
Every path starts at your API URL. Every response is JSON, and an error has the error body.
List the teams the caller belongs to and their role in each; a token sees only its own
#GET /v1/account/memberships
Newest team first, by the team's createdAt then the membership id.
Needs an API token.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | No | Items per page, 1 to 100. Default 50. |
cursor | query | string | No | A previous page's nextCursor, to read the page after it |
Response: 200 with RoleAssignmentPage in data.
Errors: 400, 401, 429, 500, 503
bash
curl "<your-api-url>/v1/account/memberships" \
-H "Authorization: Bearer <your-api-token>"Types
#RoleAssignmentPage
#| Field | Type | Required | Description |
|---|---|---|---|
items | array of RoleAssignment | Yes | |
nextCursor | string or null | Yes | Pass as cursor to read the next page; null on the last page |
RoleAssignment
#One team the caller is an active member of, and their role in it.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | A member ID: mbr_…; also accepts the legacy mem_… |
accountId | string | Yes | An account ID: acc_… |
teamId | string | Yes | A team ID: tem_…; also accepts the legacy tm_… |
teamName | string | Yes | |
role | MemberRole | Yes | |
createdAt | string (date-time) | Yes | UTC time, RFC 3339 |
updatedAt | string (date-time) | Yes | UTC time, RFC 3339 |
MemberRole
#A member's role in a team.
one of "owner", "manager", "viewer".