DocForge REST API

Build intelligent documentation search into your applications with our REST API. Query knowledge bases, manage projects, and access the public catalog.

Base URL: https://api.docforge.appVersion: v1Swagger UI
Quick Start
Get started with the DocForge API in minutes
API keys let you query public catalog KBs without a user session. Generate one in Settings → API Keys. Rate limits follow your plan.

Query a public catalog KB

# Query a public catalog KB using an API key (no login required)
curl -X POST "https://api.docforge.app/v1/catalog/python/query" \
  -H "X-API-Key: df_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "How do I use asyncio?", "max_results": 5}'
Authentication

DocForge supports two authentication methods depending on the use-case.

API Keys Recommended for integrations

Use API keys to query public catalog KBs from your own code — no user session needed. Rate limits follow your plan.

X-API-Key: df_live_YOUR_KEY

Generate keys in Settings → API Keys. Project-scoped keys may only be created by admins.

JWT Tokens Full API access

Use JWT tokens to access the full API — projects, custom KBs, subscriptions, etc. Obtain a token via GitHub OAuth or email/password.

Authorization: Bearer YOUR_TOKEN
GitHub OAuth: redirect to /v1/auth/github
Email/Password: POST to /v1/auth/token

API Endpoints

Authentication
GET/v1/auth/github
GET/v1/auth/github/callback
GET/v1/auth/github/reauthorize
POST/v1/auth/token
GET/v1/auth/me
POST/v1/auth/logout
Projects
GET/v1/projects
POST/v1/projects
GET/v1/projects/{id}
PUT/v1/projects/{id}
DELETE/v1/projects/{id}
GET/v1/projects/{id}/permissions
POST/v1/projects/{id}/permissions/refresh
Knowledge Bases
GET/v1/projects/{id}/kbs
POST/v1/projects/{id}/kbs
GET/v1/projects/{id}/kbs/{topic}
DELETE/v1/projects/{id}/kbs/{topic}
POST/v1/projects/{id}/kbs/{topic}/query
POST/v1/projects/{id}/kbs/{topic}/sync
GET/v1/projects/{id}/kbs/{topic}/workflow
GET/v1/projects/{id}/kbs/{topic}/upload-commands
POST/v1/projects/{id}/kbs/{topic}/auto-sync
DELETE/v1/projects/{id}/kbs/{topic}/auto-sync
GET/v1/projects/{id}/kbs/{topic}/auto-sync/status
Public Catalog
GET/v1/catalog
GET/v1/catalog/{topic}
POST/v1/catalog/{topic}/query
POST/v1/catalog/{topic}/add
POST/v1/catalog/{topic}/star
DELETE/v1/catalog/{topic}/star
API Keys
GET/v1/api-keys
POST/v1/api-keys
PATCH/v1/api-keys/{key_id}
DELETE/v1/api-keys/{key_id}
Subscriptions
GET/v1/subscriptions
POST/v1/subscriptions
DELETE/v1/subscriptions/{id}
GitHub Integration
GET/v1/github/repos
GET/v1/github/repos/{owner}/{repo}/contents
GET/v1/github/repos/{owner}/{repo}/check-docs
POST/v1/github/repos/{owner}/{repo}/preview
Rate Limiting

Rate limits apply per API key or per authenticated user, based on your plan. API key limits match the plan of the user who created the key.

60
requests/minute
Free
200
requests/minute
Starter / Builder
500
requests/minute
Pro
2000
requests/minute
Scale / Enterprise

Rate limit headers are included in every response: X-RateLimit-Remaining, X-RateLimit-Reset

Error Responses
All errors follow a consistent format
{
  "detail": "Human-readable error message",
  "error_code": "ERR_001",  // Optional error code
  "status_code": 400
}

Common HTTP Status Codes

200 OKSuccess
201 CreatedResource created
400 Bad RequestInvalid input
401 UnauthorizedMissing/invalid token
403 ForbiddenQuota exceeded
404 Not FoundResource not found
429 Too Many RequestsRate limited
500 Internal ErrorServer error

Ready to get started?

Create a free account and start building with the DocForge API today.