REST API Overview
The Silent Witness REST API provides direct HTTP access to all platform capabilities. Use this API when you need fine-grained control or are working in a language without an official SDK.
Base URL
All API requests should be made to:
https://api.silentwitness.ai/api
Staging environment base URL:
https://api.staging.silentwitness.ai/api
Request Format
- All requests must use HTTPS
- Request bodies must be JSON with
Content-Type: application/json - File uploads use
multipart/form-data
Response Format
All responses are JSON with this structure:
{
"success": true,
"data": { ... }
}
Error responses include an error message:
{
"success": false,
"error": "Error description"
}
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing authentication |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Rate Limiting
API requests are rate-limited to ensure fair usage:
- 100 requests per minute per API key
- Rate limit headers are included in responses:
X-RateLimit-Limit: Maximum requests per windowX-RateLimit-Remaining: Requests remaining in current windowX-RateLimit-Reset: Unix timestamp when the window resets
Pagination
List endpoints support pagination with these query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-indexed) |
limit | integer | 20 | Items per page (max 100) |
Paginated responses include:
{
"success": true,
"data": [...],
"pagination": {
"page": 1,
"limit": 20,
"total": 150,
"total_pages": 8
}
}
Versioning
The API is versioned through the URL path. The current version is v1 (implicit in /api).
Next Steps
- Authentication - Learn how to authenticate requests
- Organizations - Manage organizations
- Cases - Create and manage cases
- Files - Upload and manage files
- Reports - Generate reports