DocForge REST API
Build intelligent documentation search into your applications with our REST API. Query knowledge bases, manage projects, and access the public catalog.
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}'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.
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.
/v1/auth/github/v1/auth/tokenAPI Endpoints
/v1/auth/github/v1/auth/github/callback/v1/auth/github/reauthorize/v1/auth/token/v1/auth/me/v1/auth/logout/v1/projects/v1/projects/v1/projects/{id}/v1/projects/{id}/v1/projects/{id}/v1/projects/{id}/permissions/v1/projects/{id}/permissions/refresh/v1/projects/{id}/kbs/v1/projects/{id}/kbs/v1/projects/{id}/kbs/{topic}/v1/projects/{id}/kbs/{topic}/v1/projects/{id}/kbs/{topic}/query/v1/projects/{id}/kbs/{topic}/sync/v1/projects/{id}/kbs/{topic}/workflow/v1/projects/{id}/kbs/{topic}/upload-commands/v1/projects/{id}/kbs/{topic}/auto-sync/v1/projects/{id}/kbs/{topic}/auto-sync/v1/projects/{id}/kbs/{topic}/auto-sync/status/v1/catalog/v1/catalog/{topic}/v1/catalog/{topic}/query/v1/catalog/{topic}/add/v1/catalog/{topic}/star/v1/catalog/{topic}/star/v1/api-keys/v1/api-keys/v1/api-keys/{key_id}/v1/api-keys/{key_id}/v1/subscriptions/v1/subscriptions/v1/subscriptions/{id}/v1/github/repos/v1/github/repos/{owner}/{repo}/contents/v1/github/repos/{owner}/{repo}/check-docs/v1/github/repos/{owner}/{repo}/previewRate 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.
Rate limit headers are included in every response: X-RateLimit-Remaining, X-RateLimit-Reset
{
"detail": "Human-readable error message",
"error_code": "ERR_001", // Optional error code
"status_code": 400
}Common HTTP Status Codes
Ready to get started?
Create a free account and start building with the DocForge API today.