API Reference

Complete REST API documentation for integrating compliance monitoring into your applications with interactive examples and detailed responses.

REST API v1.0
JSON Responses
Rate Limited

Base URL

All API requests are made to this base URL

https://api.compliancecheck.com/v1

All endpoints use HTTPS. HTTP requests will be redirected.

Authentication

Bearer token authentication required for all endpoints

Authorization: Bearer your_api_key_here

Get your API key from the dashboard settings page.

API Endpoints

Complete reference for all available API endpoints

POST
/api/v1/scans
Auth Required

Create a new compliance scan

Parameters

url
required
string

Website URL to scan

regulations
optional
array

Specific regulations to check ['GDPR', 'CCPA', 'PDPA']

callback_url
optional
string

Webhook URL for completion notification

Response Example

JSON Response
{
  "scan_id": "scan_abc123",
  "status": "pending",
  "url": "https://example.com",
  "regulations": [
    "GDPR",
    "CCPA"
  ],
  "created_at": "2025-01-15T10:30:00Z"
}
GET
/api/v1/scans/{scan_id}
Auth Required

Get scan status and results

Parameters

scan_id
required
string

Unique scan identifier

Response Example

JSON Response
{
  "scan_id": "scan_abc123",
  "status": "completed",
  "url": "https://example.com",
  "score": 85,
  "issues_found": 3,
  "results": "{ detailed compliance analysis }",
  "completed_at": "2025-01-15T10:35:00Z"
}
GET
/api/v1/scans
Auth Required

List all scans for authenticated user

Parameters

limit
optional
integer

Number of results (default: 50, max: 100)

offset
optional
integer

Pagination offset

status
optional
string

Filter by status: pending, processing, completed, failed

Response Example

JSON Response
{
  "scans": [
    "array of scan objects"
  ],
  "total": 25,
  "limit": 50,
  "offset": 0
}
POST
/api/v1/webhooks
Auth Required

Configure webhook notifications

Parameters

url
required
string

Webhook endpoint URL

events
required
array

Events to subscribe to ['scan.completed', 'scan.failed']

secret
optional
string

Webhook signature secret

Response Example

JSON Response
{
  "webhook_id": "wh_xyz789",
  "url": "https://yourapp.com/webhook",
  "events": [
    "scan.completed"
  ],
  "created_at": "2025-01-15T10:30:00Z"
}

Error Codes

Standard HTTP status codes and error handling

400
Bad Request

Invalid request parameters or malformed JSON

401
Unauthorized

Invalid or missing API key

403
Forbidden

API key lacks required permissions

404
Not Found

Requested resource not found

429
Too Many Requests

Rate limit exceeded

500
Internal Server Error

Server error, contact support

Webhooks

Real-time notifications for scan completion and status changes

scan.completed

Triggered when a compliance scan finishes successfully

Payload Example
{
  "event": "scan.completed",
  "scan_id": "scan_abc123",
  "url": "https://example.com",
  "status": "completed",
  "score": 85,
  "timestamp": "2025-01-15T10:35:00Z"
}

scan.failed

Triggered when a compliance scan encounters an error

Payload Example
{
  "event": "scan.failed",
  "scan_id": "scan_abc123",
  "url": "https://example.com",
  "error": "Website unreachable",
  "timestamp": "2025-01-15T10:35:00Z"
}

Rate Limiting

API usage limits based on subscription tier

Free Tier
10
requests/hour
Pro Tier
100
requests/hour
Enterprise
1000
requests/hour

Rate limits are enforced per API key. Exceeded limits return HTTP 429 status. Use the X-RateLimit-* headers to monitor usage.

Start Building Today

Use our official SDKs or integrate directly with the REST API