DocSite

API Overview

DocSite exposes a REST API for programmatic access to documentation content.

Base URL

https://api.your-domain.com/v1

Authentication

All requests require a Bearer token:

curl -H "Authorization: Bearer YOUR_TOKEN" \
     https://api.your-domain.com/v1/docs

List Documents

GET /docs?locale=en&version=v1

Response:

{
  "data": [
    {
      "slug": "introduction",
      "title": "Introduction",
      "version": "v1",
      "locale": "en"
    }
  ],
  "total": 3
}

Get a Document

GET /docs/{version}/{slug}?locale=en
Parameter Type Required Description
version string Yes v1, v2, or v3
slug string Yes Document slug
locale string No Language code (default: en)

Rate Limiting

100 requests per minute per IP. Exceeding this returns 429 Too Many Requests.

Error Format

{
  "error": {
    "code": "NOT_FOUND",
    "message": "The requested document does not exist."
  }
}

Status Codes

Code Description
200 Success
400 Invalid parameters
401 Unauthorized
404 Not found
429 Rate limit exceeded
500 Server error

Was this page helpful?