API Documentatie
De SiteProof REST API geeft je programmatic toegang tot je websites, scans en issues. Beschikbaar op het Bureau plan.
Authenticatie
Alle API requests vereisen een Bearer token in de Authorization header. Je kunt API keys aanmaken in je dashboard instellingen.
curl -H "Authorization: Bearer sp_live_abc123..." \ https://siteproof.nl/api/v1/websites
Rate Limiting
De API is gelimiteerd tot 100 requests per minuut per API key. Bij overschrijding ontvang je een 429 status met een Retry-After header.
Response Format
Alle responses zijn JSON. Succesvolle responses bevatten "success": true met een data veld. Foutresponses bevatten "success": false met een error bericht in het Nederlands.
Succes
{
"success": true,
"data": { ... }
}Fout
{
"success": false,
"error": "Beschrijving van de fout."
}Status Codes
| Code | Betekenis |
|---|---|
200 | Succesvol |
201 | Aangemaakt |
400 | Ongeldige request |
401 | Niet geauthenticeerd (ongeldige API key) |
403 | Geen toegang (plan ondersteunt geen API) |
404 | Niet gevonden |
429 | Rate limit overschreden |
500 | Server fout |
503 | Scanner niet beschikbaar |
Endpoints
/api/v1/websitesLijst van alle websites in je organisatie.
Response
{
"success": true,
"data": [
{
"id": "uuid",
"url": "https://example.nl",
"name": "Example",
"isActive": true,
"createdAt": "2025-01-01T00:00:00Z",
"lastScan": {
"id": "uuid",
"score": 85,
"status": "COMPLETED",
"totalIssues": 12,
"createdAt": "2025-01-15T10:00:00Z",
"completedAt": "2025-01-15T10:02:30Z"
}
}
]
}/api/v1/websites/:idDetails van een specifieke website, inclusief recente scans en scan planning.
Response
{
"success": true,
"data": {
"id": "uuid",
"url": "https://example.nl",
"name": "Example",
"isActive": true,
"schedule": {
"frequency": "WEEKLY",
"isActive": true,
"nextRunAt": "2025-01-22T06:00:00Z"
},
"recentScans": [...]
}
}/api/v1/websites/:id/scansScan geschiedenis van een website. Ondersteunt paginering.
Query Parameters
| Parameter | Type | Beschrijving |
|---|---|---|
page | number | Paginanummer (standaard: 1) |
limit | number | Resultaten per pagina (standaard: 25, max: 50) |
Response
{
"success": true,
"data": {
"scans": [...],
"pagination": {
"page": 1,
"limit": 25,
"total": 42,
"totalPages": 2
}
}
}/api/v1/websites/:id/issuesHuidige issues van een website (uit de laatste voltooide scan).
Query Parameters
| Parameter | Type | Beschrijving |
|---|---|---|
severity | string | Filter op ernst: CRITICAL, SERIOUS, MODERATE, MINOR |
page | number | Paginanummer (standaard: 1) |
limit | number | Resultaten per pagina (standaard: 25, max: 100) |
Response
{
"success": true,
"data": {
"scanId": "uuid",
"score": 85,
"scanDate": "2025-01-15T10:02:30Z",
"issues": [
{
"id": "uuid",
"axeRuleId": "image-alt",
"severity": "CRITICAL",
"wcagCriteria": ["1.1.1"],
"description": "Afbeeldingen missen alternatieve tekst",
"fixSuggestion": "Voeg een alt-attribuut toe...",
"pageUrl": "https://example.nl/about"
}
],
"pagination": {...}
}
}/api/v1/scanStart een nieuwe scan voor een website.
Request Body
{
"websiteId": "uuid"
}Response
{
"success": true,
"data": {
"id": "uuid",
"websiteId": "uuid",
"status": "QUEUED",
"createdAt": "2025-01-15T10:00:00Z"
}
}/api/v1/scan/:idStatus en resultaten van een scan. Poll dit endpoint totdat status COMPLETED of FAILED is.
Response
{
"success": true,
"data": {
"id": "uuid",
"status": "COMPLETED",
"score": 85,
"totalPages": 10,
"scannedPages": 10,
"totalIssues": 12,
"criticalIssues": 2,
"seriousIssues": 5,
"moderateIssues": 3,
"minorIssues": 2,
"duration": 45,
"pages": [...],
"issues": [...]
}
}Scan Workflow
Een typische scan-workflow via de API:
- Haal je websites op via
GET /api/v1/websites - Start een scan via
POST /api/v1/scanmet het website ID - Poll de scan status via
GET /api/v1/scan/:id(elke 5 seconden) - Wanneer de status
COMPLETEDis, bevat de response alle resultaten
# 1. Lijst websites
curl -H "Authorization: Bearer sp_live_..." \
https://siteproof.nl/api/v1/websites
# 2. Start scan
curl -X POST \
-H "Authorization: Bearer sp_live_..." \
-H "Content-Type: application/json" \
-d '{"websiteId": "uuid"}' \
https://siteproof.nl/api/v1/scan
# 3. Poll resultaten
curl -H "Authorization: Bearer sp_live_..." \
https://siteproof.nl/api/v1/scan/scan-uuid
# 4. Bekijk issues
curl -H "Authorization: Bearer sp_live_..." \
"https://siteproof.nl/api/v1/websites/uuid/issues?severity=CRITICAL"