Run the DocStar API with an Auth Key
Everything you can do in DocStar is available through its API. If your AI assistant can't connect to the DocStar MCP server, or you want to script DocStar yourself, use an Auth Key and call the API directly.
1. Create an Auth Key
Only the workspace Owner can create one.
- Click your workspace name at the bottom of the left sidebar.
- Click Auth Key.
- Enter a Token Name, such as "AI assistant", and click Generate Token.
- Copy the token right away. It starts with
hm_and is shown only once.
The key belongs to that one workspace and has full access to its collections. Keep it in a secret store. Never paste it into a doc or commit it. Details, limits and revoking: API Tokens.
2. Send it with every request
Authorization: Bearer hm_your_token
A wrong or revoked key returns 403 Invalid API token.
3. Find your workspace id
Most routes need an orgId. The key is tied to one workspace, so ask DocStar which:
curl -s -X POST https://api.docstar.io/proxy/decode-token \
-H "Authorization: Bearer hm_your_token"
The response includes the workspace name and id (orgDetails).
4. Discover every API
The DocStar API publishes a machine-readable contract:
| What | URL |
|---|---|
| All modules (Collections, Pages, Endpoints, MCP Server, ...) | https://developers.docstar.io/module.json |
| One module's endpoints with method, URL, headers, params, body and sample responses | https://developers.docstar.io/<module path>/module.json |
| Plain-language index | https://developers.docstar.io/llms.txt |
Fetch the module index, pick the module that matches the task, then fetch that module's module.json. Each endpoint lists its method, url (with :orgId-style path variables), the required and optional parameters under cli.parameters, and a sample response.
5. Run an API
List the collections in your workspace:
curl -s https://api.docstar.io/orgs/YOUR_ORG_ID/collections \
-H "Authorization: Bearer hm_your_token"
Create a page, with a JSON body:
curl -s -X POST https://api.docstar.io/orgs/YOUR_ORG_ID/pages/PARENT_PAGE_ID \
-H "Authorization: Bearer hm_your_token" \
-H "Content-Type: application/json" \
-d '{"name": "Getting Started", "contents": "# Hello"}'
Fill path variables like :orgId and :pageId into the URL, send query parameters as usual and a JSON body where the endpoint documents one.
For AI assistants
Tell your assistant: "Read https://developers.docstar.io/module.json, find the right module, and call the DocStar API with this Auth Key." Give the key through the assistant's secret or environment settings, not in the chat when you can avoid it.
When the DocStar MCP server is connected, you don't need any of this: the assistant signs in through your browser instead. See Connect Your AI Assistant.