REST APIOverview

REST API

Programmatic access to read and update your documentation through the Documentation.AI REST API.

Overview

The Documentation.AI REST API provides programmatic access to your documentation project through a standard REST interface. You can read pages, search content, manage branches, and push file changes — the same operations available in the dashboard, accessible from your own scripts, CI/CD pipelines, or backend services.

The Documentation.AI REST API and the Authoring MCP Server cover largely the same documentation-management actions through different interfaces. Use the REST API when you need direct HTTP access from scripts, backends, or CI/CD, and use the Authoring MCP Server when you are working from an MCP-compatible AI client or agent.

Prerequisites

Before using the Documentation.AI REST API, make sure you have the following:

  1. A Documentation.AI account on the Standard plan or above
  2. A published documentation project with a connected repository
  3. Admin access to the organization that owns the documentation project (required to create API keys)

Getting Your API Key

  1. Open the Documentation.AI Dashboard
  2. Select the documentation project you want to access
  3. Go to Settings → API Keys
  4. Click Create Key
  5. Choose a name, role (Viewer, Editor, or Admin), and expiration
  6. Copy the generated key immediately — it will only be shown once

Store your API key securely. Do not commit it to version control or expose it in client-side code. Use environment variables or a secrets manager.

If you want AI-assisted authoring instead of direct HTTP requests, use the Authoring MCP Server. This page covers the REST API.

Base URL

https://api.documentationai.app/api/v1

Authentication

All requests require an API key passed as a Bearer token in the Authorization header.

curl https://api.documentationai.app/api/v1/pages \
  -H "Authorization: Bearer dai_your_api_key"

API keys are generated from the dashboard under Settings → API Keys. Each key is scoped to a single documentation project.

Roles and Permissions

Every API key carries a role that determines which endpoints are accessible.

RoleRead endpointsWrite endpoints
ViewerAll read endpointsNone
EditorAll read endpointsPush, branches, merge
AdminAll read endpointsAll write endpoints

Write endpoints return 403 Forbidden if the API key role does not have sufficient permissions.

Rate Limiting

Each API key has a per-minute request limit configured at creation time. Rate limit information is included in every response via headers:

HeaderDescription
x-ratelimit-limitMaximum requests per minute
x-ratelimit-remainingRequests remaining in the current window
x-ratelimit-resetUnix timestamp when the window resets
retry-afterSeconds to wait before retrying (only on 429 responses)

When the limit is exceeded, the API returns 429 Too Many Requests.

Quick Example

List all pages in your documentation:

curl https://api.documentationai.app/api/v1/pages \
  -H "Authorization: Bearer dai_your_api_key"

Push Changes

Create, update, or delete files in a single commit:

curl -X POST https://api.documentationai.app/api/v1/push \
  -H "Authorization: Bearer dai_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "commitMessage": "Update getting started guide",
    "operations": [
      {
        "type": "update",
        "path": "getting-started/quickstart.mdx",
        "content": "---
title: Quickstart
---

Updated content here."
      }
    ]
  }'

Pushing to the deployment branch (usually main) triggers a live deployment. Use a feature branch for draft changes, then merge when ready.

Endpoints

See the endpoint reference below for complete details on every available operation, including request parameters, response schemas, and examples.