Skip to content

Standard API — Developer Reference

Base URL: https://standard-api.bekaa.eu

Version: v1 — All endpoints are prefixed with /api/v1


Standard is an API-first SaaS platform for executing security, compliance, and maturity assessments based on the Secure Controls Framework (SCF). The API covers the full assessment lifecycle — from document ingestion, knowledge base construction, SCF analysis, framework mapping, scope/SoA drafting, Gap Analysis, Maturity Assessment, POA&M planning, to final report generation.

LayerTechnologyPurpose
API GatewayCloudflare WorkersEdge-deployed REST API
DatabaseNeon PostgreSQLTransactional store for all entities
StorageCloudflare R2Document storage, reports, evidences
Vector SearchCloudflare VectorizeSemantic search for knowledge base
AI GatewayCloudflare AI GatewayLLM orchestration with observability
Async ProcessingCloudflare QueuesDocument ingestion, embeddings, reports

All protected endpoints require a valid session. Authentication is handled via Standard Native Auth session cookies or API Keys (M2M).

MethodHeaderFormat
Browser SessionCookiestandard-native-auth.session_token=<token>
API Key (M2M)AuthorizationBearer standard_live_<key>

Most endpoints require a tenant/organization context, sent via header:

x-standard-tenant-id: <organization_id>

This is automatically set from the active organization in the user’s session.

{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable description.",
"details": [],
"trace_id": "abc123"
}
}
CodeHTTPDescription
UNAUTHORIZED401Missing or invalid authentication
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource does not exist
TENANT_CONTEXT_REQUIRED400Missing tenant header
VALIDATION_ERROR400Invalid request body/params
RATE_LIMIT_EXCEEDED429Too many requests

Basic health check. No auth required.

Versioned health check. No auth required.

Response:

{ "ok": true, "service": "standard-api-standard", "trace_id": "..." }

2. SCF Catalog (Secure Controls Framework)

Section titled “2. SCF Catalog (Secure Controls Framework)”

The SCF catalog is the normative data layer. All controls, domains, frameworks, requirements, and mappings are version-controlled.

EndpointMethodDescription
/api/v1/scf/versionsGETList all SCF versions
/api/v1/scf/versions/latestGETGet the latest active SCF version
/api/v1/scf/versions/:scfVersionIdGETGet a specific SCF version
/api/v1/scf/versions/:scfVersionId/domainsGETList SCF domains for a version
/api/v1/scf/versions/:scfVersionId/controlsGETSearch controls (query params: control_code, domain_code, q, tags)
EndpointMethodDescription
/api/v1/scf/controls/:controlIdGETGet control by ID
/api/v1/scf/controls/by-code/:controlCodeGETGet control by code (?version=<id>)
/api/v1/scf/controls/:controlId/mappingsGETGet framework mappings for control
/api/v1/scf/frameworksGETList all frameworks
/api/v1/scf/frameworks/:frameworkIdGETGet framework by ID
/api/v1/scf/frameworks/:frameworkId/requirementsGETList framework requirements
/api/v1/scf/frameworks/:frameworkId/coverageGETGet coverage summary (?scf_version=<id>)
/api/v1/scf/requirements/:requirementId/mappingsGETGet mappings for a requirement
EndpointMethodDescriptionPermission
/api/v1/admin/scf/import-runsPOSTImport SCF from structured sourcescf:import
/api/v1/admin/scf/import-runsGETList import runs
/api/v1/admin/scf/import-runs/:importRunIdGETGet import run details
/api/v1/admin/scf/import-xlsxPOSTUpload XLSX workbook (multipart)scf:import
/api/v1/admin/scf/import-xlsx/dry-runPOSTDry-run XLSX importscf:import

EndpointMethodDescription
/api/v1/tenantsGETList tenants
/api/v1/tenants/:tenantIdGETGet tenant
/api/v1/tenants/:tenantIdPUTUpdate tenant
EndpointMethodDescription
/api/v1/organizationsGETList organizations
/api/v1/organizations/:organizationIdGETGet organization details
EndpointMethodDescription
/api/v1/api-keysGETList API keys
/api/v1/api-keysPOSTCreate API key
/api/v1/api-keys/:keyIdDELETERevoke API key
/api/v1/api-keys/:keyId/rotatePOSTRotate API key

The core entity of the assessment lifecycle.

EndpointMethodDescription
/api/v1/assessmentsGETList assessments
/api/v1/assessmentsPOSTCreate assessment
/api/v1/assessments/:assessmentIdGETGet assessment
/api/v1/assessments/:assessmentIdPATCHUpdate assessment
/api/v1/assessments/:assessmentIdDELETEDelete assessment

Assessments transition through these states:

