List memberships in an org
const url = 'https://your-org.evershell.ai/v1/orgs/example/memberships';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://your-org.evershell.ai/v1/orgs/example/memberships \ --header 'Authorization: Bearer <token>'Permissions: members:read or members:read:own —
callers with the unscoped variant see every membership in
the org; callers with only :own see just their own row.
All three default roles hold members:read (unscoped); the
:own variant is for custom roles that want stricter
narrowing.
Path id must match the caller’s org id; cross-org reads return 403 even from an Owner of the other org.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”OK
object
object
Empty until the invitee accepts and the WorkOS webhook
stamps the real id. Use accepted_at to distinguish
pending invitations from active members.
Null while the invite is still pending.
Example
{ "memberships": [ { "role": "owner" } ]}Missing or invalid credential
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}Caller lacks the required scope, or cross-org access attempted
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}