Skip to main content
POST
/
loadbalancer
Create a new Load Balancer profile
curl --request POST \
  --url https://api.bunny.net/loadbalancer \
  --header 'AccessKey: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "Name": "<string>"
}
'
{
  "LoadBalancerId": 123,
  "Name": "<string>",
  "OriginGroups": [
    {
      "Id": 123,
      "Name": "<string>",
      "Enabled": true,
      "Latitude": 123,
      "Longitude": 123,
      "Weight": 123,
      "Priority": 123,
      "Origins": [
        {
          "Id": 123,
          "Weight": 123,
          "Enabled": true,
          "EdgeScriptId": 123,
          "StorageZoneId": 123,
          "StandardOrigin": {
            "OriginUrl": "<string>",
            "HostHeader": "<string>",
            "VerifySsl": true
          },
          "MagicContainersOrigin": {
            "AppId": "<string>",
            "EndPointId": "<string>"
          }
        }
      ],
      "HealthCheckSettings": {
        "Enabled": true,
        "Path": "<string>"
      }
    }
  ]
}

Authorizations

AccessKey
string
header
required

API Access Key authorization header

Body

application/json

The model for the new Load Balancer profile

Name
string | null

The name of the Load Balancer profile

StickySessionType
enum<integer>

The sticky session type to use for persisting client to an origin

Available options:
0,
1
OriginGroupLoadBalancingMethod
enum<integer>

The load balancing method used for selecting origin groups

Available options:
0,
1,
2,
3

Response

The newly created Load Balancer profile

LoadBalancerId
integer<int64>

The unique ID of the Load Balancer

Name
string | null

The name of the Load Balancer profile

OriginGroupLoadBalancingMethod
enum<integer>

The load balancing method used for selecting origin groups

Available options:
0,
1,
2,
3
StickySessionType
enum<integer>

The sticky session type used for persisting client sessions

Available options:
0,
1
OriginGroups
object[] | null

The list of origin groups associated with the Load Balancer profile