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&param1=value1&param2=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.

ParameterRequiredDescription
domainYesValid domain name
subdomainYesSubdomain 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.

ParameterRequiredDescription
websiteYesValid website/domain
hosting_ipYesOrigin/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.

ParameterRequiredDescription
websiteYesValid 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.

ParameterRequiredDescription
websiteYesValid 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.

ParameterRequiredDescription
websiteYesValid 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.

ParameterRequiredDescription
websiteYesValid website/domain
dateYesDate 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.

ParameterRequiredDescription
websiteYesValid website/domain
dateYesDate 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).

ParameterRequiredDescription
websiteYesValid website/domain
limitNoNumber 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.

ParameterRequiredDescription
websiteYesValid website/domain
sinceYesTimestamp: yyyy-mm-dd HH:MM:SS
limitNoNumber 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.

ParameterRequiredDescription
websiteYesValid website/domain
public_keyYesFull-chain SSL certificate file
private_keyYesPrivate 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).

ParameterRequiredDescription
websiteYesPrimary domain
alias_domainYesAlias domain to add
alias_typeNo301 (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.

ParameterRequiredDescription
websiteYesValid 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).

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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).

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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).

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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).

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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).

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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).

ParameterRequiredDescription
websiteYesValid website/domain
valueYes10s, 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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYesdefault 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).

ParameterRequiredDescription
websiteYesValid website/domain
valueYes10m, 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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYes10m, 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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYes (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).

ParameterRequiredDescription
websiteYesValid website/domain
valueYescheckbox 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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYeshtml 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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYesSpace-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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYesnone, 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.

ParameterRequiredDescription
websiteYesValid website/domain
valueYeslogin (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.

ActionDescription
cdn/set/https_redirectForce HTTP to HTTPS redirect
cdn/set/upgrade_insecureUpgrade HTTP resources to HTTPS
cdn/set/gzipEnable gzip compression
cdn/set/floc_outBlock Google FLoC tracking
cdn/set/optmize_imagesEnable image optimization
cdn/set/secure_cookie_flagsAdd Secure flag to cookies
cdn/set/wafEnable/disable the WAF
cdn/set/waf_virtual_hardeningEnable virtual patching/hardening
cdn/set/waf_admin_lockdownLock down admin panels (wp-admin, etc.)
cdn/set/http2Enable HTTP/2
cdn/set/http3Enable HTTP/3 over QUIC (off by default)
cdn/set/origin_authSend 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_headerSend the visitor's 2-letter country code to your server in NOC-Client-Country (XX when unknown)
cdn/set/client_asn_headerSend 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.

ParameterRequiredDescription
websiteYesValid website/domain
enabledNotrue or false
urlsNoSpace-separated paths, eg: ^/blog /docs; / for the whole site (default)
modeNoall, or training (only crawlers that collect training data)
allowNoComma-separated vendors to always let through: openai, anthropic, google, perplexity, meta, amazon, mistral, xai, duckduckgo, you; none to clear
block_responseNodefault, 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.

ParameterRequiredDescription
websiteYesValid website/domain
enabledNotrue or false
scopeNosensitive (login, signup and admin pages), site or custom (uses urls)
urlsNoSpace-separated paths for scope=custom; sending urls alone sets scope=custom
block_responseNocaptcha (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.

ParameterRequiredDescription
websiteYesValid website/domain
enabledNotrue or false
provider_networksNotrue (default) or false
scopeNosensitive (login, signup and admin pages), site or custom (uses urls)
urlsNoSpace-separated paths for scope=custom
block_responseNocaptcha (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.

ParameterRequiredDescription
websiteYesValid website/domain
enabledNotrue or false
scopeNosensitive (login, signup and admin pages), site or custom (uses urls)
urlsNoSpace-separated paths for scope=custom
allowNoComma-separated providers to let through (eg: aws, gcp, digitalocean), or none
block_asnsNoExtra AS numbers to block, eg: AS12345,AS67890, or none
allow_asnsNoAS numbers never blocked, or none
block_responseNocaptcha (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.

ParameterRequiredDescription
websiteYesValid website/domain
enabledNotrue or false
keyNoYour Trunc key (URL-encode it: it can contain + / =)
remove_keyNotrue 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.

ParameterRequiredDescription
websiteYesValid website/domain
rule_typeYesRule type (see below)
urlYesURL paths to apply this rule (use / for site-wide). Multiple paths separated by spaces.
rule_nameNoName for the rule ([a-z0-9-]). Random if omitted.
valueVariesConfiguration value (depends on rule_type)
regionNoall (default), north_america, south_america, europe, asia, oceania
block_responseNodefault, 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_onlyNoFor country_block and ip_allow: true turns the list into an allow list, and everyone else gets the block_response
Rule Types
rule_typeDescriptionvalue
honeypotTrap URLs that should never be visited. Visiting IPs are blocked.Block duration in seconds (default: 600)
max_requestsMax requests per IP per minuteRequest threshold (default: 50)
redirect_to301 redirect to another URLDestination URL path
browser_verifyVerify the request comes from a real browsern/a
queueQueue visitors over a threshold into a waiting roomMax concurrent visitors
country_blockBlock traffic from specific countries, or with allow_only=true allow only themSpace-separated 2-letter country codes
useragent_blockBlock specific user agentsSpace-separated user agent strings
api_protectRequire an access token on these URLs. Add users with cdn/customrules/api_protect/add_usern/a
ip_blockBlock IPv4/IPv6 addresses or CIDR ranges (up to 500)Space-separated IPs or ranges
ip_allowLet IPs or ranges bypass the WAF on these URLs; with allow_only=true, block everyone elseSpace-separated IPs or ranges
captchaVisitors must pass a CAPTCHA (checkbox) before reaching the URLn/a
captcha_invisibleSame as captcha, with the check running on its ownn/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.

ParameterRequiredDescription
websiteYesValid website/domain
rule_nameYesName 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.

ParameterRequiredDescription
websiteYesValid 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.

ParameterRequiredDescription
websiteYesValid website/domain
usernameYes3-32 characters: a-z, 0-9, _ @ . -
access_tokenNoYour own token; one is generated if empty
max_requestsNoRequests per hour (10-99999); empty for unlimited
expireNoExpiry 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.

ParameterRequiredDescription
websiteYesValid website/domain
usernameYesUser 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).

ParameterRequiredDescription
websiteYesValid 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.

ParameterRequiredDescription
domain_nameYesValid 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.

ParameterRequiredDescription
domain_nameYesValid 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).

ParameterRequiredDescription
domain_nameYesValid domain name
tagYesTag 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.

ParameterRequiredDescription
domain_nameYesValid domain name
sub_domainYesSubdomain (e.g., www, @ for apex)
record_typeYesDNS record type: A, AAAA, MX, CNAME, TXT, etc.
addressYesRecord value (IP address, hostname, or text)
ttlNoTTL 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.

ParameterRequiredDescription
domain_nameYesValid domain name
sub_domainYesSubdomain of the record
recordidYesRecord 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).

ParameterRequiredDescription
domain_nameYesValid 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.

ParameterRequiredDescription
domain_nameYesValid domain name
sub_domainYesSubdomain to configure
routing_typeYesdisabled (all records always on), distance_routing (closest/best IP), or simple_failover (remove failed records)
routing_monitoringNoping, 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:

Improve Your Website's Speed and Security

Free 14-day trial. No credit card required.