Access

Update a workspace member role

PATCH
/api/workspaces/{workspaceId}/members/{memberId}

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

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

Path Parameters

workspaceId*string
Length1 <= length
memberId*string
Length1 <= length

Request Body

  1. body
role*string
Value in"admin""member"

Response Body

Response for status 200

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

Was this page helpful?