Skip to Content
Pouch
Admin users

Grant or revoke service-wide admin

PATCH
/v1/admin/users/{id}

Auth: Admin key.

Revoking revokes the admin keys this account created, including the one making the call. The last admin can't be demoted.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Path Parameters

id*string

An opaque, type-prefixed id.

Request Body

application/json
  1. body
admin*boolean

The service-wide admin flag. Revoking it revokes the admin keys this account created, and the last admin can't be demoted.

Response Body

The account.

application/json
  1. response
id?string

The account's id.

name?string

Display name.

email?string

Email address, which is also how they sign in.

admin?boolean

The service-wide admin flag. Orthogonal to any organization role.

memberships?array<>

Organizations this account belongs to, oldest first, with its role in each.

created_at?string

ISO 8601 timestamp.

Example Request
curl -X PATCH 'https://pouch.example.com/v1/admin/users/string' \  -H 'Content-Type: application/json' \  -d '{  "admin": true}'
Example Response
{  "id": "string",  "name": "string",  "email": "string",  "admin": true,  "memberships": [    {      "organization_id": "string",      "organization_name": "string",      "role": "owner"    }  ],  "created_at": "string"}