API Version 2.1

Developer Documentation

Integrate Securiwall's enterprise-grade security, CDN, and traffic management directly into your infrastructure using our REST API.

Introduction#

The Securiwall API is built on REST principles. We enforce HTTPS in every request to improve data security, integrity, and privacy. The API does not support HTTP. All requests contain JSON bodies, and responses satisfy standard JSON format.

Base URL
All API requests are made to https://api.securiwall.com/v1

Authentication#

Securiwall uses API keys to authenticate requests. You can view and manage your API keys in the Account Settings.

Bearer Token

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Requests without valid authentication will return 401 Unauthorized.
Example Authorization Header
bash
Authorization: Bearer sk_live_8F...
API REFERENCE

Zones

A Zone represents a domain name (e.g., example.com) and all of its subdomains. You can manage DNS records, security settings, and more at the Zone level.

List Zones

Retrieve a list of all zones associated with your account.

GET/zones
cURL Request
bash
curl -X GET "https://api.securiwall.com/v1/zones" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json"

Response

json
{
  "success": true,
  "result": [
    {
      "id": "023e105f4ecef8ad9ca31a8372d0c353",
      "name": "example.com",
      "status": "active",
      "paused": false,
      "type": "full",
      "development_mode": 0
    }
  ],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "total_count": 1
  }
}

Create Zone

Add a new domain to your account.

POST/zones
cURL Request
bash
curl -X POST "https://api.securiwall.com/v1/zones" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     --data '{"name": "example.com", "account": {"id": "12345"}, "jump_start": true}'

DNS Records

Manage DNS records for a zone. Supports A, AAAA, CNAME, TXT, MX, NS, SRV, and more.

List DNS Records

GET/zones/{zone_id}/dns_records
cURL Request
bash
curl -X GET "https://api.securiwall.com/v1/zones/023e.../dns_records" \
     -H "Authorization: Bearer YOUR_API_KEY"

Create DNS Record

POST/zones/{zone_id}/dns_records
cURL Request
bash
curl -X POST "https://api.securiwall.com/v1/zones/023e.../dns_records" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     --data '{"type":"A","name":"example.com","content":"1.2.3.4","ttl":3600,"proxied":true}'

SSL/TLS Settings

Control how Securiwall encrypts traffic to your origin.

Change SSL Mode

Off
No encryption. Not recommended.
Flexible
Encrypts between browser and Securiwall.
Full (Strict)
Encrypts end-to-end. Requires valid cert on origin.
PATCH/zones/{zone_id}/settings/ssl
json
{ "value": "strict" }
SECURITY

DDoS Rules

Configure how Securiwall handles traffic during an attack. You can set override rules for specific paths or user agents.

Under Attack Mode

When enabled, Securiwall presents a JavaScript challenge to all visitors. This is the "Nuclear Option" for stopping attacks.

Best Practice
Only enable "Under Attack Mode" when you are confirmed to be under a heavy Layer 7 attack that bypasses standard rules.
Update Security Level
json
PATCH /v1/zones/{zone_id}/settings/security_level
{
  "value": "under_attack"
}

Webhooks

Subscribe to real-time events.

Webhooks are now available for all Enterprise plans.