FormaOS Documentation
Comprehensive guides, tutorials, and API references to help you master the compliance operating system.
REST API v1
API Reference
Programmatic access to audit logs, compliance metrics, evidence, and tasks. All endpoints return JSON and require Bearer token authentication.
Authentication
All API requests require a valid Bearer token in the Authorization header. Tokens are issued as Supabase JWTs when a user authenticates. Include the token with every request.
# Include your Bearer token in every request
curl -X GET "https://api.formaos.com/v1/compliance" \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
-H "Content-Type: application/json"Rate Limiting
Requests are rate-limited per endpoint. Exceeding the limit returns a 429 status with a retryAfter timestamp.
Base URL & Security
All endpoints are served over HTTPS at the base URL below. Requests over plain HTTP are rejected.
https://api.formaos.com/v1Retrieve audit log entries for your organization. Returns a time-ordered list of actions, actors, and metadata for compliance tracking and investigation.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
action | string | Filter by action type (e.g. "policy.updated", "user.login") |
startDate | ISO 8601 | Return logs created on or after this timestamp |
endDate | ISO 8601 | Return logs created on or before this timestamp |
limit | integer | Maximum number of results (1-200)(default: 50) |
Request Example
curl -X GET \
"https://api.formaos.com/v1/audit-logs?limit=10&action=policy.updated" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json"Response 200 OK
{
"logs": [
{
"id": "log_9f8e7d6c",
"action": "policy.updated",
"target": "policy_abc123",
"actor_email": "admin@example.com",
"domain": "compliance",
"severity": "info",
"metadata": {
"field": "status",
"from": "draft",
"to": "active"
},
"created_at": "2026-02-10T14:32:00Z"
}
],
"total": 1,
"limit": 10,
"filters": {
"action": "policy.updated",
"startDate": null,
"endDate": null
}
}Error Responses
All errors return a JSON object with an error field describing the issue. Use the HTTP status code to determine the category.
{
"error": "Unauthorized - Bearer token required"
}{
"error": "Forbidden - Insufficient permissions"
}{
"error": "Rate limit exceeded",
"retryAfter": "2026-02-12T09:16:00Z"
}{
"error": "Internal server error"
}Can't find what you're looking for?
Our support team is here to help. Reach out for personalized guidance or schedule a technical consultation.
