REST API reference
Manage pools, origins, health checks and routing strategies programmatically.
Last updated: September 2, 2026 · 8 min read
Authentication
Every request carries a bearer token scoped to one account. Tokens can be restricted to read-only access, or limited to a specific set of zones.
- Send the token in the Authorization header
- Scope tokens narrowly and rotate them regularly
- Configuration changes are attributed to the token that made them
curl https://api.anylb.com/v1/load-balancers \ -H "Authorization: Bearer $ANYLB_TOKEN"List load balancers
Returns every load balancer in the account, including pool composition, active strategy and current origin health.
{ "data": [ { "id": "lb_2f9c1a", "hostname": "api.example.com", "strategy": "latency", "status": "active", "pools": [ { "id": "pool_7d31", "name": "api-prod", "healthy_origins": 3, "total_origins": 3 } ] } ], "has_more": false}Update a pool
Pools are replaced atomically: send the complete desired origin list. Partial merges are rejected so configuration can never drift silently.
curl -X PUT https://api.anylb.com/v1/pools/pool_7d31 \ -H "Authorization: Bearer $ANYLB_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "api-prod", "strategy": "latency", "origins": [ { "address": "api-sin1.internal", "weight": 100 }, { "address": "api-fra1.internal", "weight": 100 }, { "address": "api-iad1.internal", "weight": 0 } ] }'Errors and rate limits
Failures return an RFC 9457 problem document with a machine-readable type. Authenticated requests are limited to 1,200 per minute per token; check the Retry-After header when you are throttled.
- 400 — malformed request body
- 401 — missing, expired or invalid token
- 404 — resource not found in this account
- 429 — rate limit exceeded
Related reading