latestOpenAPI 3.1.02026-08-197104501.1 MB
8fbaab4fc7c5
Internal User management
Bulk User Update
Bulk update multiple users at once.
This endpoint allows updating multiple users in a single request. Each user update is processed independently - if some updates fail, others will still succeed.
Parameters:
- users: Optional[List[UpdateUserRequest]] - List of specific user update requests
- all_users: Optional[bool] - Set to true to update all users in the system
- user_updates: Optional[UpdateUserRequest] - Updates to apply when all_users=True
Returns:
- results: List of individual update results
- total_requested: Total number of users requested for update
- successful_updates: Number of successful updates
- failed_updates: Number of failed updates
Example request for specific users:
curl --location 'http://0.0.0.0:4000/user/bulk_update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"users": [
{
"user_id": "user1",
"user_role": "internal_user",
"max_budget": 100.0
},
{
"user_email": "user2@example.com",
"user_role": "internal_user_viewer",
"max_budget": 50.0
}
]
}'
Example request for all users:
curl --location 'http://0.0.0.0:4000/user/bulk_update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"all_users": true,
"user_updates": {
"user_role": "internal_user",
"max_budget": 50.0
}
}'
post/user/bulk_update
Headers
litellm-changed-bystring nullable
The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability
The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability
Request body
Response
Successful Response