Skip to main content

POST /api/static/sites/scan

Trigger a new scan run for a Site you already own. Use this to re-check a site after remediation or on a schedule. 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: Provide exactly one of projectId or url to identify the site. Optionally restrict the scan to specific sections.
Fields:

Example Request

Response

Success (200 OK):
Error (400 Bad Request — missing or ambiguous identifier):
Error (401 Unauthorized):
Error (403 Forbidden — wrong scope):
Error (403 Forbidden — run limit reached):
Error (404 Not Found — not owned or doesn’t exist):
The 404 response is deliberately identical whether the site doesn’t exist or simply isn’t owned by your account — this avoids leaking which domains other accounts monitor.
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

Poll the Get Site endpoint with the site’s id to watch the run’s status and see the resulting findings summary once it completes.