Origins & Load Balancers

Origins define the upstream servers that serve a site. An origin may be a single server or may use a load balancer that spreads traffic across up to ten endpoints with health checks.

Origin endpoints

Method

Path

Description

GET

/origins

List origins

POST

/origins

Create an origin

GET

/origins/{id}

Retrieve an origin

PUT / PATCH

/origins/{id}

Partially update an origin

DELETE

/origins/{id}

Soft-delete an origin

Create an origin

curl -X POST https://api.skip2.net/v1/origins \
  -H "Authorization: Bearer $SKIP2_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "primary", "type": "Custom", "fqdn": "origin.example.com"}'

All three fields (name, type, fqdn) are required. type must be one of the origin types offered in the dashboard’s origin form (for example "Custom", "AWS S3", "Vercel", "Load Balancer") — see the dashboard’s origin type selector for the full list.

Update an origin (partial)

Toggle fields (boolean): https, mutual_tls.

Scalar fields: name, type, fqdn, geo, mutual_tls_id.

curl -X PATCH https://api.skip2.net/v1/origins/1000 \
  -H "Authorization: Bearer $SKIP2_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"https": true, "geo": "United States"}'

geo is a full country name (the same list used by geo blocking), not a cloud-provider region code.

Load balancer endpoints

Method

Path

Description

GET

/origins/{id}/loadbalancer

Retrieve the LB config

POST / PUT / PATCH

/origins/{id}/loadbalancer

Create or update the LB

The load balancer body is a flat object. Recognized keys include:

  • load_balancer_policy — e.g. round_robin, least_conn, ip_hash.

  • policy_key — header/cookie name for sticky policies.

  • endpoint_1endpoint_10 — upstream endpoints.

  • retries, retry_duration, retry_interval.

  • unhealthy_fail_count, unhealthy_fail_duration, unhealthy_status, unhealthy_latency, unhealthy_request_count.

  • active_healthchecks, passive_healthchecks (truthy to enable).

  • health_uri, health_port, health_interval, health_timeout, request_method, successful_status, successful_response_body.

  • failed_healthchecks_for_failover, successful_healthchecks_for_recovery, per_host_connection_limit, follow_redirects.

curl -X POST https://api.skip2.net/v1/origins/1000/loadbalancer \
  -H "Authorization: Bearer $SKIP2_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "load_balancer_policy": "round_robin",
        "endpoint_1": "10.0.0.1:443",
        "endpoint_2": "10.0.0.2:443",
        "active_healthchecks": true,
        "health_uri": "/healthz",
        "health_interval": "10s"
      }'

The response serializes the saved load balancer, including its endpoint list and health check configuration.