ServerOps.ggbeta
API ReferenceMembers

Update a member's role

Change the role of an existing member. Cannot demote the last Owner or the primary owner without first transferring ownership.

Requires members:write scope.

PATCH
/orgs/{orgId}/members/{userId}

Authorization

bearerAuth members:write
AuthorizationBearer <token>

API token from your dashboard.

Format: so_live_... (production) or so_test_... (test mode).

Tokens carry one or more scopes. Request only the scopes your integration needs:

ScopeGrants
media:readList and retrieve files
media:writeUpload and delete files
logs:readRead log entries
logs:writeIngest log entries
cases:readRead cases
cases:writeCreate and update cases
apps:readRead apps
apps:writeSubmit apps
usage:readRead quota usage
members:readList organisation members
members:writeInvite and remove members
billing:readRead billing and subscription info
tokens:writeCreate and revoke API tokens

In: header

Scope: members:write

Path Parameters

orgId*string

Organisation ID (ULID)

userId*string

User ID of the member (the id field from the list response)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

roleId*string

ID of the new role to assign. Must belong to this org.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/orgs/01HZXXXXXXXXXXXXXXXXXXXXX/members/string" \  -H "Content-Type: application/json" \  -d '{    "roleId": "rol_01HXYZ"  }'
{
  "ok": true
}
{
  "error": {
    "code": "bad_request",
    "message": "missing required field"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "missing or invalid authorization token"
  }
}

{
  "error": {
    "code": "forbidden",
    "message": "token does not have the required scope"
  }
}

{
  "error": {
    "code": "not_found",
    "message": "file not found"
  }
}
{
  "error": {
    "code": "internal",
    "message": "an unexpected error occurred"
  }
}