PATCH
/
v2
/
enterprise
/
members
/
roles
curl -X PATCH "https://api.devin.ai/v2/enterprise/members/roles" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_ids": ["user_123", "user_456"],
    "role_id": "account_admin"
  }'
{
  "status": "success"
}
Updates the account-level roles for one or more enterprise members. This endpoint allows you to assign a new role to multiple users at once.

Request Body

user_ids
array
required
List of user IDs to update. Each user must be a member of the enterprise.
role_id
string
required
The role ID to assign to the specified users. Must be an account-level role (role_type=“account”). Use the List available roles endpoint to get valid role IDs.

Response

status
string
required
Status of the operation. Returns “success” when the roles are updated successfully.
curl -X PATCH "https://api.devin.ai/v2/enterprise/members/roles" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_ids": ["user_123", "user_456"],
    "role_id": "account_admin"
  }'
{
  "status": "success"
}

Error Responses

400
error
Bad Request - The specified role_id is not an account-level role
403
error
Forbidden - User not associated with an enterprise or lacks permission to manage account membership
404
error
Not Found - One or more specified users not found in the enterprise