Packages
Base packages for sale, defining quotas such as traffic, bandwidth and domains, and prices.
packagesPackagesAuthentication: Admin only7 endpointsList packages
GET
/api/v2/packagesAuthentication: Admin only
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | — | Page number, starting from 1 |
| page_size | integer | — | Items per page |
| sort | string | — | Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id` |
Create package
POST
/api/v2/packagesAuthentication: Admin only
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| backup_group_id | integer | — | Backup node group; null = none. |
| bandwidth_mbps | integer | — | Bandwidth in Mbps, -1 = unlimited. |
| buy_limit | integer | — | Maximum copies a tenant may hold, -1 = unlimited. |
| cname_domain_id | integer | — | CNAME root domain; null = the package binds no lines. |
| cname_host_suffix | string | — | Suffix for newly generated host records; empty = only the 8-character random name. |
| cname_mode | PackageCnameMode | — | CNAME mode. site = one access name per site or stream; package = sites and streams of a purchased package share one access name. |
| connections | integer | — | Concurrent connections, -1 = unlimited. |
| custom_cc_rule | boolean | — | Allows custom CC rules. |
| des | string | — | Description |
| domains | integer | — | Number of domains (each IP site counts as 1), -1 = unlimited. |
| enabled | boolean | — | Whether enabled |
| group_ids | integer[] | — | Package groups it belongs to. |
| http_ports | integer | — | Number of non-standard HTTP/HTTPS ports (other than 80/443), -1 = unlimited. |
| ip_num | integer | — | Number of selectable IPs ("My IPs"), -1 = unlimited. |
| ip_pool_id | integer | — | IP pool used to provision IP sites (IP product line); null = not provisioned. |
| ip_site_port | integer | — | IP-site ports: distinct ports across all IP sites of the package (80/443 included), -1 = unlimited; IP-site ports do not count toward non-standard ports. |
| l2 | boolean | — | Includes tiered origin (tenant switch of the paid feature l2): tenants can turn on tiered origin for sites, and nodes use it, only while the master license l2 is active; existing packages are false (on upgrade, purchased packages of tenants already using tiered origin are set to true). |
| name | string | Required | Name |
| node_group_id | integer | — | Primary node group; null = the package binds no lines. |
| origin_ip_limit | string[] | — | Allowed origin IPs or CIDR ranges; empty = any. When set, origins of sites under the package must fall inside them and domain origins are rejected. |
| owners | integer[] | — | Tenant ids allowed to buy; empty = no restriction. |
| price_month_cents | integer | Required | Monthly price in cents. |
| price_quarter_cents | integer | Required | Quarterly price in cents. |
| price_year_cents | integer | Required | Yearly price in cents. |
| region_id | integer | — | Region; null = the package binds no lines. |
| renew_before_days | integer | — | Renewal is only allowed within this many days before expiry, -1 = unlimited. |
| require_verified | boolean | — | Real-name verification is required to purchase. |
| sale_until | string | — | Not sold after this time; omitted/null = no limit. |
| sort | integer | — | Display order (smaller first). |
| stream_ports | integer | — | Number of TCP/UDP forwarding ports, -1 = unlimited. |
| traffic_gb | integer | — | Traffic in GB per billing cycle, -1 = unlimited. |
| waf_enhanced | boolean | — | Includes WAF Enhanced (tenant switch of the paid feature waf_enhanced): tenants can use standard/strict levels, big screen, deep Bot, anti-tamper and so on only while the master license WAF Enhanced is not degraded; existing packages are false. |
| websocket | boolean | — | Allows WebSocket. |
Batch enable or disable packages
POST
/api/v2/packages/batch-enableAuthentication: Admin only
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | Required | Whether enabled |
| ids | integer[] | Required | IDs of the objects to change, at most 100. |
Get package
GET
/api/v2/packages/{id}Authentication: Admin only
Update package
PUT
/api/v2/packages/{id}Authentication: Admin only
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| backup_group_id | integer | — | Backup node group; null = none. |
| bandwidth_mbps | integer | — | Bandwidth in Mbps, -1 = unlimited. |
| buy_limit | integer | — | Maximum copies a tenant may hold, -1 = unlimited. |
| cname_domain_id | integer | — | CNAME root domain; null = the package binds no lines. |
| cname_host_suffix | string | — | Suffix for newly generated host records; empty = only the 8-character random name. |
| cname_mode | PackageCnameMode | — | CNAME mode. site = one access name per site or stream; package = sites and streams of a purchased package share one access name. |
| connections | integer | — | Concurrent connections, -1 = unlimited. |
| custom_cc_rule | boolean | — | Allows custom CC rules. |
| des | string | — | Description |
| domains | integer | — | Number of domains (each IP site counts as 1), -1 = unlimited. |
| enabled | boolean | — | Whether enabled |
| group_ids | integer[] | — | Package groups it belongs to. |
| http_ports | integer | — | Number of non-standard HTTP/HTTPS ports (other than 80/443), -1 = unlimited. |
| ip_num | integer | — | Number of selectable IPs ("My IPs"), -1 = unlimited. |
| ip_pool_id | integer | — | IP pool used to provision IP sites (IP product line); null = not provisioned. |
| ip_site_port | integer | — | IP-site ports: distinct ports across all IP sites of the package (80/443 included), -1 = unlimited; IP-site ports do not count toward non-standard ports. |
| l2 | boolean | — | Includes tiered origin (tenant switch of the paid feature l2): tenants can turn on tiered origin for sites, and nodes use it, only while the master license l2 is active; existing packages are false (on upgrade, purchased packages of tenants already using tiered origin are set to true). |
| name | string | Required | Name |
| node_group_id | integer | — | Primary node group; null = the package binds no lines. |
| origin_ip_limit | string[] | — | Allowed origin IPs or CIDR ranges; empty = any. When set, origins of sites under the package must fall inside them and domain origins are rejected. |
| owners | integer[] | — | Tenant ids allowed to buy; empty = no restriction. |
| price_month_cents | integer | Required | Monthly price in cents. |
| price_quarter_cents | integer | Required | Quarterly price in cents. |
| price_year_cents | integer | Required | Yearly price in cents. |
| region_id | integer | — | Region; null = the package binds no lines. |
| renew_before_days | integer | — | Renewal is only allowed within this many days before expiry, -1 = unlimited. |
| require_verified | boolean | — | Real-name verification is required to purchase. |
| sale_until | string | — | Not sold after this time; omitted/null = no limit. |
| sort | integer | — | Display order (smaller first). |
| stream_ports | integer | — | Number of TCP/UDP forwarding ports, -1 = unlimited. |
| traffic_gb | integer | — | Traffic in GB per billing cycle, -1 = unlimited. |
| waf_enhanced | boolean | — | Includes WAF Enhanced (tenant switch of the paid feature waf_enhanced): tenants can use standard/strict levels, big screen, deep Bot, anti-tamper and so on only while the master license WAF Enhanced is not degraded; existing packages are false. |
| websocket | boolean | — | Allows WebSocket. |
Delete package
DELETE
/api/v2/packages/{id}Authentication: Admin only
Sync base package to purchased packages
POST
/api/v2/packages/{id}/syncsAuthentication: Admin only
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| items | PackageSyncField[] | Required | Fields to sync. |
Packages object
| Field | Type | Required | Description |
|---|---|---|---|
| backup_group_id | integer | — | Backup node group; null = none. |
| bandwidth_mbps | integer | — | Bandwidth in Mbps, -1 = unlimited. |
| buy_limit | integer | — | Maximum copies a tenant may hold, -1 = unlimited. |
| cname_domain_id | integer | — | CNAME root domain; null = the package binds no lines. |
| cname_host_suffix | string | — | Suffix for newly generated host records; empty = only the 8-character random name. |
| cname_mode | PackageCnameMode | — | CNAME mode. site = one access name per site or stream; package = sites and streams of a purchased package share one access name. |
| connections | integer | — | Concurrent connections, -1 = unlimited. |
| created_at | string | — | Created at |
| custom_cc_rule | boolean | — | Allows custom CC rules. |
| des | string | — | Description |
| domains | integer | — | Number of domains (each IP site counts as 1), -1 = unlimited. |
| enabled | boolean | — | Whether enabled |
| errors | FieldError[] | — | Why each remaining item was not changed; field is /ids/<index>, code as in the single-item update (not_found, readonly and so on). |
| group_ids | integer[] | — | Package groups it belongs to. |
| http_ports | integer | — | Number of non-standard HTTP/HTTPS ports (other than 80/443), -1 = unlimited. |
| id | integer | — | Record ID |
| ids | integer[] | Required | IDs of the objects to change, at most 100. |
| ip_num | integer | — | Number of selectable IPs ("My IPs"), -1 = unlimited. |
| ip_pool_id | integer | — | IP pool used to provision IP sites (IP product line); null = not provisioned. |
| ip_site_port | integer | — | IP-site ports: distinct ports across all IP sites of the package (80/443 included), -1 = unlimited; IP-site ports do not count toward non-standard ports. |
| items | PackageSyncField[] | Required | Fields to sync. |
| l2 | boolean | — | Includes tiered origin (tenant switch of the paid feature l2): tenants can turn on tiered origin for sites, and nodes use it, only while the master license l2 is active; existing packages are false (on upgrade, purchased packages of tenants already using tiered origin are set to true). |
| name | string | — | Name |
| node_group_id | integer | — | Primary node group; null = the package binds no lines. |
| origin_ip_limit | string[] | — | Allowed origin IPs or CIDR ranges; empty = any. When set, origins of sites under the package must fall inside them and domain origins are rejected. |
| owners | integer[] | — | Tenant ids allowed to buy; empty = no restriction. |
| price_month_cents | integer | — | Monthly price in cents. |
| price_quarter_cents | integer | — | Quarterly price in cents. |
| price_year_cents | integer | — | Yearly price in cents. |
| region_id | integer | — | Region; null = the package binds no lines. |
| renew_before_days | integer | — | Renewal is only allowed within this many days before expiry, -1 = unlimited. |
| require_verified | boolean | — | Real-name verification is required to purchase. |
| sale_until | string | — | Not sold after this time; omitted/null = no limit. |
| skipped | integer | — | Number skipped because they do not follow the base package or individually edited at least one changed field (other fields are still synced). |
| skipped_ids | integer[] | — | Ids of the skipped purchased packages. |
| sort | integer | — | Display order (smaller first). |
| stream_ports | integer | — | Number of TCP/UDP forwarding ports, -1 = unlimited. |
| sync | PackageSyncResult | — | Sync result. |
| synced | integer | — | Number of purchased packages synced (for automatic sync, those where every changed field was synced). |
| traffic_gb | integer | — | Traffic in GB per billing cycle, -1 = unlimited. |
| updated | integer[] | — | IDs that were set (including those already in the target state), in request order. |
| updated_at | string | — | Updated at |
| waf_enhanced | boolean | — | Includes WAF Enhanced (tenant switch of the paid feature waf_enhanced): tenants can use standard/strict levels, big screen, deep Bot, anti-tamper and so on only while the master license WAF Enhanced is not degraded; existing packages are false. |
| websocket | boolean | — | Allows WebSocket. |