Access

Update an instance member role or state

PATCH
/api/access/members/{userId}

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

The Better Auth email/password session cookie used by the web application.

Path Parameters

userId*string
Length1 <= length

Request Body

  1. body
Properties1 <= properties
role?string
Value in"admin""member"
state?string
Value in"enabled""disabled"

Response Body

Response for status 200

application/json
  1. response
membership*
Example Request
curl -X PATCH 'https://postbot.example/api/access/members/string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "membership": {
    "id": "string",
    "userId": "string",
    "email": "string",
    "name": "string",
    "role": "admin",
    "state": "enabled",
    "createdAt": 0,
    "updatedAt": 0
  }
}

Was this page helpful?