Rescale a load balancer
Change a load balancer's type. Traffic stops for a short time during the change. The load balancer must be running. The load balancer's services, certificates and targets must fit in the new type. The response shows the new type before the change is done.
The ID of the load balancer to rescale.
Bearer $TOKEN
application/json
The new type, such as LB2. Get the types via betterstack load-balancer-type list.
{
"id": "example",
"name": "Example load balancer",
"type": "LB1",
"algorithm": "round_robin",
"status": "provisioning",
"status_message": "example",
"public_ips": [
{
"ip": "example",
"type": "example"
}
],
"private_ips": [
{
"network_id": "123456789",
"ip_address": "example"
}
],
"network_ids": [
"123456789"
],
"firewall_ids": [
"123456789"
],
"services": [
{
"id": 1,
"protocol": "tcp",
"listen_port": 443,
"destination_port": 443,
"redirect_http": false,
"http_timeout_seconds": 180,
"sticky_sessions": false,
"sticky_cookie_name": "Example",
"sticky_cookie_lifetime_seconds": 1,
"proxy_protocol": "disabled",
"certificate_ids": [
"123456789"
],
"target_health": [
{
"service_id": 123456789,
"server_id": "123456789",
"state": "up",
"state_changed_at": "2026-07-01T12:00:00.000Z",
"status_message": "example"
}
],
"health_check": {
"protocol": "tcp",
"port": 443,
"interval_seconds": 180,
"timeout_seconds": 180,
"retries": 1,
"domain": "example",
"path": "example",
"response": "example",
"status_codes": "example",
"tls": false
},
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:00:00.000Z"
}
],
"targets": [
{
"id": 1,
"type": "server",
"server_id": "123456789",
"selector": {
"example": "value"
},
"use_private_ip": false,
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:00:00.000Z"
}
],
"config_applied_at": "2026-07-01T12:00:00.000Z",
"term": "monthly",
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:00:00.000Z",
"team_id": "t123",
"metadata": {
"example": "value"
}
}
{
"error": {
"message": "Malformed JSON body.",
"code": "bad_request"
}
}
{
"error": {
"message": "Missing or invalid token.",
"code": "unauthorized"
}
}
{
"error": {
"message": "We require at least one successful credit card transaction before allowing billable actions via the API. This significantly helps us to prevent fraud. Once your first transaction is processed, you will be able to use the API unrestricted. Please add credit to your account at https://betterstack.com/settings/billing/card/new?credits=10&activate_api=true. Need help? We're here for you at hello@betterstack.com.",
"code": "payment_required"
}
}
{
"error": {
"message": "This token is read-only and cannot be used for write operations.",
"code": "read_only_token"
}
}
{
"error": {
"message": "Resource not found.",
"code": "not_found"
}
}
{
"error": {
"message": "The request could not be completed right now. Please try again in a few moments.",
"code": "internal_error"
}
}
Returns the load balancer.
The body isn't valid JSON.
The API token is missing or invalid.
The organization hasn't made its first payment yet, and the request creates a resource we charge for. The code is payment_required. A request that creates a server, load balancer, object cache, database, reserved IP or volume can also return first_purchase. The url in first_purchase opens a page where you make the payment. The resource is created after the payment. The page works until expires_at, 24 hours after the response.
The request would go over a quota, with the code quota_exceeded. Or a read-only token tried to make a change, with the code read_only_token. Or a rule of the resource forbids it.
The resource doesn't exist, it's in another zone, or your token can't access it.
The load balancer isn't running, or another change is in progress.
The zone has no room for the new type right now.
A Kubernetes Service created the load balancer.
A value isn't valid, with the code validation_failed. The error's details list the messages for each field. A create or rescale that names a deprecated type with a replacement returns the code type_deprecated. The error's details then name the field, the deprecated type and its replacement.
We've locked the resource, with the code locked. Every change to a locked resource is refused, and so is a change that involves one.
Too many requests, with the code rate_limited. We limit requests per client IP and per organization, and some costly endpoints have a stricter limit. Wait as long as the Retry-After header says.
An unexpected, temporary error on our side, with the code internal_error. Try again.
The zone has no capacity, with the code no_capacity. Or we couldn't set up or change the resource, with the code orchestration_failed. Or the organization is creating too many resources at the same time, with the code concurrent_create_limit. Try again after a short wait.
The load balancer's ID, a UUID.
The load balancer's name.
The load balancer's type, such as LB1.
How the load balancer picks a target for each connection.
Valid values:round_robin: Sends each new connection to the next target in turn.least_connections: Sends each new connection to the target with the fewest open connections.source_ip: Sends all connections from one client IP to the same target.
The load balancer's state.
Valid values:provisioning: We're starting the load balancer.running: The load balancer is ready. status_message reports any problem. config_applied_at says when we last applied your configuration.rescaling: We're changing the load balancer's type. The load balancer returns to running even when the change didn't finish. The load balancer's events say how the change went.failed: We couldn't create the load balancer. status_message says why.destroyed: The load balancer is deleted.
What went wrong while we created or configured the load balancer, or what's wrong with it now. Is null when there's nothing to report.
The load balancer's public IP addresses, one IPv4 and one IPv6.
The ip.
The type.
The load balancer's private IP in each attached network.
The network id.
The ip address.
The IDs of the networks attached to the load balancer. Order doesn't matter.
The IDs of the firewalls attached to the load balancer, at most one. Order doesn't matter.
The services that listen for traffic, with their settings and the latest health of each target. Add, update or remove them with betterstack load-balancer-service.
The id.
Possible values: tcp, http, https, udp.
The listen port.
The destination port.
The redirect http.
The http timeout seconds.
The sticky sessions.
The sticky cookie name.
The sticky cookie lifetime seconds.
Possible values: disabled, v1, v2.
The certificate ids.
The target health.
The service id.
The server id.
Possible values: up, down, unknown.
In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The status message.
The health check.
Possible values: tcp, http.
The port.
The interval seconds.
The timeout seconds.
The retries.
The domain.
The path.
The response.
The status codes.
The tls.
In ISO 8601 format, such as 2026-07-01T12:00:00Z.
In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The targets you added. A label_selector target shows as one entry, not one per matching server.
The id.
Possible values: server, label_selector.
The server id.
The selector.
The use private ip.
In ISO 8601 format, such as 2026-07-01T12:00:00Z.
In ISO 8601 format, such as 2026-07-01T12:00:00Z.
When we last applied the configuration to the load balancer, or null until we first apply it. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The billing term.
Valid values:monthly: Billed every month.annual: Paid for a year.
When the load balancer was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
When the load balancer was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The ID of the team that owns the load balancer.
Your own tags as string pairs.