---
title: "Update an origin group in a Load Balancer profile"
method: POST
path: "/loadbalancer/{loadBalancerId}/origingroup/{id}"
tags: ["Load Balancer"]
---

# Update an origin group in a Load Balancer profile

`POST /loadbalancer/{loadBalancerId}/origingroup/{id}`

## Request

- Base URL: `https://api.bunny.net`
- URL: `https://api.bunny.net/loadbalancer/{loadBalancerId}/origingroup/{id}`
- 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/origingroup/:id/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `loadBalancerId` integer, required
- `id` integer, required

## Request body

- OriginGroupCreateModel
  - `Name` string, nullable: The name of the origin group
  - `Enabled` boolean, nullable: Set to true if the origin group is enabled
  - `HealthCheckSettings` HealthCheckSettings
    - `Enabled` boolean, nullable: Whether health checking is enabled for this origin group
    - `Path` string, nullable: The path used for health check requests
  - `OriginLoadBalancingMethod` 0 | 1 | 2 | 3: 0 = Round Robin 1 = Weighted Random 2 = Least Connections 3 = Latency
  - `Latitude` number, double, nullable: The latitude of the origin group location
  - `Longitude` number, double, nullable: The longitude of the origin group location
  - `Weight` integer, nullable: The weight of the origin group used for weighted load balancing
  - `Priority` integer, nullable: The priority of the origin group used for failover load balancing

## Response `200`

The updated origin group

- LoadBalancerOriginGroupModel
  - `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 or origin group 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 `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/origingroup/:id/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)
