Skip to main content
Documentation

API Docs

The API Docs service is a hosted API documentation platform. Define your API's endpoints, parameters, request/response examples, and general pages through the API or MCP tools. Minolith hosts the rendered documentation as a public page with theming, search, and navigation.

Base URL: https://api.minolith.io/v1/api-docs

Authentication: All endpoints require an API key via the Authorization header:

Authorization: Bearer mlth_your_api_key_here

Pricing:

Action Credits
API doc created 3
Page created 2
Resource group created 1
Endpoint created 3
All updates, reads, deletes Free
All sub-resource operations (headers, parameters, examples) Free

Core Concepts

API — Top-level container. A project can have multiple APIs (e.g. v2 active, v3 beta).

Page — General documentation page (Authentication, Pagination, Error Handling). Markdown content.

Resource Group — Organises related endpoints into collapsible sidebar sections (Users, Orders, Products).

Endpoint — Individual API operation with path, method, headers, parameters, request/response examples.

Parameters support nested objects via recursive children arrays. Any depth of nesting is supported.


Limits

Limit Value
API title 500 characters
API version 100 characters
API slug 200 characters, lowercase alphanumeric + hyphens, unique per project
API description 50,000 characters
Page title 500 characters
Page body 100,000 characters
Group name 200 characters
Endpoint path 500 characters
Endpoint summary 500 characters
Endpoint description 50,000 characters
Header name 200 characters
Parameter name 200 characters
Parameter enum_values 50 values, each max 200 characters
Tags per endpoint 20, each max 100 characters
Bulk operations 20 items per call

Endpoints

POST /v1/api-docs/

Create an API documentation set.

Request:

Field Type Required Description
title string yes API title (e.g. "Acme API")
version string yes API version (e.g. "v2")
slug string yes URL slug for the public page. Lowercase alphanumeric + hyphens.
status string no active, beta, deprecated, retired. Default: active
description string no Markdown overview of the API
base_url string no Base URL (e.g. "https://api.acme.com/v2")
auth_type string no bearer, api_key, basic, oauth, none. Default: bearer
auth_description string no Markdown. How authentication works.
is_public boolean no Publish at api-docs.minolith.io/{slug}. Default: false
theme string no minimal, developer, brand, docs, bare. Default: minimal

Response (201 Created):

{
  "data": {
    "id": "apd_a1b2c3d4e5f6",
    "title": "Acme API",
    "version": "v2",
    "status": "active",
    "description": "The Acme REST API.",
    "base_url": "https://api.acme.com/v2",
    "auth_type": "bearer",
    "auth_description": null,
    "slug": "acme-api-v2",
    "is_public": false,
    "theme": "minimal",
    "theme_settings": null,
    "public_url": null,
    "created_at": "2026-04-06 10:00:00",
    "updated_at": "2026-04-06 10:00:00"
  }
}

GET /v1/api-docs/

List all API documentation sets in the project. Returns summary data with endpoint, group, and page counts.

Query Parameters:

Parameter Description
status Filter by status (comma-separated for multiple)
limit Max results (default 20, max 100)
cursor Pagination cursor

GET /v1/api-docs/:id

Get a single API documentation set with counts.

PUT /v1/api-docs/:id

Update an API documentation set. Only provided fields are updated.

DELETE /v1/api-docs/:id

Delete an API documentation set. Cascades all content — pages, groups, endpoints, headers, parameters, and examples are all deleted.


Pages

POST /v1/api-docs/:api_id/pages

Create a general documentation page.

Request:

Field Type Required Description
title string yes Page title
body string yes Full page content in markdown
sort_order integer no Position in sidebar. Default: 0

Response (201 Created):

{
  "data": {
    "id": "adp_a1b2c3d4e5f6",
    "api_doc_id": "apd_a1b2c3d4e5f6",
    "title": "Authentication",
    "body": "All requests require a Bearer token...",
    "sort_order": 0,
    "created_at": "2026-04-06 10:00:00",
    "updated_at": "2026-04-06 10:00:00"
  }
}

GET /v1/api-docs/:api_id/pages

List all pages for an API doc, ordered by sort_order.

