Skip to content
GAMPEONCreate
New project

Change roles or time out a member

PATCH
/v1/communities/{id}/members/{handle}
curl --request PATCH \
--url https://api.gampeon.com/v1/communities/1/members/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "roles": [ 1 ], "timeoutMinutes": 1, "reason": "example" }'

roles (all role IDs the member should have, without everyone) needs manageRoles; you can only add or remove roles below your highest role. timeoutMinutes needs timeoutMembers and a highest role above theirs; 0 ends the timeout. Timed out members can only read. The person gets a notification with the reason.

Not available with access tokens.

id
required
integer
>= 1

Community ID

handle
required
string
/^[a-z0-9_]{3,24}$/

Handle of the member

Media typeapplication/json
object
roles
Array<integer>
timeoutMinutes
integer
<= 10080
reason

Optional reason, shown to the person affected

string
<= 300 characters

Example generated

{
"roles": [
1
],
"timeoutMinutes": 1,
"reason": "example"
}

What changed

Media typeapplication/json
object
roles
Array<integer>
timeoutUntil
One of:

Unix time in milliseconds

integer format: int64

Example generated

{
"roles": [
1
],
"timeoutUntil": 1
}

Error codes: invalid_field

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: unauthorized

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: token_not_allowed, missing_permission, role_hierarchy, forbidden

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: not_found

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Report a problem with this pageOther ways to give feedback