Change roles or time out a member
const url = 'https://api.gampeon.com/v1/communities/1/members/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"roles":[1],"timeoutMinutes":1,"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Community ID
Handle of the member
Request Bodyrequired
Section titled “Request Bodyrequired”object
Optional reason, shown to the person affected
Example generated
{ "roles": [ 1 ], "timeoutMinutes": 1, "reason": "example"}Responses
Section titled “Responses”What changed
Error codes: invalid_field
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: unauthorized
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed, missing_permission, role_hierarchy, forbidden
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: not_found
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}