Snapvisor Docs

Change a member's role

Change the role of an existing team member. Requires administrator access to the team. Use it when a team administrator asks to promote or demote an existing member.

PATCH
/accounts/{accountSlug}/members/{userId}

Change the role of an existing team member. Requires administrator access to the team. Use it when a team administrator asks to promote or demote an existing member.

Authorization

AuthorizationBearer <token>

Authenticate as a user with a personal access token.

Send it as a bearer token in the Authorization header:

Authorization: Bearer <personal-access-token>

Personal access tokens act on behalf of the user that created them and are required by endpoints that perform user actions, such as reviewing builds and posting comments.

In: header

Path Parameters

accountSlug*string

Slug of the team.

Length1 <= length
userId*string

Identifier of the user to act on — the user.id returned by listAccountMembers, which is the user's account id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/accounts/string/members/string" \  -H "Content-Type: application/json" \  -d '{    "level": "owner"  }'
{  "id": "string",  "user": {    "id": "string",    "slug": "string",    "name": "string"  },  "level": "owner"}