API REFERENCE

Admin API Reference

All endpoints require a valid JWT in the Authorization: Bearer <token> header except the auth endpoints.

Base URL: https://admin.novagate.dev (local dev: http://localhost:3001)

Authentication

/api/auth
POST/api/auth/register

Create a new tenant account.

Request Body

{ name, email, password }

Response

{ token, tenantId, gatewayApiKey }
POST/api/auth/login

Authenticate with email and password.

Request Body

{ email, password }

Response

{ token, tenantId }
POST/api/auth/forgot-password

Send a password reset email. Always returns 200 to prevent user enumeration.

Request Body

{ email }

Response

{ message }
POST/api/auth/reset-password

Reset password using the token from the email link.

Request Body

{ token, password }

Response

{ message }

Routes

/api/tenants/:tenantId
GET/api/tenants/:tenantId/routes

List all non-deleted routes for the tenant.

Request Body

Response

RouteEntity[]
POST/api/tenants/:tenantId/routes

Create a new route.

Request Body

{ method, pathPattern, serviceId, authRequired, rateLimitOverride?, enabled? }

Response

RouteEntity
PUT/api/tenants/:tenantId/routes/:id

Update an existing route. Accepts partial updates.

Request Body

Partial<RouteEntity>

Response

RouteEntity
DELETE/api/tenants/:tenantId/routes/:id

Soft-delete a route (sets deletedAt). Config is updated immediately.

Request Body

Response

204 No Content

Services

/api/tenants/:tenantId
GET/api/tenants/:tenantId/services

List all non-deleted services.

Request Body

Response

ServiceEntity[]
POST/api/tenants/:tenantId/services

Create a new downstream service.

Request Body

{ name, targetUrl, healthCheckPath?, timeoutMs? }

Response

ServiceEntity
PUT/api/tenants/:tenantId/services/:id

Update a service. Accepts partial updates.

Request Body

Partial<ServiceEntity>

Response

ServiceEntity
DELETE/api/tenants/:tenantId/services/:id

Soft-delete a service. All routes pointing to this service will fail until reassigned.

Request Body

Response

204 No Content

Consumers

/api/tenants/:tenantId
GET/api/tenants/:tenantId/consumers

List all active (non-revoked) consumers.

Request Body

Response

ConsumerEntity[]
POST/api/tenants/:tenantId/consumers

Create a consumer and generate an API key. Key is returned in plaintext once.

Request Body

{ name, rateLimitTier? }

Response

{ ...ConsumerEntity, apiKey: string }
DELETE/api/tenants/:tenantId/consumers/:id

Revoke a consumer (sets revokedAt). Their API key stops working immediately.

Request Body

Response

204 No Content

Analytics

/api/tenants/:tenantId
GET/api/tenants/:tenantId/logs?from=ISO&to=ISO&path=&statusCode=&consumerId=&page=

Paginated request logs. 50 per page.

Request Body

Response

RequestLog[]
GET/api/tenants/:tenantId/errors?resolved=false&page=

Paginated error events.

Request Body

Response

ErrorEvent[]
PATCH/api/tenants/:tenantId/errors/:id

Mark an error event as resolved.

Request Body

{ resolved: true }

Response

204 No Content
GET/api/tenants/:tenantId/health

Latest health snapshot per service (DISTINCT ON serviceId).

Request Body

Response

HealthSnapshot[]
GET/api/tenants/:tenantId/metrics?period=1h|24h|7d

Aggregated metrics snapshots for a time period.

Request Body

Response

MetricsSnapshot[]
GET/api/tenants/:tenantId/gateway-status

Whether the tenant's gateway is currently connected to the control plane.

Request Body

Response

{ tenantId, online: boolean }

Looking for the getting-started guide instead?

Read the Documentation →