Skip to main content
PUT
https://your-rootprint-host
/
api
/
users
/
{userId}
/
role
Set user role
curl --request PUT \
  --url https://your-rootprint-host/api/users/{userId}/role \
  --header 'Content-Type: application/json' \
  --cookie better-auth.session_token= \
  --data '{}'
{
  "error": {
    "code": "<string>",
    "message": "<string>",
    "statusCode": 123,
    "requestId": "<string>",
    "details": [
      {
        "path": "<string>",
        "message": "<string>"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.rootprint.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

better-auth.session_token
string
cookie
required

Better Auth session cookie used by the Rootprint web UI.

Path Parameters

userId
string
required

User ID.

Minimum string length: 1

Body

application/json
role
enum<string>
required
Available options:
admin,
user

Response

Role updated.