Test And Accept
API ReferenceProjectusers

Update user role

Update a user's access level in a project

PATCH
/projects/{projectId}/users/{userId}/role
AuthorizationBearer <token>

Clerk authentication token

In: header

Path Parameters

projectIdstring
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
Formatuuid
userIdstring
Length1 <= length
accessLevelstring
Value in"owner" | "editor" | "approver" | "viewer" | "follower"

Response Body

curl -X PATCH "http://localhost:3001/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/users/string/role" \
  -H "Content-Type: application/json" \
  -d '{
    "accessLevel": "owner"
  }'
{
  "success": true
}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}