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

Path Parameters

org_id
string
required
The unique identifier of the organization

Request Body

user_ids
array
required
List of user IDs to update. Each user must be a member of the organization.
role_id
string
required
The role ID to assign to the specified users. Must be an organization-level role (role_type=“org”). 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/organizations/org_123/members/roles" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_ids": ["user_123", "user_456"],
    "role_id": "org_admin"
  }'
{
  "status": "success"
}

Error Responses

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