Skip to content

Code examples

You can use the following examples to understand how to configure your documentation sites, manage sync schedules, and integrate API references. Note that programmatic API endpoints for documentation management are not available in the public repository.

User authentication and authorization

DocuBot uses Google Sign-In for primary workspace access. To ingest private repositories, you must authorize GitHub access through the settings panel.

Example: GitHub OAuth connection status

{
"githubConnected": true,
"githubUsername": "octocat",
"scope": "repo, read:user"
}

Expected result The dashboard displays your GitHub username and allows you to select private repositories as content sources.

Documentation site configuration

When you create a documentation project, you define its identity using a display name and a unique URL slug. The slug determines the public web address.

Example: Defining a project identity

{
"displayName": "Cortexa Platform",
"slug": "cortexa-platform"
}

Expected result Your documentation publishes to docubot.cc/cortexa-platform.

Sync schedule and frequency

You can automate documentation updates by setting a sync frequency. Updates occur at a specific local time based on your preferred time zone.

Example: Daily sync configuration

{
"syncFrequency": "daily",
"syncTimeLocal": "03:00",
"syncTimezone": "America/New_York"
}

Expected result DocuBot pulls the latest code and regenerates your documentation every day at 3:00 AM EST.

API reference and OpenAPI integration

DocuBot automatically detects public OpenAPI or Swagger specifications within your connected repositories. These specifications are rendered into interactive documentation pages.

Example: OpenAPI specification detection

Input: openapi.json
Detection: Valid OpenAPI 3.0 specification found.

Expected result An “API Reference” entry appears in your documentation sidebar, linking to an interactive Scalar viewer at /api-reference/openapi/openapi.

Advanced documentation inputs

You can guide the AI generation process by providing specific scenarios or known issues. This ensures that your How-to guides and workaround articles address your most important user needs.

Example: Scenario focus input

- Authenticating with a bearer token
- Creating a new document via the dashboard
- Exporting data to CSV format

Expected result The generated “Core scenario how-to” guide explicitly includes detailed steps for these three workflows.

Contact and support

If you need assistance with configuration or have questions about the documentation engine, please use the following channels.

Next steps: Quick start guide or Conceptual overview