Skip to main content

API Overview

The Koveria REST API provides programmatic access to every platform capability — agents, teams, knowledge, compliance, MCPs, and more. Every action available in the GUI Portal is backed by an API endpoint.

Base URL

All endpoints are prefixed with /api/v1. Throughout this documentation, examples use the development base URL.

Development:  http://localhost:8000/api/v1
Staging: https://staging-api.koveria.ai/api/v1
Production: https://api.koveria.ai/api/v1

Request Lifecycle

Every API request flows through a deterministic middleware chain before reaching the route handler:

Middleware execution order: CORS → Auth → Rate Limit → Tenant Context → Route Handler


Authentication

The API supports four authentication methods. The right choice depends on your use case:

MethodHeaderUse CaseDetails
JWT TokenBearer <jwt>GUI Portal, browser appsKeycloak-issued, short-lived
API KeyBearer kov_...Agents, CI/CD, scriptsLong-lived, team-scoped
Portal JWTBearer <portal-jwt>SDK → Backend callsInternally signed, short-lived
Dev TokenBearer dev-tokenLocal development onlyDEBUG mode only
# Example: API Key authentication
curl -H "Authorization: Bearer kov_live_abc123..." \
https://api.koveria.ai/api/v1/agents

Full guide: Authentication


Response Format

All responses use a consistent JSON envelope.

Success Response:

{
"agents": [...],
"total": 42
}

Error Response:

{
"error": "RESOURCE_NOT_FOUND",
"message": "Agent 550e8400-... not found",
"details": {
"resource_type": "Agent",
"resource_id": "550e8400-e29b-41d4-a716-446655440000"
}
}

Full reference: Error Handling


Endpoint Catalog

All endpoints live under /api/v1. They are organized into logical groups:

Platform Services

EndpointMethodsDescription
/auth/loginPOSTLogin via username/password (ROPC → Keycloak)
/auth/registerPOSTRegister new user + create/join organization
/auth/refreshPOSTExchange refresh token for new access token
/auth/validate-keyPOSTIntrospect API key (internal, SDK use)
/healthGETBasic health check
/health/detailedGETInfrastructure service statuses
/meGETCurrent user profile

Agents

EndpointMethodsDescription
/agentsGET, POSTList / create agents
/agents/{id}GET, PATCH, DELETERead / update / delete agent
/agents/{id}/invalidate-cachePOSTClear portal schema cache
/agents/{id}/metricsGETAgent usage metrics
/agents/{id}/personasGET, POSTManage agent personas

Teams & Workspaces

EndpointMethodsDescription
/teamsGET, POSTList / create teams
/teams/{id}GET, PATCH, DELETERead / update / delete team
/teams/{id}/agentsGET, POSTTeam agent assignments
/workspacesGET, POSTList / create workspaces
/orgs/{org_id}/team-api-keysGET, POSTManage team API keys

Knowledge & RAG

EndpointMethodsDescription
/rag/queryPOSTQuery knowledge collections
/rag/collectionsGET, POSTList / create collections
/rag/collections/{id}GET, PATCH, DELETEManage collection
/rag/collections/{id}/chunksGETBrowse indexed chunks
/portal/knowledgeGETPortal knowledge endpoints
/local-indexerPOSTLocal indexer sync API

LLM & AI Services

EndpointMethodsDescription
/llm/completePOSTLLM completion (with tool calling)
/llm/modelsGETAvailable models
/llm-providersGET, POSTManage LLM provider configs
/llm-contractsGET, POSTLLM usage contracts
/memoryGET, POSTAgent memory store

MCPs (Model Context Protocol)

EndpointMethodsDescription
/mcpsGET, POSTList / register MCPs
/mcps/{id}GET, PATCH, DELETEManage MCP service
/mcp(SDK mount)SDK dual-mount for MCP clients
/sdk/mcp(SDK mount)SDK MCP endpoints

Compliance & Governance

EndpointMethodsDescription
/assessmentsGET, POSTRisk assessments
/complianceGETCompliance status
/controlsGET, POSTCompliance controls
/evidencesGET, POSTEvidence management
/evidence-typesGETEvidence type catalog
/questionnairesGET, POSTAssessment questionnaires

Operations

EndpointMethodsDescription
/deploymentsGET, POSTAgent deployments
/costsGETCost tracking & budgets
/auditGETAudit trail
/logsGETAgent runtime logs
/secretsGET, POSTSecrets management
/circuit-breakersGET, POSTCircuit breaker states
/runtimeGETAgent runtime status

Admin & Portal

EndpointMethodsDescription
/admin/*VariousOrganization admin endpoints
/portal/teamsGETList published teams (marketplace catalog)
/portal/discoverPOSTAI-powered team recommendations (LLM)
/portal/teams/{id}/chatPOSTChat with team orchestrator
/portal/teams/{id}/schemaGETAgent UI schema (RJSF)
/public/*VariousPublic endpoints (no auth)
/discover/teamsGETList published teams (M17 service registry)
/discover/teams/{slug}GETDeterministic team resolution by slug (M17)

Full reference with request/response examples: API Reference


Versioning

The API is versioned via the URL path (/api/v1). Breaking changes will introduce a new version (/api/v2), with a deprecation period for the previous version.

Current version: v1


Rate Limiting

Requests are rate-limited based on your tier:

TierRequests/minBurst
Free6010
Standard30050
Premium1,000100
Enterprise5,000500

Rate limit exceeded returns 429 Too Many Requests with a Retry-After header.

Full details: Rate Limits


Interactive Documentation

The API ships with built-in interactive documentation:

ToolURLDescription
Swagger UI/docsInteractive endpoint explorer
ReDoc/redocAlternative reference view
OpenAPI spec/openapi.jsonMachine-readable schema

Next Steps