draft → documents_uploaded → documents_ingested → scf_pre_analysis_ready →
framework_selected → scope_drafted → soa_drafted → soa_under_review →
soa_approved → soa_ingested → evidence_analysis_ready →
gap_analysis_drafted → gap_analysis_under_review → gap_analysis_approved →
maturity_assessed → maturity_under_review → maturity_approved →
poam_drafted → poam_under_review → poam_approved →
report_generated → closed
EndpointMethodDescription
/api/v1/assessments/:assessmentId/lifecycle/eventsGETList lifecycle events
/api/v1/assessments/:assessmentId/lifecycle/transitionPOSTTrigger state transition

Upload, track, and manage client documents that feed the knowledge base.

EndpointMethodDescription
/api/v1/assessments/:assessmentId/documentsGETList documents
/api/v1/assessments/:assessmentId/documentsPOSTUpload document (multipart)
/api/v1/documents/:documentIdGETGet document metadata
/api/v1/documents/:documentIdDELETEDelete document
/api/v1/documents/:documentId/statusGETGet processing status
/api/v1/documents/:documentId/chunksGETGet document chunks
/api/v1/documents/:documentId/downloadGETDownload original file
/api/v1/documents/:documentId/reprocessPOSTRe-ingest document

Semantic search and evidence retrieval from ingested documents.

EndpointMethodDescription
/api/v1/kb/searchPOSTSemantic search across KB
/api/v1/kb/chunksGETList KB chunks
/api/v1/kb/chunks/:chunkIdGETGet chunk details
/api/v1/kb/statsGETKB statistics
/api/v1/kb/embeddings/statusGETEmbedding pipeline status
/api/v1/kb/documents/:documentId/chunksGETChunks for a document
{
"query": "How does the organization handle access control?",
"assessment_id": "...",
"top_k": 10,
"min_score": 0.7
}

7. Scope & Statement of Applicability (SoA)

Section titled “7. Scope & Statement of Applicability (SoA)”
EndpointMethodDescription
/api/v1/assessments/:assessmentId/scopeGETGet assessment scope
/api/v1/assessments/:assessmentId/scopePOSTCreate/update scope
/api/v1/scopes/:scopeIdGETGet scope detail
/api/v1/scopes/:scopeIdPATCHUpdate scope
/api/v1/scopes/:scopeId/submit-reviewPOSTSubmit scope for review
/api/v1/scopes/:scopeId/approvePOSTApprove scope
EndpointMethodDescription
/api/v1/assessments/:assessmentId/soa/draftPOSTGenerate SoA draft
/api/v1/assessments/:assessmentId/soaGETList SoA versions
/api/v1/soa/:soaVersionIdGETGet SoA version
/api/v1/soa/:soaVersionId/itemsGETList SoA items
/api/v1/soa/items/:soaItemIdPATCHUpdate SoA item
/api/v1/soa/:soaVersionId/submit-reviewPOSTSubmit for review
/api/v1/soa/:soaVersionId/approvePOSTApprove SoA
/api/v1/soa/:soaVersionId/evidence/refreshPOSTRefresh evidence links
/api/v1/soa/:soaVersionId/validationGETValidate SoA integrity
/api/v1/soa/:soaVersionId/regeneratePOSTRegenerate SoA

Identify control gaps between the SoA and evidence.

EndpointMethodDescription
/api/v1/assessments/:assessmentId/gap-analysis/draftPOSTGenerate gap analysis draft
/api/v1/assessments/:assessmentId/gap-analysisGETList gap analysis versions
/api/v1/gap-analysis/:gapVersionIdGETGet gap version
/api/v1/gap-analysis/:gapVersionId/findingsGETList gap findings
/api/v1/gap-analysis/findings/:findingIdPATCHUpdate finding
/api/v1/gap-analysis/:gapVersionId/submit-reviewPOSTSubmit for review
/api/v1/gap-analysis/:gapVersionId/approvePOSTApprove gap analysis
/api/v1/gap-analysis/:gapVersionId/summaryGETGet summary statistics
/api/v1/gap-analysis/:gapVersionId/regeneratePOSTRegenerate gap analysis

Remediation planning based on gap findings.

EndpointMethodDescription
/api/v1/assessments/:assessmentId/poam/draftPOSTGenerate POA&M draft
/api/v1/assessments/:assessmentId/poamGETList POA&M versions
/api/v1/poam/:poamVersionIdGETGet POA&M version
/api/v1/poam/:poamVersionId/itemsGETList POA&M items
/api/v1/poam/items/:poamItemIdPATCHUpdate item
/api/v1/poam/:poamVersionId/submit-reviewPOSTSubmit for review
/api/v1/poam/:poamVersionId/approvePOSTApprove POA&M
/api/v1/poam/:poamVersionId/summaryGETSummary statistics

Generate and export assessment reports in various formats.

EndpointMethodDescription
/api/v1/assessments/:assessmentId/reportsGETList generated reports
/api/v1/assessments/:assessmentId/reports/generatePOSTGenerate report
/api/v1/reports/:reportIdGETGet report metadata
/api/v1/reports/:reportId/downloadGETDownload report file
/api/v1/reports/:reportId/renderGETRender report HTML
/api/v1/assessments/:assessmentId/reports/executive-summaryGETExecutive summary

