API Reference
Manage your NOC CDN, WAF, and DNS programmatically via a simple REST API.
All API calls use https://my.noc.org/api with your API key. Access your key in the NOC Dashboard → Account → API.
Authentication
All API requests require your API key, passed as a query parameter on every call:
https://my.noc.org/api?apikey=YOUR_API_KEY&action=ACTION&...
Your API key is available in the NOC dashboard under Account → API. Keep it private: anyone with your key can manage your account.
Request Format
All API calls follow the same pattern:
https://my.noc.org/api?apikey=YOUR_API_KEY&action=ACTION_NAME¶m1=value1¶m2=value2
Parameters are passed as URL query strings. For endpoints that accept file uploads (e.g., SSL certificates), use curl -F for multipart form data.
Response Format
All responses are JSON. Successful calls return:
{"status": "success", ...}
Failed calls return:
{"status": "failed", "reason": "Description of what went wrong"}
CDN / WAF API
cdn/activate
Activates the WAF/CDN for a website when the domain DNS is hosted at NOC. Automatically switches DNS A records and activates the WAF/CDN.
| Parameter | Required | Description |
|---|---|---|
domain | Yes | Valid domain name |
subdomain | Yes | Subdomain or @ for apex domain |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/activate&domain=example.com&subdomain=@"
cdn/add
Adds a website to the WAF/CDN. Use for domains with DNS not hosted at NOC. You will need to create a CNAME, A, or ALIAS record pointing to the NOC CDN address.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
hosting_ip | Yes | Origin/hosting IP address for the CDN to proxy |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/add&website=example.com&hosting_ip=203.0.113.10"
cdn/deactivate
Disables the WAF/CDN for a website with DNS hosted at NOC.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/deactivate&website=example.com"
cdn/delete
Deletes the WAF/CDN for a website (DNS not at NOC). Warning: Switch DNS back to your origin IP first to prevent downtime.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/delete&website=example.com"
cdn/list
List all websites with WAF/CDN activated in your account.
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/list"
Response:
{"status":"success","domains":["example.com","example.org"]}
cdn/get
Get the CDN & WAF configuration for a website.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/get&website=example.com"
Response:
{"status":"success","config":{
"ip":["203.0.113.10"],
"proxyto":"80",
"https_redirect":true,
"upgrade_insecure":true,
"caching_time_static":"30d",
"caching_time_pages":"720m",
"gzip":true,
"http2":true,
"optmize_images":false,
"secure_cookie_flags":false,
"floc_out":false,
"waf":true,
"waf_virtual_hardening":true,
"waf_admin_lockdown":false
}}
cdn/stats
Get CDN & WAF traffic statistics for a specific day, broken down by hour.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
date | Yes | Date in yyyy-mm-dd format |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/stats&website=example.com&date=2026-03-05"
Response:
{"requests":{"2026-03-05 00:00":{"received":128,"blocked":12,"bytes":873477,"bytes_cached":655017}, ...}}
cdn/logs
Download CDN & WAF logs for a specific day.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
date | Yes | Date in yyyy-mm-dd format |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/logs&website=example.com&date=2026-03-05"
Response: Plain-text log lines with timestamp, domain, edge node, IP, status, bytes, cache status, WAF action, method, path, and user agent.
cdn/logs/last
Get the most recent CDN & WAF logs (reverse chronological order).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
limit | No | Number of log entries (default: 200) |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/logs/last&website=example.com&limit=10"
cdn/logs/query
Get CDN & WAF logs since a specified timestamp.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
since | Yes | Timestamp: yyyy-mm-dd HH:MM:SS |
limit | No | Number of log entries (default: 200) |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/logs/query&website=example.com&limit=10&since=2026-03-05%2013:00:00"
cdn/uploadssl
Upload an SSL certificate and private key to prevent downtime during migration (before NOC's auto-issued certificates are ready). The certificate should be the full chain.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
public_key | Yes | Full-chain SSL certificate file |
private_key | Yes | Private key file |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/uploadssl&website=example.com" \
-F 'public_key=@./fullchain.pem' \
-F 'private_key=@./privkey.pem'
cdn/alias_domain/add
Add an alias domain to the WAF/CDN. The alias will 301 redirect to the main domain (or serve directly with alias_type=direct).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Primary domain |
alias_domain | Yes | Alias domain to add |
alias_type | No | 301 (default, recommended) or direct |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/alias_domain/add&website=example.com&alias_domain=example.net"
cdn/cache/purge
Purge the entire CDN cache for a website.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/cache/purge&website=example.com"
CDN Settings
cdn/set/protectedurls
Set URLs that require additional access protection (e.g., admin panels, internal APIs).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated URL paths (e.g., /admin /api) |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/protectedurls&website=example.com&value=/admin%20/wp-admin"
cdn/set/botprotectedurls
Set URLs with bot verification enabled. Bots will be challenged before accessing these paths.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated URL paths |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/botprotectedurls&website=example.com&value=/api/v1%20/login"
cdn/set/readonlyurls
Set URLs as read-only (POST and write methods will be blocked).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated URL paths |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/readonlyurls&website=example.com&value=/public-data"
cdn/set/whitelistedurls
Set URLs that bypass WAF inspection (whitelisted).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated URL paths |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/whitelistedurls&website=example.com&value=/webhook-endpoint"
cdn/set/whitelistedips
Set IP addresses that are always allowed. Partial regexes supported (e.g., ^1.1. to allow 1.1.0.0/16).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated IPs or patterns |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/whitelistedips&website=example.com&value=203.0.113.10%20^10.0."
cdn/set/blacklistedips
Set IP addresses that are always blocked. Partial regexes supported (e.g., ^1.1. to block 1.1.0.0/16).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated IPs or patterns |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/blacklistedips&website=example.com&value=198.51.100.0%20^192.168."
cdn/set/websocketsurls
Set URLs that support WebSocket connections through the CDN.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated URL paths |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/websocketsurls&website=example.com&value=/ws%20/socket.io"
cdn/set/noncacheurls
Set URLs that should never be cached by the CDN.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated URL paths |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/noncacheurls&website=example.com&value=/api%20/checkout"
cdn/set/hosting_read_timeout
Set the timeout when reading responses from the hosting/origin server (default: 45s).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | 10s, 30s, 45s, 60s, 120s, 180s, or 300s |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/hosting_read_timeout&website=example.com&value=60s"
cdn/set/caching
Set the CDN caching level. Default caches static files and pages, respecting site headers. Aggressive (full) tries to cache as much as possible, including some dynamic pages.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | default or aggressive |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/caching&website=example.com&value=default"
cdn/set/caching_time_static
Set the CDN caching period for static assets (images, JS, CSS).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | 10m, 30m, 60m, 120m, 240m, 360m, 720m, 1d, 2d, 3d, 7d, 14d, or 30d |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/caching_time_static&website=example.com&value=7d"
cdn/set/caching_time_pages
Set the CDN caching period for pages/HTML content.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | 10m, 30m, 60m, 120m, 240m, 360m, 720m, 1d, 2d, 3d, 7d, 14d, or 30d |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/caching_time_pages&website=example.com&value=720m"
cdn/set/whitelisteduris
Paths that skip the WAF. Only the path is checked, from its start, never the query string, so an entry can't be matched from another page's query string. Stricter than whitelistedurls.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated paths, eg: /wp-json/ /api/webhook |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/whitelisteduris&website=example.com&value=/api/webhook"
cdn/set/captchaurls
URLs where visitors must pass a CAPTCHA (a short proof-of-work check, no images) first. A pass is valid for 24 hours. Send an empty value to remove. See CAPTCHA.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes (may be empty) | Space-separated paths, eg: /login /contact, or / for the whole site. Empty removes the CAPTCHA URLs |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/captchaurls&website=example.com&value=/wp-login.php%20/contact"
cdn/set/captcha_mode
How the CAPTCHA looks: a checkbox ("I'm not a robot", the default) or invisible (the check runs on its own).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | checkbox or invisible |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/captcha_mode&website=example.com&value=invisible"
cdn/set/block_response
How a WAF block is shown: a styled Access Denied page (the default) or plain text, better for APIs and non-browser clients.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | html or text |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/block_response&website=example.com&value=text"
cdn/set/ip
Change the hosting server (origin) IP addresses of a site.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | Space-separated IPv4/IPv6 addresses of your hosting server |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/ip&website=example.com&value=203.0.113.10"
cdn/set/behind_cdn
Set this when another CDN sits in front of NOC. NOC then reads the real visitor IP that your CDN provides, only on connections from that CDN's own IP ranges. For Akamai, turn on True-Client-IP in your Akamai property.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | none, cloudflare, akamai, fastly or bunny |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/behind_cdn&website=example.com&value=cloudflare"
cdn/set/fake_browser
Fake browser detection. Requests that claim to be Chrome, Edge, Firefox or Safari but miss the headers that browser always sends, or that come from automation tools, get a CAPTCHA or are blocked. Use cdn/set/fake_browser_action to choose which. See fake crawler detection.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
value | Yes | login (login, signup and password pages, the default), site or off. For fake_browser_action: captcha, captcha_invisible or default (block) |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/fake_browser&website=example.com&value=site"
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/fake_browser_action&website=example.com&value=captcha_invisible"
CDN / WAF Options (Toggle On/Off)
Enable or disable various WAF/CDN features. Set value=true to enable, value=false to disable.
| Action | Description |
|---|---|
cdn/set/https_redirect | Force HTTP to HTTPS redirect |
cdn/set/upgrade_insecure | Upgrade HTTP resources to HTTPS |
cdn/set/gzip | Enable gzip compression |
cdn/set/floc_out | Block Google FLoC tracking |
cdn/set/optmize_images | Enable image optimization |
cdn/set/secure_cookie_flags | Add Secure flag to cookies |
cdn/set/waf | Enable/disable the WAF |
cdn/set/waf_virtual_hardening | Enable virtual patching/hardening |
cdn/set/waf_admin_lockdown | Lock down admin panels (wp-admin, etc.) |
cdn/set/http2 | Enable HTTP/2 |
cdn/set/http3 | Enable HTTP/3 over QUIC (off by default) |
cdn/set/origin_auth | Send a secret NOC-CDN-Auth header to your server so it can reject requests that don't come through NOC. The key is returned by cdn/get as origin_auth_header. See origin authentication. |
cdn/set/client_country_header | Send the visitor's 2-letter country code to your server in NOC-Client-Country (XX when unknown) |
cdn/set/client_asn_header | Send the visitor's network AS number in NOC-Client-ASN (0 when unknown) |
# Enable gzip compression
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/gzip&website=example.com&value=true"
# Enable WAF admin lockdown
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/set/waf_admin_lockdown&website=example.com&value=true"
Bots and Access Control
cdn/aicrawlers/set
Blocks AI crawlers (GPTBot, ClaudeBot, Bytespider, CCBot and others) by user agent. Search engines and link previews are not affected, and /robots.txt is always allowed. Only the values you send are changed. Use cdn/aicrawlers/get to read the settings. See AI crawler blocking.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
enabled | No | true or false |
urls | No | Space-separated paths, eg: ^/blog /docs; / for the whole site (default) |
mode | No | all, or training (only crawlers that collect training data) |
allow | No | Comma-separated vendors to always let through: openai, anthropic, google, perplexity, meta, amazon, mistral, xai, duckduckgo, you; none to clear |
block_response | No | default, stealthy_403, stealthy_404, stealthy_503, empty_200, html |
# Block every AI crawler except OpenAI and Anthropic
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/aicrawlers/set&website=example.com&enabled=true&urls=/&allow=openai,anthropic"
# Read the settings
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/aicrawlers/get&website=example.com"
cdn/tor/set
Blocks or challenges visitors from Tor exit nodes (the Tor Project's list, updated every hour). /robots.txt is always allowed. Use cdn/tor/get to read the settings. See Tor blocking.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
enabled | No | true or false |
scope | No | sensitive (login, signup and admin pages), site or custom (uses urls) |
urls | No | Space-separated paths for scope=custom; sending urls alone sets scope=custom |
block_response | No | captcha (default), captcha_invisible, default (block), stealthy_403, stealthy_404, stealthy_503, empty_200, html |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/tor/set&website=example.com&enabled=true&scope=sensitive&block_response=captcha"
cdn/vpn/set
Blocks or challenges visitors coming through a VPN: a list of known VPN exit addresses (refreshed daily) and, unless provider_networks=false, the networks VPN services run on. Use cdn/vpn/get to read the settings. See VPN blocking.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
enabled | No | true or false |
provider_networks | No | true (default) or false |
scope | No | sensitive (login, signup and admin pages), site or custom (uses urls) |
urls | No | Space-separated paths for scope=custom |
block_response | No | captcha (default), captcha_invisible, default (block), stealthy_403, stealthy_404, stealthy_503, empty_200, html |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/vpn/set&website=example.com&enabled=true&scope=sensitive&block_response=captcha"
cdn/datacenters/set
Blocks or challenges visitors from cloud, VPS and hosting networks (by ASN), plus any AS numbers you add. Search engines and known good bots are never affected. Use cdn/datacenters/get to read the settings. See datacenter blocking and ASN blocking.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
enabled | No | true or false |
scope | No | sensitive (login, signup and admin pages), site or custom (uses urls) |
urls | No | Space-separated paths for scope=custom |
allow | No | Comma-separated providers to let through (eg: aws, gcp, digitalocean), or none |
block_asns | No | Extra AS numbers to block, eg: AS12345,AS67890, or none |
allow_asns | No | AS numbers never blocked, or none |
block_response | No | captcha (default), captcha_invisible, default (block), stealthy_403, stealthy_404, stealthy_503, empty_200, html |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/datacenters/set&website=example.com&enabled=true&urls=^/login&allow=aws&block_response=captcha"
Integrations
cdn/siem/set
Sends the website's access and firewall logs to your Trunc account. The key is the one Trunc shows under Settings, Log sources, NOC.org WAF/CDN. Use cdn/siem/get to check the status (the key is never returned). See SIEM integration.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
enabled | No | true or false |
key | No | Your Trunc key (URL-encode it: it can contain + / =) |
remove_key | No | true stops sending and deletes the key |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/siem/set&website=example.com&enabled=true&key=YOUR_TRUNC_KEY"
Custom Rules
cdn/customrules/add
Create a new custom rule for your website. Custom rules let you set honeypots, rate limits, redirects, browser verification, traffic queuing, country blocks, user-agent blocks, and API protection.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
rule_type | Yes | Rule type (see below) |
url | Yes | URL paths to apply this rule (use / for site-wide). Multiple paths separated by spaces. |
rule_name | No | Name for the rule ([a-z0-9-]). Random if omitted. |
value | Varies | Configuration value (depends on rule_type) |
region | No | all (default), north_america, south_america, europe, asia, oceania |
block_response | No | default, stealthy_404, stealthy_503, stealthy_403, html, empty_200, redirect_to:URL. For country_block, max_requests, useragent_block and ip_block also captcha or captcha_invisible (let the visitor through if they pass a CAPTCHA) |
allow_only | No | For country_block and ip_allow: true turns the list into an allow list, and everyone else gets the block_response |
Rule Types
| rule_type | Description | value |
|---|---|---|
honeypot | Trap URLs that should never be visited. Visiting IPs are blocked. | Block duration in seconds (default: 600) |
max_requests | Max requests per IP per minute | Request threshold (default: 50) |
redirect_to | 301 redirect to another URL | Destination URL path |
browser_verify | Verify the request comes from a real browser | n/a |
queue | Queue visitors over a threshold into a waiting room | Max concurrent visitors |
country_block | Block traffic from specific countries, or with allow_only=true allow only them | Space-separated 2-letter country codes |
useragent_block | Block specific user agents | Space-separated user agent strings |
api_protect | Require an access token on these URLs. Add users with cdn/customrules/api_protect/add_user | n/a |
ip_block | Block IPv4/IPv6 addresses or CIDR ranges (up to 500) | Space-separated IPs or ranges |
ip_allow | Let IPs or ranges bypass the WAF on these URLs; with allow_only=true, block everyone else | Space-separated IPs or ranges |
captcha | Visitors must pass a CAPTCHA (checkbox) before reaching the URL | n/a |
captcha_invisible | Same as captcha, with the check running on its own | n/a |
Examples
# Rate limit: max 150 requests/min to /api
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/add&website=example.com&rule_type=max_requests&url=/api&value=150"
# Country block: block Russia, Iran, and North Korea site-wide
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/add&website=example.com&rule_type=country_block&url=/&value=RU%20KP%20IR"
# Redirect: /old-page to /new-page
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/add&website=example.com&rule_type=redirect_to&url=/old-page&value=/new-page"
# Honeypot: trap /admin.bak (block visitors for 10 minutes)
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/add&website=example.com&rule_type=honeypot&url=/admin.bak&value=600"
# API protection on /api/v2/
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/add&website=example.com&rule_type=api_protect&url=/api/v2/"
# Allow only Brazil, with a CAPTCHA for everyone else
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/add&website=example.com&rule_type=country_block&url=/&value=BR&allow_only=true&block_response=captcha"
# Only the office network can reach /wp-admin
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/add&website=example.com&rule_type=ip_allow&url=/wp-admin&value=203.0.113.0/24&allow_only=true&block_response=html"
cdn/customrules/delete
Delete a custom rule by name. To update a rule, delete it and re-add with new settings.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
rule_name | Yes | Name of the rule to delete |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/delete&website=example.com&rule_name=my-rule-name"
cdn/customrules/list
List all custom rules for a website.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/list&website=example.com"
cdn/customrules/api_protect/add_user
Adds a user to API Protect (enable it with a custom rule of type api_protect). Each user sends their token in the X-API-Access header; requests without a valid token get a 403. Use the user name open_access to allow requests without a token, limited per IP. See API Protect.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
username | Yes | 3-32 characters: a-z, 0-9, _ @ . - |
access_token | No | Your own token; one is generated if empty |
max_requests | No | Requests per hour (10-99999); empty for unlimited |
expire | No | Expiry date, eg: 2026-12-31 |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/api_protect/add_user&website=example.com&username=partner-a&max_requests=500&expire=2027-12-31"
cdn/customrules/api_protect/delete_user
Removes a user (or open_access) from API Protect. To change a limit or expiry, delete the user and add it again with the same access_token.
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
username | Yes | User name |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/api_protect/delete_user&website=example.com&username=partner-a"
cdn/customrules/api_protect/list_users
Lists the API Protect users of a website, with their tokens, limits (max_requests_per_hour, 0 = unlimited) and expiry (unix time).
| Parameter | Required | Description |
|---|---|---|
website | Yes | Valid website/domain |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=cdn/customrules/api_protect/list_users&website=example.com"
DNS API
domain/add
Add a new domain to your NOC DNS account.
| Parameter | Required | Description |
|---|---|---|
domain_name | Yes | Valid domain name |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=domain/add&domain_name=example.com"
domain/remove
Delete a domain from your account. All DNS records must be removed first.
| Parameter | Required | Description |
|---|---|---|
domain_name | Yes | Valid domain name |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=domain/remove&domain_name=example.com"
domains/list
List all domains in your DNS account.
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=domains/list"
Response:
{"status":"success","domains":["example.com","example.org"]}
domain/set_tag
Set a customer tag for a domain name (useful for organizing domains by client or project).
| Parameter | Required | Description |
|---|---|---|
domain_name | Yes | Valid domain name |
tag | Yes | Tag string ([a-zA-Z0-9_]) |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=domain/set_tag&domain_name=example.com&tag=client_acme"
record/add
Add a new DNS record to a domain.
| Parameter | Required | Description |
|---|---|---|
domain_name | Yes | Valid domain name |
sub_domain | Yes | Subdomain (e.g., www, @ for apex) |
record_type | Yes | DNS record type: A, AAAA, MX, CNAME, TXT, etc. |
address | Yes | Record value (IP address, hostname, or text) |
ttl | No | TTL in seconds (default: 3600) |
# Add an A record for www.example.com
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=record/add&domain_name=example.com&sub_domain=www&record_type=A&address=203.0.113.10&ttl=120"
record/delete
Delete a DNS record from a domain.
| Parameter | Required | Description |
|---|---|---|
domain_name | Yes | Valid domain name |
sub_domain | Yes | Subdomain of the record |
recordid | Yes | Record ID (from records/list) |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=record/delete&domain_name=example.com&sub_domain=www&recordid=12345"
records/list
List all DNS records for a domain (or all to list records across all domains).
| Parameter | Required | Description |
|---|---|---|
domain_name | Yes | Valid domain name or all |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=records/list&domain_name=example.com"
sub_domain/set/routing
Configure the routing type for a subdomain with multiple DNS records. Useful for high availability and performance optimization.
| Parameter | Required | Description |
|---|---|---|
domain_name | Yes | Valid domain name |
sub_domain | Yes | Subdomain to configure |
routing_type | Yes | disabled (all records always on), distance_routing (closest/best IP), or simple_failover (remove failed records) |
routing_monitoring | No | ping, http, or https |
curl "https://my.noc.org/api?apikey=YOUR_API_KEY&action=sub_domain/set/routing&domain_name=example.com&sub_domain=www&routing_type=distance_routing&routing_monitoring=https"
Need Help?
If you have questions about the API or need help integrating, contact our support team at support@noc.org.
For getting started guides and tutorials, see: