Sites

Sites represent the domains served through the Skip2 CDN. A site bundles caching, compression, image optimization, TLS, security and DNS settings.

Endpoints

Method

Path

Description

GET

/sites

List all sites

POST

/sites

Create a site

GET

/sites/{id}

Retrieve a site

PUT / PATCH

/sites/{id}

Partially update a site

DELETE

/sites/{id}

Soft-delete a site

List sites

curl https://api.skip2.net/v1/sites \
  -H "Authorization: Bearer $SKIP2_API_KEY"

Create a site

curl -X POST https://api.skip2.net/v1/sites \
  -H "Authorization: Bearer $SKIP2_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com"}'

Returns 201 Created with the serialized site.

Retrieve a site

{
  "success": true,
  "data": {
    "id": 1000,
    "name": "example.com",
    "fqdn": "example.com",
    "enabled": true,
    "https": true,
    "cache": {"default_ttl": "3600", "bypass_mode": false},
    "compression": {"zstd": true, "brotli": true, "gzip": false},
    "minify": {"html": false, "css": false, "js": false, "svg": false},
    "image_proxy": {"enabled": false, "url": null,
                    "jpeg": false, "png": false, "gif": false, "bmp": false},
    "security": {"geo_blocking": false, "bot_protection": true, "waf": true,
                 "ddos_protection": true,
                 "global_javascript_challenge": false, "global_owasp_waf": false},
    "dns": {"enabled": false, "nameservers_verified": null}
  }
}

Update a site (partial)

Send only the fields you wish to change. Toggle fields take a boolean; scalar fields take a value. Unknown fields are reported in meta.errors but do not block the rest of the update.

curl -X PATCH https://api.skip2.net/v1/sites/1000 \
  -H "Authorization: Bearer $SKIP2_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"https": true, "default_cache_ttl": "7200", "gzip_compression": true}'
{
  "success": true,
  "data": { "id": 1000, "https": true, "...": "..." },
  "meta": {"updated_fields": ["https", "default_cache_ttl", "gzip_compression"]}
}

Updatable fields

Toggle fields (boolean): https, cache_bypass, image_proxy, jpeg, png, gif, bmp, zstd_compression, brotli_compression, gzip_compression, minify_html, minify_css, minify_js, minify_svg, geo_blocking, ddos_protection, bot_protection, waf, global_javascript_challenge, global_owasp_waf, dns.

Scalar fields: domain, default_cache_ttl, origin_hostname_override, image_proxy_url, tls_provider, origin_tls_settings, origin_zone_id.

The origin_zone_id field links a site to an origin (see Origins & Load Balancers).

Delete a site

curl -X DELETE https://api.skip2.net/v1/sites/1000 \
  -H "Authorization: Bearer $SKIP2_API_KEY"
{"success": true, "data": {"id": 1000, "deleted": true}}