latestOpenAPI 3.1.02026-08-197104501.1 MB

8fbaab4fc7c5

Customer Management

Update End User

Example curl

Parameters:

  • user_id: str
  • alias: Optional[str] = None # human-friendly alias
  • blocked: bool = False # allow/disallow requests for this end-user
  • max_budget: Optional[float] = None
  • budget_id: Optional[str] = None # give either a budget_id or max_budget
  • allowed_model_region: Optional[AllowedModelRegion] = ( None # require all user requests to use models in this specific region )
  • default_model: Optional[str] = ( None # if no equivalent model in allowed region - default all requests to this model )
  • object_permission: Optional[LiteLLM_ObjectPermissionBase] - Customer-specific object permissions to control access to resources. Supported fields:
    • mcp_servers: List[str] - List of allowed MCP server IDs
    • mcp_access_groups: List[str] - List of MCP access group names
    • mcp_tool_permissions: Dict[str, List[str]] - Map of server ID to allowed tool names
    • vector_stores: List[str] - List of allowed vector store IDs
    • agents: List[str] - List of allowed agent IDs
    • agent_access_groups: List[str] - List of agent access group names Example: {"mcp_servers": ["server_1"], "vector_stores": ["vector_store_1"]} IF null or {} then no object-level restrictions apply.

Example curl:

curl --location 'http://0.0.0.0:4000/customer/update'     --header 'Authorization: Bearer sk-1234'     --header 'Content-Type: application/json'     --data '{
    "user_id": "test-litellm-user-4",
    "budget_id": "paid_tier"
}'

# Updating object permissions
curl -L -X POST 'http://localhost:4000/customer/update'     --header 'Authorization: Bearer sk-1234'     --header 'Content-Type: application/json'     --data '{
    "user_id": "user_1",
    "object_permission": {
      "mcp_servers": ["server_3"],
      "vector_stores": ["vector_store_2", "vector_store_3"]
    }
  }'

See below for all params
post/customer/update

Request body

user_idstring required
aliasstring nullable
blockedboolean
max_budgetnumber nullable
budget_idstring nullable
allowed_model_region'eu' | 'us' nullable
default_modelstring nullable

Response

Successful Response

{"stackTrail":"paths:/customer/update:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}