API Routes Overview
Backflow provides 100+ built-in endpoints across multiple categories.
Core Endpoints
| Endpoint | Description |
|---|---|
GET /health | Health check |
GET /ui | Swagger UI documentation |
GET /doc | OpenAPI JSON spec |
Endpoint Categories
Agent System
17 endpoints for AI workflows, embeddings, and LLM. View Agent Endpoints →
LLM Streaming
Direct LLM chat with streaming. View LLM Endpoints →
File Management
6 endpoints for uploads, downloads, and entity files. View File Endpoints →
Tenant Management
Configuration, secrets, and usage tracking. View Tenant Endpoints →
Billing
Subscriptions, usage, and payments. View Billing Endpoints →
System
Health, info, cache, and queue management. View System Endpoints →
Authentication
Most endpoints require authentication:
bash
curl -X GET http://localhost:3000/api/endpoint \
-H "Authorization: Bearer <token>"Multi-Tenancy
Include tenant ID for multi-tenant operations:
bash
curl -X GET http://localhost:3000/api/endpoint \
-H "Authorization: Bearer <token>" \
-H "X-Tenant-ID: tenant-123"Error Responses
400 Bad Request
json
{
"error": "Bad Request",
"message": "Validation failed",
"details": [...]
}401 Unauthorized
json
{
"error": "Unauthorized",
"message": "Invalid or expired token"
}403 Forbidden
json
{
"error": "Forbidden",
"message": "Insufficient permissions"
}404 Not Found
json
{
"error": "Not Found",
"message": "Resource not found"
}429 Too Many Requests
json
{
"error": "Too Many Requests",
"message": "Rate limit exceeded",
"retryAfter": 45
}500 Internal Server Error
json
{
"error": "Internal Server Error",
"message": "An unexpected error occurred"
}Rate Limiting
Response headers include rate limit info:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1704067200Pagination
List endpoints support pagination:
bash
GET /api/items?limit=20&offset=0Response includes pagination info:
json
{
"data": [...],
"pagination": {
"limit": 20,
"offset": 0,
"total": 150
}
}OpenAPI Specification
Full API spec available at:
- Interactive UI:
/ui - JSON Spec:
/doc