Skip to main content
Version: 1.0.0-beta

API Reference

Complete REST API documentation for AIIA backend.

Base URL

https://your-instance/api/v1

Authentication

MethodHeaderUse Case
Bearer TokenAuthorization: Bearer <jwt>User sessions (Keycloak OIDC)
API KeyAuthorization: Bearer <api_key>System integrations
Guest TokenX-Guest-Token: <token>PBC portal access
Debug AuthAuthorization: Bearer debug-<username>Development only

Core Endpoints

Engagements

MethodPathDescriptionAuth
GET/engagementsList engagements (filtered by org)Bearer
POST/engagementsCreate new engagementBearer
GET/engagements/{id}Get engagement detailsBearer
PUT/engagements/{id}Update engagementBearer
DELETE/engagements/{id}Delete draft engagementBearer
POST/engagements/{id}/transitionAdvance engagement stateBearer

Findings

MethodPathDescriptionAuth
GET/findingsList findingsBearer
POST/findingsCreate findingBearer
GET/findings/{id}Get finding detailsBearer
PUT/findings/{id}Update findingBearer
POST/findings/{id}/transitionAdvance finding stateBearer

Workpapers

MethodPathDescriptionAuth
GET/workpapersList workpapersBearer
POST/workpapersCreate workpaperBearer
GET/workpapers/{id}Get workpaper detailsBearer
PUT/workpapers/{id}Update workpaperBearer

Planning

MethodPathDescriptionAuth
GET/planning/plansList annual plansBearer
POST/planning/plansCreate annual planBearer
GET/planning/plans/{id}Get plan detailsBearer
GET/planning/resourcesResource availabilityBearer

Universe & Library

MethodPathDescriptionAuth
GET/universe/itemsList universe itemsBearer
POST/universe/itemsCreate universe itemBearer
GET/library/risksList risksBearer
GET/library/controlsList controlsBearer

Monitoring (KRI)

MethodPathDescriptionAuth
GET/monitoring/krisList KRIsBearer
POST/monitoring/krisCreate KRIBearer
POST/kri-builder/testTest KRI definitionBearer
GET/monitoring/alertsList alertsBearer

Reports

MethodPathDescriptionAuth
GET/reportsList reportsBearer
POST/reportsCreate reportBearer
POST/reports/{id}/exportExport as PDFBearer
GET/executive/board-packGet board packBearer

PBC / Portal

MethodPathDescriptionAuth
GET/pbc/requestsList PBC requestsBearer
POST/pbc/requestsCreate PBC requestBearer
GET/portal/requestsClient: view requestsGuest
POST/portal/uploadClient: upload evidenceGuest

AI Features

MethodPathDescriptionAuth
POST/chatAI companion chatBearer
POST/ai-assist/suggestGenerate AI suggestionBearer
POST/ai-features/scope-memoGenerate scoping memoBearer
POST/ai-features/cross-audit-summaryCross-audit analysisBearer
POST/doc-intelligence/analyzeDocument intelligenceBearer
POST/agentic-ai/taskAgentic AI taskBearer

Compliance

MethodPathDescriptionAuth
GET/compliance/frameworksList frameworksBearer
GET/nca/controlsNCA ECC controlsBearer
GET/pdpl/requirementsPDPL requirementsBearer

Administration

MethodPathDescriptionAuth
GET/usersList usersAdmin
POST/usersCreate userAdmin
GET/rbac/rolesList rolesAdmin
POST/rbac/rolesCreate roleAdmin
GET/audit-logsQuery audit logsAdmin
GET/ai-model-configsList AI modelsAdmin
POST/ai-model-configsAdd AI modelAdmin
GET/system/statusSystem statusBearer

Billing

MethodPathDescriptionAuth
GET/billing/tiersList subscription tiersPublic
POST/billing/subscribeCreate checkout sessionBearer
GET/billing/usageCurrent usage metricsBearer
POST/billing/pay/moyasarMoyasar paymentBearer
POST/billing/webhooks/stripeStripe webhookPublic
POST/billing/webhooks/moyasarMoyasar webhookPublic
POST/signupRegister new orgPublic
POST/signup/verify-emailVerify emailPublic

Response Format

All responses follow a consistent format:

{
"data": { ... },
"meta": {
"total": 100,
"page": 1,
"per_page": 20
}
}

Error Format

{
"detail": "Error description"
}

Common Status Codes

CodeMeaning
200Success
201Created
400Bad request (validation error)
401Unauthorized (missing/invalid token)
403Forbidden (insufficient permissions)
404Not found
409Conflict (duplicate)
429Rate limited
500Internal server error

OpenAPI Spec

Interactive API documentation available at:

  • Swagger UI: https://your-instance/api/v1/docs
  • ReDoc: https://your-instance/api/v1/redoc