Members and roles
Who belongs to an organization or project, and their roles.
Every path is under /api/v1; see the API for authenticating, errors and rate
limits, and the schemas for the bodies.
Members of an organization (any member; emails only with member:manage)
GET /api/v1/orgs/{org}/members
| Parameter | In | Description |
|---|---|---|
org |
path | ID |
Answers:
200: OK, object with the fields below
| Field | Type | Description |
|---|---|---|
members |
array of Member, required |
Errors: 401, 404 (how errors look).
Change a member's role (member:manage, and the right to grant both roles)
PUT /api/v1/orgs/{org}/members/{user}
| Parameter | In | Description |
|---|---|---|
org |
path | ID |
user |
path | ID |
Body (application/json): SetMemberRole.
Answers:
204: Changed
Errors: 400, 401, 403, 404, 409, 422 (how errors look).
Remove a member, or leave when it's the caller (the last owner can't)
DELETE /api/v1/orgs/{org}/members/{user}
| Parameter | In | Description |
|---|---|---|
org |
path | ID |
user |
path | ID |
Answers:
204: Removed
Errors: 401, 403, 404, 409, 422 (how errors look).
The built-in roles and their permissions (any member)
GET /api/v1/orgs/{org}/roles
| Parameter | In | Description |
|---|---|---|
org |
path | ID |
Answers:
200: OK, object with the fields below
| Field | Type | Description |
|---|---|---|
roles |
array of Role, required |
Errors: 401, 404 (how errors look).
Project members (project:read; emails only with member:manage on the org)
GET /api/v1/projects/{project}/members
| Parameter | In | Description |
|---|---|---|
project |
path | ID |
Answers:
200: OK, object with the fields below
| Field | Type | Description |
|---|---|---|
grantable_role_ids |
array of ID, required | Roles the caller may grant here; empty without project:manage. |
members |
array of ProjectMember, required |
Errors: 401, 404 (how errors look).
Give an organization member a project role (project:manage, and the right to grant it)
POST /api/v1/projects/{project}/members
| Parameter | In | Description |
|---|---|---|
project |
path | ID |
Body (application/json): AddProjectMember.
Answers:
204: Added
Errors: 400, 401, 403, 404, 409, 422 (how errors look).
Change a project member's role (project:manage, and the right to grant both roles)
PUT /api/v1/projects/{project}/members/{user}
| Parameter | In | Description |
|---|---|---|
project |
path | ID |
user |
path | ID |
Body (application/json): SetMemberRole.
Answers:
204: Changed
Errors: 400, 401, 403, 404, 422 (how errors look).
Remove a project member, or leave when it's the caller
DELETE /api/v1/projects/{project}/members/{user}
| Parameter | In | Description |
|---|---|---|
project |
path | ID |
user |
path | ID |
Answers:
204: Removed
Errors: 401, 403, 404 (how errors look).