---
title: "Update a Load Balancer profile"
method: POST
path: "/loadbalancer/{loadBalancerId}"
tags: ["Load Balancer"]
---

# Update a Load Balancer profile

`POST /loadbalancer/{loadBalancerId}`

## Request

- Base URL: `https://api.bunny.net`
- URL: `https://api.bunny.net/loadbalancer/{loadBalancerId}`
- Auth: one of:
  - API key in header `AccessKey`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/bunny/apis/bunny-net-api/docs/loadbalancer/:loadBalancerId/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `loadBalancerId` integer, required

## Request body

- LoadBalancerSettingsModel
  - `Name` string, nullable: The name of the Load Balancer profile
  - `StickySessionType` 0 | 1: 0 = Off 1 = Cookie
  - `OriginGroupLoadBalancingMethod` 0 | 1 | 2 | 3: 0 = Weighted Random 1 = Round Robin 2 = Geolocation 3 = Lowest Average Latency

## Response `200`

The updated Load Balancer profile

- LoadBalancerProfileModel
  - `LoadBalancerId` integer: The unique ID of the Load Balancer
  - `Name` string, nullable: The name of the Load Balancer profile
  - `OriginGroupLoadBalancingMethod` 0 | 1 | 2 | 3: 0 = Weighted Random 1 = Round Robin 2 = Geolocation 3 = Lowest Average Latency
  - `StickySessionType` 0 | 1: 0 = Off 1 = Cookie
  - `OriginGroups` LoadBalancerOriginGroupModel[], nullable: The list of origin groups associated with the Load Balancer profile
    - `Id` integer: The unique ID of the origin group
    - `Name` string, nullable: The name of the origin group
    - `Enabled` boolean: Set to true if the origin group is enabled
    - `Latitude` number, double: The latitude of the origin group location
    - `Longitude` number, double: The longitude of the origin group location
    - `Weight` integer: The weight of the origin group used for weighted load balancing
    - `Priority` integer: The priority of the origin group used for failover load balancing
    - `OriginLoadBalancingMethod` 0 | 1 | 2 | 3: 0 = Round Robin 1 = Weighted Random 2 = Least Connections 3 = Latency
    - `Origins` LoadBalancerOriginModel[], nullable: The list of origins associated with the origin group
      - `Id` integer: The unique ID of the origin
      - `Name` string, nullable: The name of the origin
      - `Weight` integer: The weight of the origin used for weighted load balancing
      - `Enabled` boolean: Whether traffic should route to this origin
      - `HealthStatus` 0 | 1: 0 = Healthy 1 = Degraded
      - `OriginType` 0 | 1 | 2 | 3: 0 = Standard 1 = Storage Zone 2 = Edge Script 3 = Magic Container
      - `EdgeScriptId` integer, nullable: The ID of the Edge Script when using this origin type
      - `StorageZoneId` integer, nullable: The ID of the Storage Zone when using this origin type
      - `StandardOrigin` StandardOriginModel
        - `OriginUrl` string, nullable: The URL of the origin server
        - `HostHeader` string, nullable: The host header to send to the origin server
        - `VerifySsl` boolean, nullable: Whether to verify the SSL certificate of the origin server
      - `MagicContainersOrigin` MagicContainersOriginModel
        - `AppId` string, nullable: The ID of the Magic Containers app
        - `EndPointId` string, nullable: The ID of the Magic Containers CDN endpoint. Anycast endpoints are not supported, add those as a Standard origin using their IP address and port
    - `HealthCheckSettings` HealthCheckSettings
      - `Enabled` boolean, nullable: Whether health checking is enabled for this origin group
      - `Path` string, nullable: The path used for health check requests

## Other responses

- `400`: The request was invalid
- `401`: The request authorization failed
- `404`: The Load Balancer profile was not found
- `500`: Internal Server Error

## Changes

- **2026-11-12** `2b06f94dbfbf`: 2 info
  - the security scope `ScopedApiKey` was added to the endpoint's security scheme `AccessKey`
  - the security scope `ScopedApiKey` was added to the endpoint's security scheme `bearer`
- **2026-10-27** `2096a6606d8d`: 1 info
  - added the optional property `OriginGroups/items/Origins/items/Name` to the response with the `200` status
- **2026-08-07** `205129a7ebd5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bunny/apis/bunny-net-api/changes/loadbalancer/:loadBalancerId/post.md)

---

[API](https://skmtc.dev/bunny/apis/bunny-net-api.md) - [All operations](https://skmtc.dev/bunny/apis/bunny-net-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/bunny-net-api/revisions/2b06f94dbfbf?raw)
