Create an L4 Load Balancer

POST/v1/load_balancers/l4

Send a POST request to /v1/load_balancers/l4 to create a new Load Balancer. Fill in the required parameters to specify details.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

FieldDetails
name
string

Give a name to a balancer.

location_id
integer

Specify a location where you want to create a balancer. A request for location IDs is in the Location section.

cluster_id?
string

A unique identifier of a dedicated Load Balancer cluster. A Load Balancer will be created on a specified dedicated cluster. If this parameter is not mentioned, a balancer will be created in a shared cluster. A request to list cluster IDs.

store_logs?
boolean

Default: false

If you need the storing logs option, fill this parameter in with the true value.

store_logs_region_id?
integer

A cloud region ID of the cloud storage for logs. You can list all region IDs in the relevant request.

array<object>

A vhost zone is a forwarding rule to be applied to a balancer.

array<object>

It is a group of upstream servers with predefined parameters.

labels?
object

Specify labels you want to attach to the resource. Refer to the Labels section for more details.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/load_balancers/l4" \  -H "Content-Type: application/json" \  -d '{    "name": "name550",    "location_id": 537,    "cluster_id": null,    "store_logs": true,    "store_logs_region_id": 0,    "vhost_zones": [      {        "id": "name551",        "ports": [          58        ],        "udp": true,        "proxy_protocol": true,        "upstream_id": "name552"      }    ],    "upstream_zones": [      {        "id": "name552",        "udp": true,        "upstreams": [          {            "ip": "10.0.8.4",            "port": 59,            "weight": 1          }        ]      }    ],    "labels": {      "environment": "production",      "service": "my-web-app",      "example.com/project": "my-project",      "example.com/owner": "my-team"    }  }'
{  "id": "nXe0vbxr",  "name": "name555",  "type": "l4",  "status": "in_process",  "external_addresses": [],  "location_id": 539,  "proxy_protocol_enabled": true,  "store_logs": true,  "vhost_zones": [    {      "udp": true,      "proxy_protocol": true,      "id": "name556",      "ports": [        68      ],      "upstream_id": "name557"    }  ],  "upstream_zones": [    {      "method": "random.least_conn",      "hc_interval": 5,      "hc_jitter": 5,      "hc_fails": 1,      "hc_passes": 3,      "udp": true,      "id": "name557",      "upstreams": [        {          "ip": "10.0.8.4",          "port": 69,          "weight": 1,          "max_conns": 63000,          "max_fails": 0,          "fail_timeout": 30,          "status": "unknown"        }      ]    }  ],  "labels": {    "environment": "production",    "service": "my-web-app",    "example.com/project": "my-project",    "example.com/owner": "my-team"  },  "cluster_id": "N1aMj3bW",  "shared_cluster": false,  "created_at": "2026-05-28T06:58:54Z",  "updated_at": "2026-05-28T06:58:54Z"}