Skip to Content
Pouch
Admin organizations

Change a member's role

PATCH
/v1/admin/organizations/{id}/members/{userId}

Auth: Admin key.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Path Parameters

id*string

An opaque, type-prefixed id.

userId*string

An opaque, type-prefixed id.

Request Body

application/json
  1. body
role*string

The member's role in this organization. The last owner can't be demoted.

Value in"owner""member"

Response Body

The member, with the new role.

application/json
  1. response
user_id?string

The account's id.

name?string

Display name.

email?string

Email address.

role?string

What they may do inside this organization.

Value in"owner""member"
admin?boolean

Whether they also hold the service-wide admin flag.

created_at?string

ISO 8601 timestamp the membership was created.

Example Request
curl -X PATCH 'https://pouch.example.com/v1/admin/organizations/string/members/string' \  -H 'Content-Type: application/json' \  -d '{  "role": "owner"}'
Example Response
{  "user_id": "string",  "name": "string",  "email": "string",  "role": "owner",  "admin": true,  "created_at": "string"}