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 TypeUse CasePermissions
Public KeyEmbed widget, AI chat from your websiteRead-only access, AI chat queries
Secret KeyServer-side integrations, CI/CDFull read/write access

⚠️ Security Warning: Never expose your Secret API key in frontend code. Only use Public keys in browser-facing applications.

Projects

GET/projects

List 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"
    }
  ]
}
POST/projects

Create a new documentation project.

Request Body

{
  "name": "My New Docs",
  "slug": "my-new-docs",
  "description": "Documentation for my API"
}

Pages

GET/projects/:id/pages

List all pages in a project.

POST/projects/:id/pages

Create 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.

POST/ai/chat

Send 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

PlanAPI Requests/minAI Queries/month
Free60100
Starter1201,000
Pro30010,000
EnterpriseCustomUnlimited

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:

JavaScript/TypeScriptPythonGoRubyPHP

Need Help?

If you have questions about the API or need help with integration, reach out to us at support@algoquill.ai