Skip to content

Give several members one role, one status, or one more team, all or none

POST
/api/v1/members/bulk
curl --request POST \
--url https://gpu-kitchen.example.lan/api/v1/members/bulk \
--header 'Content-Type: application/json' \
--cookie gpuk_session=<gpuk_session> \
--data '{ "member_ids": [ "example" ], "role": "super_admin", "status": "active", "add_to_team": "example" }'

The change applies to every member listed, in one transaction: a refusal for one changes none. One audit entry names them all.

Media typeapplication/json
object
member_ids
required
Array<string>
>= 1 items <= 1000 items
role
string
Allowed values: super_admin admin operator user
status
string
Allowed values: active disabled
add_to_team
string
>= 1 characters

Success.

Media typeapplication/json
object
updated
required
integer
<= 9007199254740991
Examplegenerated
{
"updated": 1
}

Error codes: cannot_disable_self, last_super_admin, validation_error.

Media typeapplication/json
object
error
required
object
code
required

Stable snake_case code to branch on.

string
message
required

A sentence to show a person.

string
details

Optional structured context.

fix

Optional place where the problem is fixed.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example",
"fix": "example"
}
}

Error codes: auth_required.

Media typeapplication/json
object
error
required
object
code
required

Stable snake_case code to branch on.

string
message
required

A sentence to show a person.

string
details

Optional structured context.

fix

Optional place where the problem is fixed.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example",
"fix": "example"
}
}

Error codes: admin_required, cannot_grant_higher_role, forbidden, member_limit_reached, operator_requires_offer, session_required, super_admin_required.

Media typeapplication/json
object
error
required
object
code
required

Stable snake_case code to branch on.

string
message
required

A sentence to show a person.

string
details

Optional structured context.

fix

Optional place where the problem is fixed.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example",
"fix": "example"
}
}

Error codes: member_not_found, team_not_found.

Media typeapplication/json
object
error
required
object
code
required

Stable snake_case code to branch on.

string
message
required

A sentence to show a person.

string
details

Optional structured context.

fix

Optional place where the problem is fixed.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example",
"fix": "example"
}
}

Error codes: multi_user_requires_sign_in, operator_cannot_lead.

Media typeapplication/json
object
error
required
object
code
required

Stable snake_case code to branch on.

string
message
required

A sentence to show a person.

string
details

Optional structured context.

fix

Optional place where the problem is fixed.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example",
"fix": "example"
}
}

Error codes: payload_too_large.

Media typeapplication/json
object
error
required
object
code
required

Stable snake_case code to branch on.

string
message
required

A sentence to show a person.

string
details

Optional structured context.

fix

Optional place where the problem is fixed.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example",
"fix": "example"
}
}