Skip to content

Create Load Balancer

POST
/gateway/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "example-lb",
"description": "Front end for the web tier",
"lb_type": "L7",
"sku_item_price_id": 2101,
"ha": false,
"committed_instance_policy": null,
"next_sku_item_price_id": null,
"algorithm": "ROUND_ROBIN",
"health_check": true,
"health_check_config": {
"protocol": "HTTP",
"interval_seconds": 10,
"timeout_seconds": 3,
"unhealthy_threshold": 3,
"healthy_threshold": 2,
"path": "/healthz",
"expected_statuses": [
0
],
"consecutive_5xx_errors": 5,
"consecutive_gateway_errors": 5,
"base_ejection_time_seconds": 30,
"outlier_interval_seconds": 10,
"max_ejection_percent": 50,
"split_external_local_origin_errors": false
},
"listener_port": 443,
"frontend_protocols": [
"HTTP"
],
"backend_protocol": "HTTP",
"http_redirect": false,
"ssl_cert_id": "12",
"connection_timeout": 10,
"client_timeout": 60,
"server_timeout": 60,
"http_keep_alive_timeout": 60,
"websocket_timeout": 3600,
"security_groups_ids": [
0
]
}'

Creates a Load Balancer and starts setting it up. The call returns at once with the Load Balancer in Initializing; poll Get Load Balancer until status is Running. A Load Balancer on a plan is billed from when it becomes Running. The Load Balancer needs the Create permission.

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
name
required

Name of the Load Balancer, up to 255 characters, unique in the project.

string

Example

example-lb
description

A description. Optional.

string
nullable

Example

Front end for the web tier
lb_type

L7 balances HTTP and HTTPS traffic, L4 balances TCP traffic. Default L7.

string
Allowed values: L4 L7

Example

L7
sku_item_price_id

ID of the plan the Load Balancer runs on. The plan sets its capacity (requests per second, connections) and its billing. It must be a Load Balancer plan of the same region that fits the type.

integer

Example

2101
ha

true to run on 2 instances, false for 1. Each instance is billed at the plan rate. Default false.

boolean

Example

false
committed_instance_policy

For a committed plan: what happens when the term ends. Required with a committed plan.

string
nullable

Example

null
next_sku_item_price_id

For a committed plan that continues or converts: the plan to move to. Required for those end-of-term choices. It must be the same plan in the same region, committed to continue or hourly to convert to hourly.

integer
nullable

Example

null
algorithm

How requests are spread over backends. Default ROUND_ROBIN. Other values are LEAST_REQUEST, LEAST_CONNECTION, RANDOM and SOURCE_IP_HASH.

string

Example

ROUND_ROBIN
health_check

Turn the health check on or off. Default true.

boolean

Example

true
health_check_config

Health check settings. Every key is optional; a key you leave out takes its default.

object
protocol

How the check probes a backend. Default TCP.

string
Allowed values: TCP HTTP GRPC

Example

HTTP
interval_seconds

Seconds between checks. Default 10.

integer

Example

10
timeout_seconds

Seconds to wait for an answer. Default 3.

integer

Example

3
unhealthy_threshold

Failed checks in a row before a backend is taken out. Default 3.

integer

Example

3
healthy_threshold

Passing checks in a row before a backend is put back. Default 2.

integer

Example

2
path

The path an HTTP check requests. Default /.

string

Example

/healthz
expected_statuses

Status codes that count as healthy for an HTTP check. Default [200].

Array<integer>
consecutive_5xx_errors

Server errors in a row before a backend is taken out. Default 5.

integer

Example

5
consecutive_gateway_errors

Errors 502, 503 or 504 in a row before a backend is taken out. Default 5.

integer

Example

5
base_ejection_time_seconds

Seconds a backend stays out after it is taken out. Default 30.

integer

Example

30
outlier_interval_seconds

Seconds between scans for backends to take out. Default 10.

integer

Example

10
max_ejection_percent

Most backends, in percent, that can be out at once. Default 50.

integer

Example

50
split_external_local_origin_errors

Count connection errors apart from errors the backend returned. Default false.

boolean

Example

false
listener_port

The port the Load Balancer listens on, 1 to 65535. Required for an L4 Load Balancer.

integer
nullable

Example

443
frontend_protocols

Protocols to accept. Empty or left out means both. Applies to L7.

Array<string>
Allowed values: HTTP HTTPS
backend_protocol

How the Load Balancer talks to backends, up to 16 characters. GRPC makes routing rules without a backend group gRPC.

string
nullable

Example

HTTP
http_redirect

Redirect HTTP requests to HTTPS. Needs HTTP and HTTPS both on. Default false.

boolean

Example

false
ssl_cert_id

ID of a certificate of the project to serve, as text or a number. It must not have expired.

string
nullable

Example

12
connection_timeout

Seconds to wait when connecting to a backend. Whole number of seconds, 0 or more.

integer
nullable

Example

10
client_timeout

Seconds a client connection may stay idle. Whole number of seconds, 0 or more.

integer
nullable

Example

60
server_timeout

