Skip to main content

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

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing authentication
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal 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 window
    • X-RateLimit-Remaining: Requests remaining in current window
    • X-RateLimit-Reset: Unix timestamp when the window resets

Pagination

List endpoints support pagination with these query parameters:

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger20Items 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