SecurityUpdate Securetoken

Update Securetoken

Update Securetoken of VoD push zone

curl -X POST "https://api.5centscdn.com/v2/zones/vod/push/42/securetoken" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "enabled": "Y",
  "policy": "Q",
  "keyip": "N",
  "list": "ab12cd34ef56gh78",
  "timeout": 3600,
  "session": "0",
  "ips": "1.2.3.4,5.6.7.8",
  "mode": "S"
}'
{
  "result": "success",
  "message": "Zone updated successfully",
  "zone": {
    "type": "push",
    "id": 12345,
    "serviceid": 67890,
    "mode": "http",
    "cnames": "",
    "edgeruleids": 0,
    "deleted": null,
    "name": "my-cdn-zone",
    "hashid": "abc123def456",
    "fqdn": "cdn.example.com",
    "fqdnVoD": "vod.example.com",
    "edgerules": {
      "enabled": "N"
    },
    "domainlock": {
      "policy": "N",
      "list": "example.com,cdn.example.com",
      "ips": "203.0.113.10",
      "noreferer": "N",
      "type": "push",
      "enabled": "N",
      "active": "N"
    },
    "geoblock": {
      "policy": "N",
      "list": [
        "US",
        "GB"
      ],
      "ips": "203.0.113.10",
      "enabled": "N",
      "active": "N"
    },
    "securetoken": {
      "policy": "F",
      "keyip": "N",
      "list": "ab12cd34ef56gh78",
      "timeout": 3600,
      "session": "0",
      "ips": "",
      "dirs": "",
      "enabled": "N",
      "active": "N"
    },
    "eac": {
      "policy": "N",
      "list": "http://example.com/auth.script",
      "ips": "203.0.113.10",
      "enabled": "N",
      "active": "N"
    },
    "ssl": {
      "http": "N",
      "http2": "Y",
      "redirect": "Y",
      "mode": "S",
      "certid": null,
      "zerossl": null,
      "enabled": "Y",
      "warning": false
    },
    "cache": {
      "smart": "0",
      "cache": "4h",
      "expiry": "1M",
      "querystring": "N",
      "cachecontrol": "Y",
      "usestale": "Y",
      "revalidate": "Y",
      "cacheInSecs": 14400,
      "cacheInMins": 240,
      "expiryInSecs": 2592000,
      "expiryInMins": 43200
    },
    "edge": {
      "compression": "N",
      "compressionlevel": 5,
      "disposition": "N",
      "stripcookie": "N",
      "xff": "N",
      "cors": "Y",
      "webp": "N",
      "pseudostreaming": "N",
      "wp": "N",
      "lfo": "Y",
      "prefresh": "N"
    },
    "transcodefile": {
      "profiles": [
        "1",
        "2"
      ],
      "emails": [
        "admin@example.com"
      ],
      "webhooks": [
        "https://hooks.example.com/webhook"
      ]
    },
    "ftpdetails": {
      "username": "user_67890_push_12345",
      "password": "••••••••"
    },
    "server": {
      "code": "206",
      "name": "Singapore",
      "country": "SouthEast Asia",
      "meta": {
        "uploadPort": "21",
        "uploadHost": "upload.example.com"
      }
    },
    "ssl_enabled": "Y"
  }
}
POST
/zones/vod/push/{zoneid}/securetoken
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
enabledstring

Enable or disable secure token. Y means enabled, N means disabled.

Options: Y, N
policystring

Defines how the token is computed. Q = Query string mode (token applied per query string parameter). F = Full path mode (token covers the full URL path). D = Directory/path-embedded mode (token is embedded within the URL path).

Options: Q, F, D
keyipstring

Bind token validation to the originating client IP address. Y = token is only valid from the IP that generated it, preventing sharing or theft. N = IP binding is disabled.

Options: Y, N
liststring
Required

16-character hexadecimal secret key used for token generation.

Pattern: ^[a-fA-F0-9]{16}$
timeoutnumber

Token expiry time in seconds. Minimum 5, maximum 25200.

Min: 5 • Max: 25200
sessionstring

Defines the token expiry behavior. "0" = Fixed expiry (token expires at a set time). "1" = Rolling/Moving expiry (token timeout resets with each request for active sessions).

Options: 0, 1
ipsstring

Comma-separated IPs excluded from token check.

modestring

S=shared (zone-level)

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

zoneidinteger
Required

Zone ID

Example:
42

Body

application/json
enabledstring

Enable or disable secure token. Y means enabled, N means disabled.

Allowed values:YN
policystring

Defines how the token is computed. Q = Query string mode (token applied per query string parameter). F = Full path mode (token covers the full URL path). D = Directory/path-embedded mode (token is embedded within the URL path).

Allowed values:QFD
keyipstring

Bind token validation to the originating client IP address. Y = token is only valid from the IP that generated it, preventing sharing or theft. N = IP binding is disabled.

Allowed values:YN
liststring
Required

16-character hexadecimal secret key used for token generation.

Example:
ab12cd34ef56gh78
timeoutnumber

Token expiry time in seconds. Minimum 5, maximum 25200.

Example:
3600
sessionstring

Defines the token expiry behavior. "0" = Fixed expiry (token expires at a set time). "1" = Rolling/Moving expiry (token timeout resets with each request for active sessions).

Allowed values:01
ipsstring

Comma-separated IPs excluded from token check.

Example:
1.2.3.4,5.6.7.8
modestring

S=shared (zone-level)

Example:
S

Responses

resultstring

Status of the API response.

messagestring

Human-readable status message describing the outcome.

zoneobject