REST APIv1 Specification

REST API Overview

The SICTACK REST API provides centralized policy management, human-in-the-loop approval triage, machine-to-machine tool interception, and tamper-evident audit logging for distributed AI agent deployments.

Base URLs & Environments

All API requests must be transmitted over HTTPS in production. Unencrypted HTTP traffic is rejected.

EnvironmentBase URLUsage
Production (Cloud)YOUR_SICTACK_API_URLLive multi-tenant API gateway backed by PostgreSQL.
Local Developmenthttp://localhost:8000Local FastAPI instance backed by SQLite or local PostgreSQL.

Test gateway connectivity with the unauthenticated health check endpoint:

Terminal
# Verify API gateway connectivity
curl -X GET "YOUR_SICTACK_API_URL/health"
Response
{
  "status": "healthy",
  "service": "SICTACK API",
  "version": "2.0.0",
  "database": "postgresql"
}

Versioning & Path Prefix

All functional operations are versioned under the /api/v1 path prefix. Backward-incompatible changes will be introduced under future version prefixes (/api/v2).

Request & Response Conventions

  • Content-Type: All POST, PUT, and PATCH request bodies must be JSON encoded with Content-Type: application/json.
  • Date-Time Formatting: All timestamps in requests and responses conform to ISO 8601 UTC strings (e.g. 2026-11-16T12:00:00Z).
  • Deterministic Field Naming: Request and response property keys strictly follow snake_case (e.g. action_hash, risk_score).

Authentication Overview

SICTACK uses dual authentication channels:

HUMAN / DASHBOARD USERS

JWT Bearer Session Tokens

Obtained via POST /api/v1/auth/login. Transmitted in the standard Authorization: Bearer <token> header.

MACHINE-TO-MACHINE AGENTS

SICTACK API Keys

Scoped API keys prefixed with ilk_live_.... Transmitted via the X-API-Key: <key> header.

Multi-Tenancy & Organization Scoping

Every user account and API key is associated with an organization (org_id). All policies, agents, approvals, intent contexts, audit records, and threat detections are partitioned by organization ID.

Tenant Scoping & Baseline Policies

SICTACK scopes policies, audit logs, agents, and approvals by tenant org_id. Shared default templates and baseline policies exist under default-org. In local development environments, unauthenticated requests fall back to default-org for backward-compatible demonstration.

HTTP Status Codes & Error Format

Errors return standardized JSON objects containing a detail property:

403 Forbidden
{
  "detail": "Action denied by security policy: tool 'drop_table' is forbidden."
}
StatusMeaningTypical Cause
200 OKSuccessRequest completed successfully.
201 CreatedCreatedResource created (e.g. policy, agent, API key).
204 No ContentNo ContentResource successfully deleted or revoked.
400 Bad RequestClient ErrorMalformed syntax or invalid query parameters.
401 UnauthorizedUnauthenticatedMissing or expired Bearer token or invalid API key.
403 ForbiddenPermission DeniedUser lacks required RBAC role (e.g. ADMIN required).
404 Not FoundNot FoundRequested resource does not exist in your organization.
422 UnprocessableSchema ValidationPydantic validation failure on request payload.
500 Server ErrorInternal ErrorUnexpected server fault (internal traces sanitized).

Rate Limits & Concurrency

The SICTACK backend currently does not enforce application-level token bucket rate limits in code. Rate limiting is not active by default in the application layer. For production deployments with high volume, configure a rate-limiting reverse proxy, API gateway, or cloud firewall (e.g. Cloudflare, AWS WAF, or Nginx) in front of the FastAPI backend.