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-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


organization

string

Required

The slug or UUID for an organization.

Query Parameters


direction

string

The direction to sort by. If not specified, the default sort direction is used.

Default: asc

One of: asc, desc


page

integer

The page number to return. If not specified, the first page is returned.

Default: 1


per_page

integer

The number of items to return per page. If not specified, the default number of items per page (8) is used.

Default: 8


sort

string

The field to sort by. If not specified, the default sort field is used.

Default: name

One of: name


name

string

Filter by user name, exact match.


search

string

Search by user name, slug, or UUID.

GET
/v0/organizations/{organization}/members
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher member list ORGANIZATION

View 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.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


organization

string

Required

The slug or UUID for an organization.

Body Parameters


email

string

Required

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.


name

string

The user name for the invitee.


role

string

Required

The organization role for the invitee.

One of: leader

POST
/v0/organizations/{organization}/members
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher member invite ORGANIZATION

View 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-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


organization

string

Required

The slug or UUID for an organization.


user

string

Required

The slug or UUID for an organization member.

GET
/v0/organizations/{organization}/members/{user}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher member view ORGANIZATION USER

View 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.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


organization

string

Required

The slug or UUID for an organization.


user

string

Required

The slug or UUID for an organization member.

Body Parameters


role

string

The new organization role for the member.

One of: leader

PATCH
/v0/organizations/{organization}/members/{user}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher member update ORGANIZATION USER

View 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 member of an organization. The user must have `delete_role` permissions for the organization.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


organization

string

Required

The slug or UUID for an organization.


user

string

Required

The slug or UUID for an organization member.

DELETE
/v0/organizations/{organization}/members/{user}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher member remove ORGANIZATION USER

View OpenAPI Spec


Published: Mon, February 12, 2024 at 7:26:00 AM UTC | Last Updated: Fri, June 21, 2024 at 5:47:00 PM UTC