Skip to main content

POST /api/static/sites

Register a new Site for live-application monitoring and trigger its first scan. Sites are distinct from repository scans (/api/static/scan) — instead of scanning source code, Sites continuously monitor a live domain for exposed backends, DNS misconfiguration, SEO issues, and accessibility problems. Requires an API key with the read-and-scan scope.

Request

Headers:
  • x-api-key (required): Your Rafter security API key, scope read-and-scan
  • Content-Type: application/json
Body:
Fields:

Example Request

Response

Success (200 OK — new site):
If the site was created but its initial scan failed to start, the response includes a scan_error string alongside "created": true and "run": null.
Success (200 OK — site already existed):
Error (400 Bad Request — missing, invalid, or blocked URL):
Error (401 Unauthorized):
Error (403 Forbidden — wrong scope):
Error (403 Forbidden — plan or site limit reached):
Error (429 Too Many Requests):
Error (500 Internal Server Error):

Response Fields

Rate Limiting

The API implements rate limiting to ensure fair usage:
  • Rate Limit: 100 requests per minute per IP address
  • Quota: Based on your subscription plan

Examples

JavaScript

Python

Next Steps

After creating a site, you can:
  1. Check status and findings using the site id with the Get Site endpoint
  2. Trigger a re-scan later with the Scan Site endpoint
  3. List all your sites with the List Sites endpoint