Organization Members REST API
List organization members
⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
List members for an organization. The user must have `view_role` permissions for the organization. By default, the members are sorted in alphabetical order by name. The HTTP response header `X-Total-Count` contains the total number of members.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
organizationThe slug or UUID for an organization.
Query Parameters
directionstring
The direction to sort by. If not specified, the default sort direction is used.
Default: asc
One of: asc, desc
pageinteger
The page number to return. If not specified, the first page is returned.
Default: 1
per_pageinteger
The number of items to return per page. If not specified, the default number of items per page (8) is used.
Default: 8
sortstring
The field to sort by. If not specified, the default sort field is used.
Default: name
One of: name
namestring
Filter by user name, exact match.
searchstring
Search by user name, slug, or UUID.
/v0/organizations/{organization}/members| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
Bencher CLI
bencher member list ORGANIZATIONView OpenAPI Spec
Invite a user to an organization
⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
Invite another user to become a member of an organization. The user must have `create_role` permissions for the organization. The invitee is sent an email with a link to accept the invitation, and they are not added to the organization until they accept the invitation. The link works once, for 7 days, and only for the invited email. Inviting an email that the organization already invited sends a new link, and the link it sent before no longer works. An email that already belongs to a member of the organization is a conflict. This endpoint requires a user session signed in within the last 10 minutes: neither a user API key nor a deprecated user API token can send an invitation.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
organizationThe slug or UUID for an organization.
Body Parameters
emailstring
The email for the invitee. This will be used to both send the invite and to create the user account if they do not exist.
namestring
The user name for the invitee.
rolestring
The organization role for the invitee.
One of: leader
/v0/organizations/{organization}/members| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
Bencher CLI
bencher member invite ORGANIZATIONView OpenAPI Spec
View an organization member
⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
View a member of an organization. The user must have `view_role` permissions for the organization.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
organizationThe slug or UUID for an organization.
userThe slug or UUID for an organization member.
/v0/organizations/{organization}/members/{user}| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
Bencher CLI
bencher member view ORGANIZATION USERView OpenAPI Spec
Update an organization member
⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
Update the role for a member of an organization. The user must have `edit_role` permissions for the organization to change a role, and `view_role` permissions to update nothing. Changing a role requires a user session signed in within the last 10 minutes: neither a user API key nor a deprecated user API token can grant a role.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
organizationThe slug or UUID for an organization.
userThe slug or UUID for an organization member.
Body Parameters
rolestring
The new organization role for the member.
One of: leader
/v0/organizations/{organization}/members/{user}| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
Bencher CLI
bencher member update ORGANIZATION USERView OpenAPI Spec
Remove an organization member
⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
Remove a member of an organization, the user themself included, to leave it. The user must have `delete_role` permissions for the organization. The organization's last Leader cannot be removed. The member's roles on the organization's projects, and the invitations they sent to it, end with the removal.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
organizationThe slug or UUID for an organization.
userThe slug or UUID for an organization member.
/v0/organizations/{organization}/members/{user}| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
Bencher CLI
bencher member remove ORGANIZATION USERView OpenAPI Spec
List pending invitations
⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
List the invitations to an organization that have not been accepted or revoked, expired ones included. The user must have `create_role` permissions for the organization. By default, the newest invitations come first. The HTTP response header `X-Total-Count` contains the total number of invitations.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
organizationThe slug or UUID for an organization.
Query Parameters
directionstring
The direction to sort by. If not specified, the default sort direction is used.
Default: asc
One of: asc, desc
pageinteger
The page number to return. If not specified, the first page is returned.
Default: 1
per_pageinteger
The number of items to return per page. If not specified, the default number of items per page (8) is used.
Default: 8
sortstring
The field to sort by. If not specified, the default sort field is used.
Default: created
One of: created
/v0/organizations/{organization}/invites| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
View OpenAPI Spec
Resend an invitation
⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
Email a pending invitation again, expired or not, with a new link that works for 7 days. The link it sent before no longer works. The user must have `create_role` permissions for the organization. This endpoint requires a user session signed in within the last 10 minutes: neither a user API key nor a deprecated user API token can send an invitation.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
invitestring
The UUID for an invitation.
organizationThe slug or UUID for an organization.
/v0/organizations/{organization}/invites/{invite}/resend| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
View OpenAPI Spec
Revoke an invitation
⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
End a pending invitation, so its link no longer works. The user must have `delete_role` permissions for the organization.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
invitestring
The UUID for an invitation.
organizationThe slug or UUID for an organization.
/v0/organizations/{organization}/invites/{invite}| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
View OpenAPI Spec