GET /v1/api-docs/:api_id/pages/:id

Get a single page.

PUT /v1/api-docs/:api_id/pages/:id

Update a page. Only provided fields are updated.

DELETE /v1/api-docs/:api_id/pages/:id

Delete a page.


Resource Groups

POST /v1/api-docs/:api_id/groups

Create a resource group.

Request:

Field Type Required Description
name string yes Group name (e.g. "Users", "Orders")
description string no Markdown description
sort_order integer no Position in sidebar. Default: 0

GET /v1/api-docs/:api_id/groups

List all groups with endpoint counts.

GET /v1/api-docs/:api_id/groups/:id

Get a single group.

PUT /v1/api-docs/:api_id/groups/:id

Update a group.

DELETE /v1/api-docs/:api_id/groups/:id

Delete a group. Endpoints in this group become ungrouped (not deleted).


Endpoints

POST /v1/api-docs/:api_id/endpoints

Create an endpoint with full detail. Headers, parameters (with nested children), request examples, and response examples can all be included in a single request.

Request:

Field Type Required Description
path string yes Endpoint path (e.g. "/users/:id")
method string yes GET, POST, PUT, PATCH, DELETE
group_id string no Resource group ID
summary string no One-line description
description string no Detailed markdown explanation
notes string no Rate limits, caching, side effects
warnings string no Destructive ops, breaking changes
is_deprecated boolean no Flag as deprecated
deprecation_note string no Migration guidance
sort_order integer no Position in list
tags array no Tags for filtering (max 20)
headers array no Request headers (see below)
parameters array no Parameters with nested children (see below)
request_examples array no Request examples (see below)
response_examples array no Response examples (see below)

Headers array:

[
  {
    "name": "Authorization",
    "description": "Bearer token.",
    "required": true,
    "example": "Bearer your_api_key"
  }
]

Parameters array (with nesting):

[
  {
    "name": "id",
    "location": "path",
    "type": "string",
    "required": true,
    "description": "User ID.",
    "example": "usr_a1b2c3"
  },
  {
    "name": "address",
    "location": "body",
    "type": "object",
    "description": "Billing address.",
    "children": [
      {
        "name": "street",
        "type": "string",
        "required": true
      },
      {
        "name": "country",
        "type": "object",
        "children": [
          { "name": "code", "type": "string", "example": "AU" }
        ]
      }
    ]
  }
]

Parameter fields: name (required), location (path, query, body — required for top-level, inherited for children), type (string, integer, boolean, number, array, object), required, description, default_value, example, enum_values (array of allowed values), children (nested parameters).

Request examples array:

[
  {
    "title": "Create a user",
    "description": "Minimal required fields.",
    "content_type": "application/json",
    "body": "{\n  \"name\": \"Jane\"\n}"
  }
]

Response examples array:

[
  {
    "status_code": 200,
    "title": "Success",
    "description": "Returns the user object.",
    "body": "{\n  \"id\": \"usr_a1b2c3\",\n  \"name\": \"Jane\"\n}",
    "headers": { "X-Request-Id": "abc-123" }
  },
  {
    "status_code": 404,
    "title": "Not Found",
    "body": "{\n  \"error\": { \"code\": \"not_found\" }\n}"
  }
]

Response (201 Created):

Returns the full endpoint with all sub-resources, including generated IDs for each header, parameter, and example. Parameters are returned as a nested tree.

GET /v1/api-docs/:api_id/endpoints

List endpoints. Returns summary data (path, method, summary, tags). Use the single endpoint GET for full detail.

Query Parameters:

Parameter Description
group_id Filter by group. Use ungrouped for endpoints without a group.
method Filter by HTTP method
limit Max results (default 20, max 100)
cursor Pagination cursor

GET /v1/api-docs/:api_id/endpoints/:id

Get full endpoint detail including headers, parameters (nested tree), request examples, and response examples.

PUT /v1/api-docs/:api_id/endpoints/:id

Update an endpoint. Only provided fields are updated. If headers, parameters, request_examples, or response_examples are provided, they fully replace the existing sub-resources.

DELETE /v1/api-docs/:api_id/endpoints/:id

Delete an endpoint and all sub-resources.


