API Reference
Programmatically manage your documentation, embed AI chat, and integrate with your workflows.
What can you do with the API?
Manage Documentation
Create, update, and delete pages programmatically from your CI/CD pipeline.
Embed AI Chat
Add the AI chat widget to your own website or app.
Webhooks
Get notified when docs are updated, feedback is submitted, or questions are asked.
Build Integrations
Connect AlgoQuill with Slack, Discord, Notion, or your custom tools.
Base URL
https://api.algoquill.ai/v1
Authentication
All API requests require authentication using an API key. Include your key in the Authorization header.
curl https://api.algoquill.ai/v1/projects \ -H "Authorization: Bearer YOUR_API_KEY"
Get your API key: Dashboard → Settings → API Keys → Generate New Key
API access is available on Pro plans and above.
Embed Widget
Add the AlgoQuill AI chat widget to your own website or application. The widget allows your users to ask questions about your documentation directly from your site.
Quick Integration
Add this script tag to your website's HTML, just before the closing </body> tag:
<script src="https://algoquill.ai/embed.js" data-project-id="YOUR_PROJECT_ID" data-api-key="YOUR_PUBLIC_API_KEY" async ></script>
Where to find these values:
- Project ID: Dashboard → Select your project → Settings → Project ID
- Public API Key: Dashboard → Settings → API Keys → Generate a "Public" key (safe to expose in frontend code)
Why Two Keys?
| Key Type | Use Case | Permissions |
|---|---|---|
| Public Key | Embed widget, AI chat from your website | Read-only access, AI chat queries |
| Secret Key | Server-side integrations, CI/CD | Full read/write access |
⚠️ Security Warning: Never expose your Secret API key in frontend code. Only use Public keys in browser-facing applications.
Projects
/projectsList all projects in your workspace.
Response
{
"projects": [
{
"id": "proj_abc123",
"name": "My Docs",
"slug": "my-docs",
"status": "published",
"created_at": "2024-01-15T10:30:00Z"
}
]
}/projectsCreate a new documentation project.
Request Body
{
"name": "My New Docs",
"slug": "my-new-docs",
"description": "Documentation for my API"
}Pages
/projects/:id/pagesList all pages in a project.
/projects/:id/pagesCreate a new page.
Request Body
{
"title": "Getting Started",
"slug": "getting-started",
"content": "# Getting Started\n\nWelcome to our docs!",
"status": "draft"
}AI Chat
Query the AI assistant programmatically. Useful for building custom chat interfaces or integrations.
/ai/chatSend a question and get an AI-powered answer based on your documentation.
Request Body
{
"projectId": "proj_abc123",
"message": "How do I authenticate with the API?"
}Response
{
"message": "To authenticate, include your API key in the Authorization header...",
"sources": [
{ "title": "Authentication", "href": "/docs/authentication" }
]
}Rate Limits
| Plan | API Requests/min | AI Queries/month |
|---|---|---|
| Free | 60 | 100 |
| Starter | 120 | 1,000 |
| Pro | 300 | 10,000 |
| Enterprise | Custom | Unlimited |
Error Handling
The API returns standard HTTP status codes. Error responses include a message explaining what went wrong.
{
"error": "Invalid API key",
"code": "UNAUTHORIZED",
"status": 401
}SDKs
Official SDKs are coming soon for popular languages:
Need Help?
If you have questions about the API or need help with integration, reach out to us at support@algoquill.ai