Pi Durable Platformdocs
ReferenceAdmin

Change a user's platform role or suspend/reactivate them

PATCH
/v1/admin/users/{userId}

Path Parameters

userId*string
Formatuuid

Header Parameters

If-Match*string

The resource's revision, as returned in ETag (for example "3"). Missing returns 428; stale returns 412.

Request Body

application/json
  1. body
platformRole?PlatformRole
Value in"none""platform_admin""platform_auditor"
status?UserStatus
Value in"active""suspended"

Response Body

Updated user

application/json
  1. response
data*
curl -X PATCH 'https://agents.example.com/v1/admin/users/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'If-Match: string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "revision": 0,    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "email": "string",    "displayName": "string",    "platformRole": "none",    "status": "active",    "createdAt": "2019-08-24T14:15:22Z",    "lastLoginAt": "2019-08-24T14:15:22Z",    "teamCount": 0  }}