Bulk Operations

POST /v1/api-docs/:api_id/endpoints/bulk

Create up to 20 endpoints in a single call. Each endpoint uses the same format as the single create. Credits are charged per endpoint.

Request:

{
  "endpoints": [
    { "path": "/users", "method": "GET", "summary": "List users" },
    { "path": "/users/:id", "method": "GET", "summary": "Get user" },
    { "path": "/users", "method": "POST", "summary": "Create user" }
  ]
}

PUT /v1/api-docs/:api_id/endpoints/bulk

Update up to 20 endpoints. Each object must include id plus fields to update.


Individual Sub-Resources

For updating individual headers, parameters, or examples after creation:

Headers

POST   /v1/api-docs/endpoints/:endpoint_id/headers            Add a header        [free]
PUT    /v1/api-docs/endpoints/:endpoint_id/headers/:id         Update a header     [free]
DELETE /v1/api-docs/endpoints/:endpoint_id/headers/:id         Delete a header     [free]

Parameters

POST   /v1/api-docs/endpoints/:endpoint_id/parameters          Add a parameter    [free]
PUT    /v1/api-docs/endpoints/:endpoint_id/parameters/:id       Update             [free]
DELETE /v1/api-docs/endpoints/:endpoint_id/parameters/:id       Delete             [free]

Request Examples

POST   /v1/api-docs/endpoints/:endpoint_id/request-examples    Add               [free]
PUT    /v1/api-docs/endpoints/:endpoint_id/request-examples/:id Update            [free]
DELETE /v1/api-docs/endpoints/:endpoint_id/request-examples/:id Delete            [free]

Response Examples

POST   /v1/api-docs/endpoints/:endpoint_id/response-examples   Add               [free]
PUT    /v1/api-docs/endpoints/:endpoint_id/response-examples/:id Update           [free]
DELETE /v1/api-docs/endpoints/:endpoint_id/response-examples/:id Delete           [free]

Public Hosted Page

Each API documentation set can be published at:

https://api-docs.minolith.io/{slug}

Set is_public to true to publish. When false, the URL returns 404. The API and MCP tools work regardless of public status.

Themes: minimal (default), developer (dark, monospace), brand (configurable accent colour and logo), docs (documentation style), bare (unstyled semantic HTML for custom CSS).

All themes support custom CSS via the theme_settings JSON field.


Error Responses

Code HTTP Message
api_doc_not_found 404 API documentation not found in this project.
page_not_found 404 Page not found.
group_not_found 404 Resource group not found.
endpoint_not_found 404 Endpoint not found.
slug_taken 422 This slug is already in use. Choose a different one.
invalid_method 422 Method must be GET, POST, PUT, PATCH, or DELETE.
invalid_status 422 Status must be active, beta, deprecated, or retired.
validation_error 422 Field-specific validation failure with details.
spending_cap_exceeded 429 Credit cap reached.

ID Prefixes

Entity Prefix Example
API doc apd_ apd_a1b2c3d4e5f6
Page adp_ adp_a1b2c3d4e5f6
Resource group adg_ adg_a1b2c3d4e5f6
Endpoint ade_ ade_a1b2c3d4e5f6
Header adh_ adh_a1b2c3d4e5f6
Parameter apm_ apm_a1b2c3d4e5f6
Request example adr_ adr_a1b2c3d4e5f6
Response example ads_ ads_a1b2c3d4e5f6

MCP Tools

Tool Description Credits
create_api_doc Create an API documentation set 3
get_api_doc Get API metadata and counts Free
list_api_docs List all APIs in the project Free
update_api_doc Update API metadata Free
create_page Create a documentation page 2
update_page Update a page Free
create_group Create a resource group 1
create_endpoint Create endpoint with full detail 3
update_endpoint Update endpoint and sub-resources Free
get_endpoint Get full endpoint detail Free
list_endpoints List endpoints (summary) Free
delete_endpoint Delete endpoint and sub-resources Free
bulk_create_endpoints Create up to 20 endpoints 3 each
bulk_update_endpoints Update up to 20 endpoints Free
search_docs Search across all content Free

Last updated: 6 Apr 2026