Base URL
/api.
Authentication
API endpoints use API key authentication via header:Generate API Key
- Go to Answer Overflow Dashboard
- Navigate to Settings
- Click “Generate API Key”
- Copy and securely store your key
OpenAPI Specification
Answer Overflow provides OpenAPI 3.0 specifications for all endpoints.Get OpenAPI Spec
Get Mintlify-Compatible Spec
Message Endpoints
Update Message Solution
Mark or unmark a message as a solution.Discord message ID (snowflake as string)
Your Answer Overflow API key
Discord message ID to mark as solution, or
null to unmark the current solutionAlways
true on successError message describing what went wrong
/apps/main-site/src/app/(main-site)/api/[[...slugs]]/route.ts:122
Webhook Endpoints
Convex Webhooks
Receive webhooks from Convex database operations.Convex webhook signature for verification
- Database document created
- Database document updated
- Database document deleted
- Scheduled function completed
/apps/main-site/src/app/handlers/convex-webhooks.ts
GitHub Webhooks
Receive webhooks from GitHub for issue/PR synchronization.GitHub webhook signature (HMAC SHA256)
GitHub event type (e.g., “issues”, “pull_request”)
issues.opened- New issue createdissues.closed- Issue closedissues.reopened- Issue reopenedissue_comment.created- Comment added to issuepull_request.opened- PR openedpull_request.merged- PR merged
- Syncs Discord threads with GitHub issues
- Posts updates to Discord when issues are updated
- Tracks issue status in Answer Overflow
/apps/main-site/src/app/handlers/github-webhooks.ts
Authentication Endpoints
Better Auth
Answer Overflow uses Better Auth for authentication.GET /api/auth/signin- Sign in pagePOST /api/auth/signin/discord- Discord OAuth sign inPOST /api/auth/signin/github- GitHub OAuth sign inPOST /api/auth/signout- Sign outGET /api/auth/session- Get current sessionPOST /api/auth/callback/discord- Discord OAuth callbackPOST /api/auth/callback/github- GitHub OAuth callback
- Cookie name:
auth_session - HttpOnly: true
- Secure: true (production)
- SameSite: Lax
Content Endpoints
Message Markdown Export
Get a message rendered as Markdown.Discord message ID
text/markdown
Implementation: /apps/main-site/src/app/(main-site)/m/[messageId]/markdown/route.ts
User Comments
Get all comments/messages from a specific user.Discord user ID
Page number for pagination (default: 1)
Items per page (default: 50, max: 100)
/apps/main-site/src/app/(main-site)/u/[userId]/comments/route.ts
Sitemap & Robots
Dynamic Sitemap
Get XML sitemap for a specific server domain.application/xml
Implementation: /apps/main-site/src/app/[domain]/(content)/sitemap.xml/route.ts
Robots.txt
Get robots.txt for SEO crawlers.text/plain
Implementation: /apps/main-site/src/app/[domain]/(content)/robots.txt/route.ts
MCP (Model Context Protocol)
MCP Server Endpoint
Model Context Protocol endpoint for AI tools integration.Search for answers on Answer Overflow - a searchable archive of Discord help channels.Parameters:
query(string, required) - The search query (error messages, function names, concepts)serverId(string, optional) - Filter to specific Discord serverlimit(number, optional) - Max results (1-25, default 10)
Search for Discord servers indexed on Answer Overflow by name.Parameters:
query(string, optional) - Filter servers by namelimit(number, optional) - Max servers (1-100, default 25)
Get the full conversation of a thread including all messages.Parameters:
threadId(string, required) - The thread identifier
Find similar threads using semantic search.Parameters:
query(string, required) - The search querylimit(number, optional) - Max results
/apps/main-site/src/app/(main-site)/mcp/route.ts:36
Rate Limiting
API endpoints implement rate limiting to prevent abuse:Limits
- Authenticated Requests: 100 requests per minute
- Public Requests: 20 requests per minute
- Webhook Endpoints: No rate limit (signature verified)
Rate Limit Headers
Responses include rate limit information:Rate Limit Exceeded
429 Too Many Requests:Error Handling
All endpoints follow consistent error response format:Common Error Codes
UNAUTHORIZED- Missing or invalid authenticationFORBIDDEN- Insufficient permissionsNOT_FOUND- Resource not foundINVALID_INPUT- Invalid request parametersRATE_LIMITED- Rate limit exceededINTERNAL_ERROR- Server error
SDK & Client Libraries
TypeScript/JavaScript
Python
Webhooks (Outgoing)
Configure Answer Overflow to send webhooks to your endpoints when events occur.Setup
- Go to Dashboard Settings
- Navigate to “Webhooks”
- Add your webhook URL
- Select events to receive
Events
message.created- New message indexedmessage.updated- Message content changedsolution.marked- Solution marked on threadsolution.unmarked- Solution removed from threadthread.created- New thread indexedthread.archived- Thread archived