API Reference

Integrate accessibility testing into your workflow

API Access Requires Pro or Agency Plan

The REST API allows you to integrate accessibility scanning into your CI/CD pipeline, start scans programmatically, and build custom dashboards.

Sign Up for Pro
API Access: The REST API is available on Pro and Agency plans. Upgrade your plan to get API access.

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

You can generate an API key from your account settings.

Example Request
curl -X GET https://api.accessiscan.com/v1/sites \
  -H "Authorization: Bearer sk_live_abc123..."

Base URL

All API requests should be made to:

https://api.accessiscan.com/v1
Response Format

All responses are returned in JSON format:

{
  "success": true,
  "data": { ... },
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 100
  }
}

Scans

POST Create a Scan
/scans

Start a new accessibility scan for a URL.

Request Body
{
  "url": "https://example.com",
  "standardId": 1,
  "depth": 5
}
Parameters
Parameter Type Required Description
url string Yes The URL to scan
standardId integer Yes 1=WCAG 2.1, 2=ADA, 3=Section 508, 4=EAA
depth integer No Number of pages to crawl (default: 1)
Response
{
  "success": true,
  "data": {
    "id": "scan_abc123",
    "status": "pending",
    "url": "https://example.com",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}
GET Get Scan Results
/scans/{scan_id}

Retrieve the results of a completed scan.

Response
{
  "success": true,
  "data": {
    "id": "scan_abc123",
    "status": "completed",
    "score": 85,
    "issuesCount": 12,
    "issues": [
      {
        "id": "issue_1",
        "type": "missing-alt-text",
        "severity": "critical",
        "element": "",
        "recommendation": "Add alt attribute..."
      }
    ]
  }
}
GET List Scans
/scans

List all scans for your account.

Query Parameters
Parameter Type Description
page integer Page number (default: 1)
per_page integer Results per page (default: 20, max: 100)
site_id string Filter by site

Sites

GET List Sites
/sites

List all sites in your account.

POST Create Site
/sites

Add a new site to your account.

Request Body
{
  "name": "My Website",
  "url": "https://example.com",
  "standardId": 1
}
DELETE Delete Site
/sites/{site_id}

Remove a site from your account.

Issues

GET List Issues
/issues

List all issues across your sites.

Query Parameters
Parameter Type Description
severity string Filter by severity: critical, serious, moderate, minor
status string Filter by status: open, resolved, ignored
site_id string Filter by site
PATCH Update Issue Status
/issues/{issue_id}

Update the status of an issue.

Request Body
{
  "status": "resolved"
}

Webhooks

Receive real-time notifications when scans complete or issues are found.

Webhook Events
Event Description
scan.completed A scan has finished processing
scan.failed A scan failed to complete
issue.created A new issue was detected
Webhook Payload
{
  "event": "scan.completed",
  "timestamp": "2024-01-15T10:35:00Z",
  "data": {
    "scanId": "scan_abc123",
    "score": 85,
    "issuesCount": 12
  }
}

Error Handling

The API uses standard HTTP status codes to indicate success or failure.

Status Code Description
200 Success
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing API key
403 Forbidden - Insufficient permissions
404 Not Found - Resource doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error
Error Response Format
{
  "success": false,
  "error": {
    "code": "invalid_url",
    "message": "The provided URL is not valid"
  }
}

Rate Limits

API requests are rate limited based on your plan:

Plan Requests per Minute Requests per Day
Pro 60 10,000
Agency 120 50,000
Rate Limit Headers

Each response includes headers showing your current rate limit status:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705312200