Add and remove members
POST
/api/v1/groups/{id}/members
const url = 'http://localhost:3000/api/v1/groups/example/members';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"add":["example"],"remove":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/v1/groups/example/members \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "add": [ "example" ], "remove": [ "example" ] }'People of the organization only. Joining a group whose grants make an editor takes a seat.
Any caller; the scope needed is checked on what it acts on.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Group id
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
add
Members’ user ids, from /api/v1/members
Array<string>
remove
Array<string>
Examplegenerated
{ "add": [ "example" ], "remove": [ "example" ]}Responses
Section titled “Responses”The group
Media typeapplication/json
object
data
required
object
id
required
string format: uuid
name
required
string
source
required
Made by an admin, or synced from single sign-on
string
createdAt
required
string format: date-time
members
required
Array<object>
object
id
required
string
name
required
string
email
required
string
Example
{ "data": { "source": "manual", "grants": [ { "resource": "organization", "scope": "read" } ] }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}