PUT
/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}/roleUpdate auth user roleUpdates the role of a user in the Neon Auth user directory for the specified branch. The role controls the user's level of access within the Neon Auth integration.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe Neon branch ID
auth_user_idstringpathrequiredThe Neon user ID
Request body
requiredapplication/json
objectUpdateNeonAuthUserRoleRequest
rolesarray of stringrequiredRoles to assign to the user in the Neon Auth (Better Auth) directory. `user` and `admin` are the built-in roles; custom role strings are also supported.
Show child attributes
{
"roles": [
"admin"
]
}Responses
objectUpdateNeonAuthUserRoleResponse
idstringrequiredID of the updated user
{
"id": "string"
}objectGeneralError
codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}