POST
/
v2
/
enterprise
/
organizations
/
{org_id}
/
members
curl -X POST "https://api.devin.ai/v2/enterprise/organizations/{org_id}/members" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_ids": ["user_123", "user_456"],
    "org_ids": ["org_789", "org_101"],
    "org_role": "member"
  }'
{
  "status": "success"
}
This endpoint allows you to add multiple users to multiple organizations in a single API call. It’s designed for efficient bulk operations when managing organization memberships at scale.

Path Parameters

org_id
string
required
The ID of the organization to add members to

Request Body

user_ids
array
required
Array of user IDs to add to the organization(s). All users must exist within your enterprise.
org_ids
array
required
Array of organization IDs to add the users to. All organizations must exist within your enterprise.
org_role
string
default:"member"
Role to assign to the users in the organization(s). Can be “admin” or “member”.

Response

status
string
Returns “success” when the operation completes successfully

Behavior Notes

  • If a user is already a member of an organization, their role will be updated to the specified org_role
  • The operation is atomic - either all memberships are processed or the entire operation fails
  • Users and organizations that don’t exist in your enterprise will cause the operation to fail
  • Audit logs are created for all membership changes
curl -X POST "https://api.devin.ai/v2/enterprise/organizations/{org_id}/members" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_ids": ["user_123", "user_456"],
    "org_ids": ["org_789", "org_101"],
    "org_role": "member"
  }'
{
  "status": "success"
}