Human-in-the-loop approval gates for critical lifecycle transitions.

EndpointMethodDescription
/api/v1/assessments/:assessmentId/approvalsGETList approvals
/api/v1/approvals/:approvalIdGETGet approval
/api/v1/approvals/:approvalId/approvePOSTApprove
/api/v1/approvals/:approvalId/rejectPOSTReject with reason

Versioned artifacts produced during the assessment lifecycle.

EndpointMethodDescription
/api/v1/assessments/:assessmentId/artifactsGETList artifacts
/api/v1/artifacts/:artifactIdGETGet artifact
/api/v1/artifacts/:artifactId/versionsGETList artifact versions
/api/v1/artifacts/:artifactId/versions/:versionNumberGETGet specific version

Orchestrate AI agents for automated assessment analysis.

EndpointMethodDescription
/api/v1/agent-runsGETList agent runs
/api/v1/agent-runsPOSTStart agent run
/api/v1/agent-runs/:agentRunIdGETGet run status
/api/v1/agent-runs/:agentRunId/cancelPOSTCancel run
/api/v1/agent-runs/:agentRunId/outputGETGet run output
/api/v1/agent-runs/:agentRunId/stepsGETGet execution steps
AgentPurpose
knowledge-stewardOrganize KB and evidences
scf-control-analystAnalyze controls
framework-mapperConsult SCF mappings
scope-soa-architectPropose scope/SoA
evidence-analystClassify evidences
gap-analystPropose gaps
maturity-assessorSuggest maturity levels
poam-plannerPropose remediation
report-writerGenerate reports

Cloudflare Workflows for durable lifecycle orchestration.

EndpointMethodDescription
/api/v1/assessments/:assessmentId/workflows/lifecycle/startPOSTStart lifecycle workflow
/api/v1/assessments/:assessmentId/workflows/lifecycleGETGet workflow status
/api/v1/workflows/:workflowRunIdGETGet workflow run
/api/v1/workflows/:workflowRunId/cancelPOSTCancel workflow
/api/v1/workflows/:workflowRunId/resumePOSTResume workflow
/api/v1/workflows/:workflowRunId/signalsPOSTSend signal to workflow

Monitoring, metrics, and audit logging.

EndpointMethodDescription
/api/v1/observability/metricsGETGet platform metrics
/api/v1/observability/auditGETGet audit events
/api/v1/observability/alertsGETList alert rules
/api/v1/observability/alertsPOSTCreate alert rule
/api/v1/observability/healthGETDetailed service health

Configure event-driven integrations.

EndpointMethodDescription
/api/v1/organizations/:orgId/webhooksGETList webhooks
/api/v1/organizations/:orgId/webhooksPOSTCreate webhook
/api/v1/webhooks/:webhookIdGETGet webhook
/api/v1/webhooks/:webhookIdPATCHUpdate webhook
/api/v1/webhooks/:webhookIdDELETEDelete webhook
/api/v1/webhooks/:webhookId/deliveriesGETList delivery attempts

External service integrations.

EndpointMethodDescription
/api/v1/integrationsGETList integrations
/api/v1/integrationsPOSTCreate integration
/api/v1/integrations/:integrationIdGETGet integration
/api/v1/integrations/:integrationIdPATCHUpdate integration
/api/v1/integrations/:integrationIdDELETEDelete integration

Transactional email configuration.

EndpointMethodDescription
/api/v1/email/sendPOSTSend transactional email
/api/v1/email/templatesGETList email templates
/api/v1/email/templates/:templateIdGETGet template
/api/v1/email/templates/:templateIdPUTUpdate template

Route CategoryMax RequestsWindow
/documents3060s
/kb/search6060s
/agent-runs1060s
/render2060s
/admin/1560s
Default (all others)12060s

Allowed origins:

  • https://standard.bekaa.eu
  • https://standard-web.pages.dev
  • http://localhost:5173

Allowed headers: Content-Type, Authorization, X-Trace-Id, X-Tenant-Id, x-standard-tenant-id


Terminal window
# 1. Get an API key from the admin panel
# 2. List SCF frameworks
curl -H "Authorization: Bearer standard_live_YOUR_KEY" \
-H "x-standard-tenant-id: YOUR_ORG_ID" \
https://standard-api.bekaa.eu/api/v1/scf/frameworks
# 3. Create an assessment
curl -X POST \
-H "Authorization: Bearer standard_live_YOUR_KEY" \
-H "x-standard-tenant-id: YOUR_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"name": "ISO 27001 Assessment", "scf_version_id": "..."}' \
https://standard-api.bekaa.eu/api/v1/assessments
# 4. Upload a document
curl -X POST \
-H "Authorization: Bearer standard_live_YOUR_KEY" \
-H "x-standard-tenant-id: YOUR_ORG_ID" \
-F "file=@policy.pdf" \
https://standard-api.bekaa.eu/api/v1/assessments/ASSESSMENT_ID/documents

Standard API v1 • Built on Cloudflare Workers • SCF 2026.1.1