---
title: "Bulk User Update"
method: POST
path: "/user/bulk_update"
tags: ["Internal User management"]
---

# Bulk User Update

`POST /user/bulk_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:
```bash
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:
```bash
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
    }
}'
```

## Headers

- `litellm-changed-by` string, 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

## Request body

- BulkUpdateUserRequest — Request for bulk user updates
  - `users` UpdateUserRequest[], nullable
    - `key_alias` string, nullable
    - `duration` string, nullable
    - `models` unknown[], nullable
      - unknown
    - `spend` number, nullable
    - `max_budget` number, nullable
    - `user_id` string, nullable
    - `team_id` string, nullable
    - `agent_id` string, nullable
    - `max_parallel_requests` integer, nullable
    - `metadata` object, nullable
    - `tpm_limit` integer, nullable
    - `rpm_limit` integer, nullable
    - `budget_duration` string, nullable
    - `allowed_cache_controls` unknown[], nullable
      - unknown
    - `config` object, nullable
    - `permissions` object, nullable
    - `model_max_budget` object, nullable
    - `model_rpm_limit` object, nullable
    - `model_tpm_limit` object, nullable
    - `guardrails` string[], nullable
    - `policies` string[], nullable
    - `prompts` string[], nullable
    - `blocked` boolean, nullable
    - `aliases` object, nullable
    - `object_permission` LiteLLMObjectPermissionBase
      - `mcp_servers` string[], nullable
      - `mcp_access_groups` string[], nullable
      - `mcp_tool_permissions` object, nullable
      - `vector_stores` string[], nullable
      - `agents` string[], nullable
      - `agent_access_groups` string[], nullable
      - `models` string[], nullable
    - `password` string, nullable
    - `user_alias` string, nullable
    - `user_role` 'proxy_admin' | 'proxy_admin_viewer' | 'internal_user' | 'internal_user_viewer', nullable
    - `user_email` string, nullable
  - `all_users` boolean, nullable
  - `user_updates` UpdateUserRequestNoUserIDorEmail
    - `key_alias` string, nullable
    - `duration` string, nullable
    - `models` unknown[], nullable
      - unknown
    - `spend` number, nullable
    - `max_budget` number, nullable
    - `user_id` string, nullable
    - `team_id` string, nullable
    - `agent_id` string, nullable
    - `max_parallel_requests` integer, nullable
    - `metadata` object, nullable
    - `tpm_limit` integer, nullable
    - `rpm_limit` integer, nullable
    - `budget_duration` string, nullable
    - `allowed_cache_controls` unknown[], nullable
      - unknown
    - `config` object, nullable
    - `permissions` object, nullable
    - `model_max_budget` object, nullable
    - `model_rpm_limit` object, nullable
    - `model_tpm_limit` object, nullable
    - `guardrails` string[], nullable
    - `policies` string[], nullable
    - `prompts` string[], nullable
    - `blocked` boolean, nullable
    - `aliases` object, nullable
    - `object_permission` LiteLLMObjectPermissionBase
      - `mcp_servers` string[], nullable
      - `mcp_access_groups` string[], nullable
      - `mcp_tool_permissions` object, nullable
      - `vector_stores` string[], nullable
      - `agents` string[], nullable
      - `agent_access_groups` string[], nullable
      - `models` string[], nullable
    - `password` string, nullable
    - `user_alias` string, nullable
    - `user_role` 'proxy_admin' | 'proxy_admin_viewer' | 'internal_user' | 'internal_user_viewer', nullable

## Response `200`

Successful Response

- BulkUpdateUserResponse — Response for bulk user update operations
  - `results` UserUpdateResult[], required
    - `user_id` string, nullable
    - `user_email` string, nullable
    - `success` boolean, required
    - `error` string, nullable
    - `updated_user` object, nullable
  - `total_requested` integer, required
  - `successful_updates` integer, required
  - `failed_updates` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.net/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sea-lion/litellm-api/revisions/79928a3d37d3/schema)
