API Documentation Restructure Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.
Goal: Restructure the API Reference tab from a flat 61-tag auto-generated list into a curated hierarchical navigation with overview page, tag descriptions, code samples, and global anchors.
Architecture: Six changes to the Mintlify docs site: (1) API Reference overview page, (2) curated hierarchical endpoint groups in docs.json, (3) api.openapi root config, (4) tag descriptions in the OpenAPI spec, (5) x-codeSamples on key endpoints, (6) global navigation anchors. Changes 1-3 modify docs.json and add one MDX file. Changes 4-5 modify the OpenAPI spec via a post-processing script. Change 6 is a docs.json addition.
Tech Stack: Mintlify (MDX, docs.json), OpenAPI 3.0.1 JSON, Python 3.11+ (scripts)
Task 1: Create API Reference overview page
Files:
Create api-reference/overview.mdx with authentication guide, base URL, common patterns, and category map.
Run: head -5 api-reference/overview.mdx
Task 2: Add api.openapi to docs.json root config
Files:
Add "openapi": "api-reference/openapi.json" to the existing "api" block in docs.json.
Task 3: Build curated hierarchical navigation in docs.json
Files:
Replace the current API Reference tab:
{
"tab": "API Reference",
"groups": [
{ "group": "Endpoints", "openapi": "api-reference/openapi.json" }
]
}
With curated groups organizing the 61 tags into ~10 categories, each with nested subgroups. The openapi key on each group tells Mintlify which spec to use. Individual endpoints are listed as "METHOD /path" strings.
Categories:
- Overview — manual page (api-reference/overview)
- Cameras & Video — Camera Webservice, Video Webservice, Doorbell Camera Webservice, Export Webservice, Scene Query Webservice
- Audio — AudioGateway Webservice, AudioPlayback Webservice
- Access Control — Access Control Webservice, Door Webservice, Door Controller Webservice, Badge Reader Webservice, Lockdown Plan Webservice, Guest Management Kiosk Webservice
- Sensors & Environment — Climate Webservice, IoT Integrations Webservice, Sensor Webservice, Button Webservice, BLE Webservice, Proximity Webservice
- Events & Alerts — Event Webservice, Alert Monitoring Webservice, Alarm Monitoring Keypad Webservice, Incident Management Integrations Webservice, Event Search Webservice
- Analytics & AI — Face Recognition Matchmaker Webservice, Face Recognition Person Webservice, Face Recognition Event Webservice, Vehicle Webservice, Search Webservice, Occupancy Webservice, Logistics Webservice
- Users & Organization — User Webservice, User Metadata Webservice, Permission Webservice, Org Webservice, Location Webservice, Customer Webservice, Partner Webservice
- Integrations — Integrations Webservice, Access Control Integrations Webservice, Storage Integrations Webservice, Service Management Integrations Webservice, Webhook Integrations Webservice, Org Integrations Webservice
- Platform & Config — Component Webservice, Policy Webservice, Rules Webservice, Rules Records Webservice, Schedule Webservice, License Webservice, Feature Webservice, Device Config Webservice, Media Device Webservice, Upload Webservice, Help Webservice, Developer Webservice, OAuth Webservice, TvOs Config Webservice, Report Webservice, Elevator Webservice, RapidSOS Webservice
Run: python3 -c "import json; json.load(open('docs.json')); print('Valid JSON')"
Task 4: Add tag descriptions to OpenAPI spec
Files:
Write a Python script that adds a tags array with descriptions for all 61 tags to the OpenAPI spec.
Run: python3 scripts/enrich-openapi-tags.py
Run: python3 -c "import json; spec=json.load(open('api-reference/openapi.json')); print(f'{len(spec.get(\"tags\",[]))} tags defined')"
Task 5: Add x-codeSamples to key endpoints
Files:
Write a Python script that adds x-codeSamples (cURL + Python) to ~10 high-value endpoints covering the most common use cases.
Run: python3 scripts/add-code-samples.py
Task 6: Add global navigation anchors
Files:
Add a global object with anchors for Changelog and Community to the navigation section.
Task 7: Validate everything
Run: python3 -c "import json; d=json.load(open('docs.json')); print('Valid'); print(f'Tabs: {len(d[\"navigation\"][\"tabs\"])}')"
Run: python3 -c "import json; s=json.load(open('api-reference/openapi.json')); print(f'Tags: {len(s.get(\"tags\",[]))}'); print(f'Paths: {len(s[\"paths\"])}')"
Run: mint broken-links (if available)Last modified on March 18, 2026