API Reference


Endpoints Overview

MethodEndpointDescriptionAuth Required
GET/v1/_healthcheckCheck API availabilityNo
GET/v1/frameworksList available compliance frameworksYes
POST/v1/mapMap documents to framework controlsYes

Health Check

Check if the API is available and responding.

GET /v1/_healthcheck

Request

curl https://compliance.secberus.ai/v1/_healthcheck

Response

Status: 200 OK


List Frameworks

Retrieve all available compliance frameworks that can be used for document mapping.

GET /v1/frameworks

Request

curl -H "authorization: YOUR_API_KEY" \
  https://compliance.secberus.ai/v1/frameworks

Response

Status: 200 OK

[
  {
    "id": "pci_dss_v4",
    "name": "PCI DSS v4.0",
    "region": "Global",
    "controls": [
      {
        "id": "1.1.1",
        "title": "Roles and responsibilities for performing activities...",
        "description": "...",
        "family": "Build and Maintain a Secure Network",
        "family_id": "1",
        "category": "Network Security Controls",
        "framework_name": "PCI DSS v4.0",
        "framework_id": "pci_dss_v4"
      }
    ]
  },
  {
    "id": "nist_csf_v2",
    "name": "NIST Cybersecurity Framework v2.0",
    "region": "US"
  }
]

Framework Object

FieldTypeDescription
idstringUnique framework identifier (use this in map requests)
namestringHuman-readable framework name
regionstringGeographic region or applicability
controlsarrayList of controls within the framework (optional)

Control Object

FieldTypeDescription
idstringControl identifier within the framework
titlestringControl title
descriptionstringDetailed control description
familystringControl family name
family_idstringControl family identifier
categorystringControl category
framework_namestringParent framework name
framework_idstringParent framework identifier

Map Documents

Map one or more documents to controls across specified compliance frameworks. The API uses AI to analyze document content and find semantically similar framework controls.

POST /v1/map

Request Body

FieldTypeRequiredDescription
frameworksarray[string]YesFramework IDs to map against (from /v1/frameworks)
documentsarray[InputDocument]YesDocuments to map
min_similarityfloatNoMinimum similarity score (0.01-1.0). Results below this threshold are excluded.
min_confidencestringNoMinimum confidence level: High, Medium, Low, or Very Low. Mutually exclusive with min_similarity.
topkintegerNoMaximum controls to return per framework/document combination (default: 1)

InputDocument Object

FieldTypeRequiredDescription
idstringYesClient-generated unique identifier for the document
documentstringYesDocument text to map (limit ~250 words)
categorystringNoOptional category for the document
formatstringNoDocument format: plaintext (default) or json

Request Example

curl -X POST https://compliance.secberus.ai/v1/map \
  -H "authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "frameworks": ["pci_dss_v4"],
    "min_similarity": 0.3,
    "topk": 3,
    "documents": [
      {
        "id": "doc1",
        "document": "Organization must enforce password rotation. Password rotation must occur every 90 days."
      }
    ]
  }'

Response

Status: 200 OK

{
  "methods": ["semantic"],
  "messages": [
    {
      "severity": "info",
      "message": "Processing completed successfully"
    }
  ],
  "controls": [
    {
      "document_id": "doc1",
      "similarity": 0.87,
      "confidence": "High",
      "control": {
        "id": "8.3.9",
        "title": "Password/passphrase policies",
        "description": "If passwords/passphrases are used as authentication factors...",
        "family": "Identify Users and Authenticate Access",
        "family_id": "8",
        "category": "Authentication",
        "framework_name": "PCI DSS v4.0",
        "framework_id": "pci_dss_v4"
      }
    }
  ]
}

Response Fields

FieldTypeDescription
methodsarray[string]Mapping methods used
messagesarray[Message]Informational or warning messages
controlsarray[MapResult]Matched controls

MapResult Object

FieldTypeDescription
document_idstringID of the input document
similarityfloatSimilarity score (0.0-1.0)
confidencestringConfidence level: High, Medium, Low, or Very Low
controlControlMatched framework control

Message Object

FieldTypeDescription
severitystringwarning or info
messagestringMessage text

Error Responses

All endpoints return errors in RFC 7807 format:

{
  "requestid": "req-abc123",
  "link": "https://docs.secberus.com/errors/400",
  "http_status": 400,
  "title": "Bad Request",
  "detail": "Invalid framework ID: unknown_framework"
}

Error Codes

StatusDescription
400Bad Request - Invalid input parameters
403Forbidden - Invalid or missing API key
500Internal Server Error - Contact support if persistent