Organization API › Members
List a member's roles
GET/api/v1/users/{userId}/roles
The roles given to the member directly. Roles held through a team are on GET /api/v1/teams/{id}/roles. An unknown member gives [].
Permission (API-key scope): identity:role:read.
Authorization
bearerAuth(identity:role:read)apiKeyHeader(identity:role:read)
Parameters
Path parameters
userIdstring requiredA member's id (usr_…).
Responses
200
The roles.
dataarray of Role requiredShow Role properties
idstring requiredorg_idstring requirednamestring requireddescriptionstringpermissionsarray of string requiredPermission names from the catalog (GET /api/v1/permissions).built_instringSet on the three default roles, which cannot be deleted and only an administrator edits.created_atstring (date-time) requiredupdated_atstring (date-time) required
successboolean required
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
429
Too many requests (RATE_LIMITED). Wait Retry-After seconds.
Retry-AfterintegerSeconds to wait.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
Example request
curl -X GET 'https://evohub.io/api/v1/users/usr_7a3c9e10-b2d4-4f6a-8c1e-5d7f9a0b2c3e/roles' \
-H 'Authorization: Bearer <TOKEN>'