Seconds a backend connection may stay idle. Whole number of seconds, 0 or more.

integer
nullable

Example

60
http_keep_alive_timeout

Seconds an idle HTTP connection is kept open. Whole number of seconds, 0 or more.

integer
nullable

Example

60
websocket_timeout

Seconds a WebSocket connection may stay open. Whole number of seconds, 0 or more.

integer
nullable

Example

3600
security_groups_ids

IDs of security groups to attach once the Load Balancer exists. An ID that is not valid is skipped.

Array<integer>

The Load Balancer was created and setup has started

Media typeapplication/json
object
code
integer
message
string
data
object
id
integer
name
string
description
string
nullable
environment
string
nullable
connection_limit
integer
nullable
rate_limit
integer
nullable
rate_limit_unit
string
nullable
max_concurrent_requests
integer
nullable
bandwidth_mbps
integer
nullable
lb_type
string
Allowed values: L4 L7
scheme
string
algorithm
string
vpc_id
integer
nullable
node_count
integer
sku_id
string
nullable
health_check
boolean
health_check_config

Health check settings. Every key is optional; a key you leave out takes its default.

object
protocol

How the check probes a backend. Default TCP.

string
Allowed values: TCP HTTP GRPC
interval_seconds

Seconds between checks. Default 10.

integer
timeout_seconds

Seconds to wait for an answer. Default 3.

integer
unhealthy_threshold

Failed checks in a row before a backend is taken out. Default 3.

integer
healthy_threshold

Passing checks in a row before a backend is put back. Default 2.

integer
path

The path an HTTP check requests. Default /.

string
expected_statuses

Status codes that count as healthy for an HTTP check. Default [200].

Array<integer>
consecutive_5xx_errors

Server errors in a row before a backend is taken out. Default 5.

integer
consecutive_gateway_errors

Errors 502, 503 or 504 in a row before a backend is taken out. Default 5.

integer
base_ejection_time_seconds

Seconds a backend stays out after it is taken out. Default 30.

integer
outlier_interval_seconds

Seconds between scans for backends to take out. Default 10.

integer
max_ejection_percent

Most backends, in percent, that can be out at once. Default 50.

integer
split_external_local_origin_errors

Count connection errors apart from errors the backend returned. Default false.

boolean
listener_port
integer
nullable
frontend_protocols
Array<string>
backend_protocol
string
nullable
http_redirect
boolean
ssl_cert_id

ID of the certificate bound to the Load Balancer, as text.

string
nullable
ipv6
boolean
security_group_id
string
nullable
connection_timeout

Seconds to wait when connecting to a backend.

integer
nullable
client_timeout

Seconds a client connection may stay idle.

integer
nullable
server_timeout

Seconds a backend connection may stay idle.

integer
nullable
http_keep_alive_timeout

Seconds an idle HTTP connection is kept open.

integer
nullable
websocket_timeout

Seconds a WebSocket connection may stay open.

integer
nullable
created_by

The user who created the Load Balancer.

object
id
integer
name
string
email
string
username
string
created_at
string
updated_at
string
errors
object

Example

{
"code": 201,
"message": "Created Successfully",
"data": {
"id": 12,
"name": "example-lb",
"description": "Front end for the web tier",
"environment": null,
"connection_limit": 10000,
"rate_limit": 1000,
"rate_limit_unit": "Second",
"max_concurrent_requests": null,
"bandwidth_mbps": null,
"lb_type": "L4",
"scheme": "internet-facing",
"algorithm": "ROUND_ROBIN",
"vpc_id": null,
"node_count": 1,
"sku_id": null,
"health_check": true,
"health_check_config": {
"protocol": "TCP",
"interval_seconds": 10,
"timeout_seconds": 3,
"unhealthy_threshold": 3,
"healthy_threshold": 2,
"path": "/healthz",
"consecutive_5xx_errors": 5,
"consecutive_gateway_errors": 5,
"base_ejection_time_seconds": 30,
"outlier_interval_seconds": 10,
"max_ejection_percent": 50,
"split_external_local_origin_errors": false
},
"listener_port": 443,
"backend_protocol": "HTTP",
"http_redirect": false,
"ssl_cert_id": null,
"ipv6": false,
"security_group_id": null,
"connection_timeout": 10,
"client_timeout": 60,
"server_timeout": 60,
"http_keep_alive_timeout": 60,
"websocket_timeout": 3600,
"created_by": {
"id": 1,
"name": "A User",
"email": "user@example.com",
"username": "auser"
},
"created_at": "2026-10-21T11:17:29Z",
"updated_at": "2026-10-21T11:17:29Z"
},
"errors": {}
}

A field is missing or not valid (errors is keyed by field), the name is already used by a Load Balancer of the project (deleted ones count), the certificate is not found or has expired, a committed plan has no end-of-term choice, the account does not have enough credit, or setup could not start (“Failed to create load balancer. Please try again later.”). A missing or invalid project ID also gives 400 with errors “Project ID is missing or invalid”.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 400,
"message": "Bad Request",
"data": {},
"errors": "Failed to create load balancer. Please try again later."
}