# What is the agent? Source: https://mintlify-docs.mintlify.app/agent/index Automate documentation updates with the agent. Create updates from Slack messages, PRs, or API calls. The agent is available on [Enterprise plans](https://mintlify.com/pricing?ref=agent) for anyone with access to your dashboard. The agent is an AI tool that creates pull requests with proposed changes to your documentation based on your prompts. When you send a request, the agent: * **Researches**: Reads your existing documentation, any connected repositories, and relevant context. * **Plans**: Creates a structured task list for complex documentation work. * **Writes**: Generates or updates content following writing standards and best practices. * **Validates**: Runs Mintlify CLI checks to ensure documentation builds correctly. * **Creates a PR**: Opens a pull request with proposed changes for review. All changes go through pull requests. The agent never commits directly to your main branch. ## What you can do with the agent Use the agent to: * Write new content based on your prompts, pull requests, Slack threads, or file attachments. * Update existing documentation for new features or API changes. * Process and include images, diagrams, and other files from Slack attachments. * Search and revise code examples and API references across your docs. * Automate documentation maintenance with workflows. * Answer questions about your docs and technical writing topics. * Address code review feedback to maintain documentation quality. * Capture knowledge from Slack conversations and pull requests before it gets lost. * Navigate and coordinate changes across multiple files and directories efficiently. ## Where you can use the agent From any page in your dashboard, use the keyboard shortcut ⌘+I (macOS) or Ctrl+I (Windows/Linux) to open the agent panel. Or click **Ask agent** on the [Overview](https://dashboard.mintlify.com/) page. Add the agent to your Slack workspace and mention `@mintlify` in any channel. You can attach files and images directly to your messages for the agent to process. Embed the agent in custom applications using the [agent endpoints](/api/agent/create-agent-job). The agent panel open in the dashboard. The agent panel open in the dashboard. ## Connect your GitHub account By default, the agent opens pull requests attributed to the Mintlify bot. To attribute pull requests to you, connect your GitHub account on the [My profile](https://dashboard.mintlify.com/settings/account) page of the dashboard. ## Connect repositories as context The agent can only access repositories that you connect through the Mintlify GitHub App. Configure which repositories the agent can access in the agent panel **Settings** or in the [GitHub App settings](https://github.com/apps/mintlify/installations/new). ## Next steps Add the agent to your Slack workspace. Configure the agent with an `AGENTS.md` file. Get better results with focused prompts. Automate recurring tasks and documentation maintenance with workflows. # Add the agent to Slack Source: https://mintlify-docs.mintlify.app/agent/slack Use the agent in Slack to make documentation updates from conversations and capture team knowledge. If your Slack Workspace Owner requires admin approval to install apps, ask them to approve the Mintlify app before you connect it. ## Connect your Slack workspace Open the agent panel in your dashboard. The settings button in light mode. The settings button in dark mode. In the Slack integration section, click **Connect**. Follow the Slack prompts to add the `mintlify` app to your workspace. Follow the Slack prompts to link your Mintlify account to your Slack workspace. Test that the agent is working and responds when you: * Send a direct message to it. * Mention it with `@mintlify` in a channel. ## Use the agent in Slack Once connected, you can: * Send direct messages to the agent to use it privately to update your documentation. * Mention `@mintlify` in a channel to use it publicly and collaboratively. * Attach files and images directly to your messages for the agent to process and include in your docs. * Continue conversations in threads to iterate on changes. * Share pull request links with the agent to update related documentation. ## Update documentation Use the agent to update your documentation with a new request or in an existing thread. * **New request**: Send a direct message to the agent or mention `@mintlify` in a channel with instructions on what to update. * **Existing thread**: Reply in the thread and mention `@mintlify` with instructions on what to update. * **With attachments**: Upload images, diagrams, code files, or other documents with your message. The agent automatically processes and includes them in your documentation. The agent reads the context of the request or thread and creates a pull request in your connected repository with the updates. ## Best practices * **Be specific**: Tell the agent exactly what you want documented and where it should go. * **Add context**: If a thread doesn't contain all the necessary information, include additional details in your message to the agent. * **Review carefully**: You should always review pull requests that the agent creates before merging them. # Workflows Source: https://mintlify-docs.mintlify.app/agent/workflows Automate documentation maintenance with scheduled or event-triggered agent tasks. Workflows are in beta. They are currently available on [Enterprise plans](https://mintlify.com/pricing). [Contact us](mailto:gtm@mintlify.com) to enable workflows for your organization. Workflows run the agent automatically on a schedule or on a push to a repository. Each workflow defines a prompt for the agent and a trigger for when to run it. When a workflow runs, the agent clones any specified repositories as context, follows the prompt, and either opens a pull request or pushes changes directly to your deployment branch. You can have up to 10 active workflows. Each workflow can run up to 20 times a day. Runs that fail do not count toward this limit. Use workflows that run on a schedule to automate recurring tasks like publishing changelogs or checking for grammar and style issues. Use workflows that run on push events to automate reactive maintenance tasks like updating API references or identifying documentation updates needed for new features. ## Create a workflow ### Create a workflow in the dashboard On the [Workflows](https://dashboard.mintlify.com/products/workflows) page of your dashboard, click the **New workflow** button. The new workflow setup page. The new workflow setup page. ### Add a workflow file to your repository Create a `.md` file for each workflow in a `.mintlify/workflows/` directory at the root of your documentation repository. Each file defines one workflow. Workflow files use YAML frontmatter to configure the workflow, followed by a Markdown prompt for the agent. ```markdown .mintlify/workflows/update-changelog.md theme={null} --- name: Update changelog on: cron: "0 9 * * 1" context: - repo: your-org/your-product automerge: false --- Review all changes since the last changelog update. Draft a new changelog post with any new features, bug fixes, or breaking changes. Include information about what a change is and how it affects users. Do not include any internal-only information or minor changes like bumping package versions or updating documentation. Success criteria: Someone who reads the changelog knows the most up to date information about the product including what changed and whether or not it affects them. ``` ## Frontmatter fields | Field | Required | Description | | ----------- | -------- | -------------------------------------------------------------------------------------------------------------- | | `name` | Yes | Display name shown in the dashboard. | | `on` | Yes | Trigger configuration. | | `context` | No | Repositories cloned as reference when the workflow runs. | | `automerge` | No | Defaults to `false`, which opens a pull request. If `true`, pushes changes directly to your deployment branch. | You must have the Mintlify GitHub App installed on every repository listed in the `context` or `on.push.repo` fields. Add new repositories on the [GitHub app](https://dashboard.mintlify.com/settings/organization/github-app) page of your Mintlify dashboard. The GitHub app page showing connected repositories for two organizations. The GitHub app page showing connected repositories for two organizations in dark mode. ### Triggers Each workflow must define exactly one trigger using the `on` field. #### On schedule (cron) Run a workflow on a recurring schedule using a cron expression. All schedules run in UTC. Workflows queue within 10 minutes of the scheduled time and may take up to 10 minutes to run. ```yaml theme={null} on: cron: "0 9 * * 1" ``` The value is a standard 5-field cron expression in `minute hour day-of-month month day-of-week` format. Use a tool like [crontab.guru](https://crontab.guru) to build and validate schedules. | Expression | Schedule | | --------------- | --------------------------------------- | | `"0 9 * * 1"` | Every Monday at 9:00 AM UTC | | `"0 0 1 * *"` | First day of each month at midnight UTC | | `"0 8 * * 1-5"` | Weekdays at 8:00 AM UTC | #### On push events Run a workflow when changes push to a specific repository or branch. This includes both pull request merges and direct pushes to the branch. ```yaml theme={null} on: push: - repo: your-org/your-product branch: main ``` * `repo`: The GitHub repository in `owner/repo` format. * `branch` (optional): The branch to watch for pushes. If you don't specify a branch, the workflow triggers on pushes to the repository's default branch. A workflow can watch for pushes to multiple repositories or branches. ```yaml theme={null} on: push: - repo: your-org/your-product - repo: your-org/another-repo branch: release ``` ### Context repositories Use `context` to give the agent read access to additional repositories when the workflow runs. This is useful when your prompt requires reviewing code or content outside your documentation repository. ```yaml theme={null} context: - repo: your-org/your-product - repo: your-org/design-system ``` ### Auto-merge changes By default, the agent opens a pull request for each workflow run so you can review changes before they go live. Set `automerge: true` to push changes directly to your deployment branch without a pull request. ```yaml theme={null} automerge: true ``` ## Prompts Effective prompts focus on one task and have a specific outcome in mind. Workflows always have some variance because of the nondeterministic nature of agents, but you can improve the consistency of workflow outputs by following these best practices. * Describe the outcome you want the agent to achieve. * Include success criteria. * Specify the context you want the agent to use. * Split complex tasks into steps or multiple workflows. ## Example workflows ### Draft documentation for new features If you use agent suggestions in your dashboard, this workflow replicates that behavior. Add this workflow with any modifications for your project to automatically draft documentation as you add new features to your product. Runs when changes are pushed to your product repository to identify documentation updates needed for any new features or APIs introduced. ```markdown .mintlify/workflows/draft-feature-docs.md theme={null} --- name: Draft docs for new features on: push: - repo: your-org/your-product branch: main context: - repo: your-org/your-docs automerge: false --- Review the diff from the last merged PR in `your-org/your-product`. Identify any new features, APIs, or other changes that require documentation. For each new addition, draft documentation updates that explain what it does, when to use it, and how to configure it. Include a code example where relevant. Success criteria: After reading any new or updated documentation, users understand what the feature is, if it applies to tasks they do, and how to use it. ## Important - Only document changes that affect end users. Skip internal refactors or dependency updates. - Match the style and structure of existing docs pages. ``` ### Style audit Runs when changes push to your documentation repository to catch style guide violations before they accumulate. This example workflow automatically fixes style guide violations and lists any violations that require human judgment in the PR body. ```markdown .mintlify/workflows/style-audit.md theme={null} --- name: Style audit on: push: - repo: your-org/your-docs branch: main automerge: false --- Review all MDX files changed in the last merged PR against the style guide at `path/to/style-guide`. Open a pull request to resolve any style violations that can be fixed automatically. For any edits that require judgment or nuance, note them in the PR body with the specific lines, rule violations, and suggested fixes. Success criteria: - All style violations have a proposed resolution. - No new style violations are introduced. ## Important - Do not change content meaning. Only correct style violations. - Skip any files in language subdirectories (`es/`, `fr/`, `zh/`). ``` ### Update API reference Runs when pull requests merge to your product repository to keep API reference pages in sync with your product code. When endpoints or parameters change, this workflow updates the corresponding content in your documentation. ```markdown .mintlify/workflows/update-api-reference.md theme={null} --- name: Update API reference on: push: - repo: your-org/your-product branch: main context: - repo: your-org/your-docs automerge: false --- Review the diff from the last merged PR in `your-org/your-product` for changes to API endpoints, parameters, response shapes, or error codes. Update the corresponding API specifications or pages in the docs to reflect the changes. Include updated parameter descriptions, type information, and examples where affected. Success criteria: All API specifications and pages are up to date with the changes in the product repository. ## Important - If a parameter or endpoint was removed, mark it as deprecated rather than deleting it unless the code explicitly removes it with no deprecation period. - If no API changes were introduced, do nothing. ``` ### Track translation lag Run weekly to compare English source files against their translations and identify pages that have fallen behind. To use this workflow, update the example language subdirectories (`es/`, `fr/`, `zh/`) to your actual language subdirectories. ```markdown .mintlify/workflows/translation-lag.md theme={null} --- name: Track translation lag on: cron: "0 9 * * 3" --- Compare the English MDX files in the repo against their counterparts in the `es/`, `fr/`, and `zh/` subdirectories. Use git history to identify English files updated more recently than their translations. Open a pull request that lists pages that are out of sync, organized by language. For each page, include the date of the last English update and a brief summary of what changed so translators have context on what to update. Success criteria: Any discrepancies between the English and translated files are identified and listed in the pull request. ## Important - If a translated file does not exist, flag it as missing rather than out of sync. - Group findings by language, then by how far out of date they are (most stale first). ``` ### SEO and metadata audit Runs weekly to check for pages with missing or weak metadata and open a pull request with improvements. This example workflow checks for missing `description` frontmatter. Edit the workflow to check for other metadata or content issues that you prioritize for your documentation. ```markdown .mintlify/workflows/seo-audit.md theme={null} --- name: SEO and metadata audit on: cron: "0 9 * * 1" automerge: false --- Audit all MDX files in the docs for SEO and metadata quality. Check for: - Missing or empty `description` frontmatter - Descriptions that are too short (under 50 characters) or too long (over 160 characters) Open a pull request with improvements for any issues found. Write descriptions that accurately summarize the page content in plain language. Success criteria: All pages have up to date descriptions that accurately summarize the page content in plain language. ## Important - Only update frontmatter. Do not change page content. - If all pages have complete and reasonable metadata, do nothing. ``` # AI-native documentation Source: https://mintlify-docs.mintlify.app/ai-native Learn how AI enhances reading, writing, and discovering your documentation When you host your documentation on Mintlify, built-in AI features help your users find answers and your team maintain content more efficiently. Your content provides the context for these AI-native features to improve the experiences of reading, writing, and discovering your documentation. ## What makes your documentation AI-native ### Reading In addition to reading individual pages, users can chat with the [assistant](/ai/assistant) in your documentation for immediate answers to their questions and links to relevant content. The assistant helps guide users through your product with accurate information from your documentation. Embed the assistant into custom apps with the [API](/api/assistant/create-assistant-message) to extend where users can access your documentation. ### Writing The [agent](/agent) helps you write and maintain documentation. It creates pull requests with proposed changes based on your prompts, pull requests, and Slack threads. Add the agent to your Slack workspace so that anyone on your team can help maintain your documentation by chatting with the agent. Or embed the agent into custom apps via the [API](/api/agent/create-agent-job). Create [workflows](/agent/workflows) to run the agent on a schedule or on a push to a repository. Each workflow defines a prompt for the agent and a trigger for when to run it. Configure popular tools like [Cursor](/guides/cursor), [Claude Code](/guides/claude-code), and [Windsurf](/guides/windsurf) to reference the Mintlify schema, your style guide, and best practices. ### Discovering Your site is automatically optimized for AI tools and search engines to help users discover your documentation. All pages send their content as Markdown to AI agents instead of HTML, which helps these tools process your content faster and use fewer tokens. Every page is also available to view as Markdown by appending `.md` to the URL. Mintlify hosts `llms.txt` and `skill.md` files for your documentation. These industry-standard files help LLMs respond efficiently with relevant information to user queries and provide a list of capabilities for agents to use, so that users are more successful with your product. Your documentation site also hosts an MCP server that lets users connect your documentation directly to their AI tools for up to date information about your product directly where they want it. Full-text search and semantic understanding help users and AI tools find relevant information quickly. Search understands user intent rather than just matching keywords. And if a user encounters a 404 error, your site suggests related pages to help them find what they're looking for. No configuration required. ## Enable AI features Select any of the following cards for more information. Configure the assistant to search external sites or direct people to your support team if it can't answer their questions. Get documentation updates automatically on a schedule or when a push event occurs. Add a menu to pages that lets users query AI tools, connect to your MCP server, and copy pages as context with one click. # Assistant Source: https://mintlify-docs.mintlify.app/ai/assistant Add AI-powered chat to your docs that answers questions, cites sources, and generates code examples. The assistant is automatically enabled on [Pro and Enterprise plans](https://mintlify.com/pricing?ref=assistant). ## About the assistant The assistant answers questions about your documentation through natural language queries. Users access the assistant on your documentation site, so they can find answers quickly and succeed with your product even if they don't know where to look. The assistant uses agentic RAG (retrieval-augmented generation) with tool calling. When users ask questions, the assistant: * **Searches and retrieves** relevant content from your documentation to provide accurate answers. * **Cites sources** and provides navigable links to take users directly to referenced pages. * **Generates copyable code examples** to help users implement solutions from your documentation. You can view assistant usage through your dashboard to understand user behavior and documentation effectiveness. Export and analyze query data to help identify: * Frequently asked questions that might need better coverage. * Content gaps where users struggle to find answers. * Popular topics that could benefit from additional content. ### How indexing works The assistant automatically indexes your published documentation to answer questions accurately. When you publish changes, the assistant immediately indexes new, updated, or deleted content. The assistant does not index draft branches or preview deployments. By default, the assistant does not index hidden pages. To include hidden pages in the assistant's index, set `seo.indexing: "all"` in your `docs.json`. See [Hidden pages](/organize/hidden-pages#search-seo-and-ai-indexing) for more information. ### How the assistant handles unknown questions The assistant only answers questions based on information in your documentation. If it cannot find relevant information after searching, it responds that it doesn't have enough information to answer. You can [set a deflection email](/ai/assistant#set-deflection-email) so that the assistant provides your support email to users whose questions it cannot answer. This gives users a path forward, even if the documentation doesn't address their specific question. ## Configure the assistant The assistant is active on Pro and Enterprise plans by default. Manage the assistant from the [Assistant Configurations](https://dashboard.mintlify.com/products/assistant/settings) page of your dashboard. Enable or disable the assistant, configure response handling, add default questions, and manage your message allowance. ### Enable or disable the assistant Toggle the assistant status to enable or disable the assistant for your documentation site. The assistant status toggle in the dashboard. The assistant status toggle in the dashboard. ### Set deflection email In the Response Handling section, enable the assistant to redirect unanswered questions to your support team. Specify an email address for the assistant to give to users if it cannot answer their question. You can also enable a "Contact support" button to appear in the assistant chat panel. The assistant deflection panel in the dashboard. Assistant deflection is toggled on and support@mintlify.com is set as the deflection email. The assistant deflection panel in the dashboard. Assistant deflection is toggled on and support@mintlify.com is set as the deflection email. ### Search domains In the Response Handling section, configure domains that the assistant can use for web search to find additional context when answering questions. * Domains must be publicly available. * Domains that require JavaScript to load are not supported. The assistant search domains panel enabled in the dashboard. The assistant is configured to search the mintlify.com/pricing domain. The assistant search domains panel enabled in the dashboard. The assistant is configured to search the mintlify.com/pricing domain. For more precise control over what the assistant can search, use filtering syntax. * **Domain-level filtering** * `example.com`: Search only the `example.com` domain * `docs.example.com`: Search only the `docs.example.com` subdomain * `*.example.com`: Search all subdomains of `example.com` * **Path-level filtering** * `docs.example.com/api`: Search all pages under the `/api` subpath * **Multiple patterns** * Add multiple entries to target different sections of sites ### Add sample questions Help your users begin conversations with the assistant by adding starter questions. Add commonly asked questions or questions about topics that you want your users to know about. You can add up to 5 starter questions. Click **Ask AI** for recommended questions based on your documentation. The search suggestions panel in the dashboard with starter questions enabled and populated with three questions. The search suggestions panel in the dashboard with starter questions enabled and populated with three questions. ## Customize assistant behavior Add an `Assistant.md` (or `ASSISTANT.md`) file to your project to give the assistant custom instructions that shape how it responds. The assistant uses these instructions as system-level context for every response. Create the file at `.mintlify/Assistant.md` (or `.mintlify/ASSISTANT.md`) in your project root. Instructions in an `Assistant.md` file add to the assistant's system prompt. They do not replace or override the assistant's default instructions. To remove the custom instructions, remove the `Assistant.md` file. Use `Assistant.md` to: * Adjust the assistant's persona and tone * Provide product-specific context * Define support escalation paths * Specify terminology preferences * Restrict or scope the assistant's focus areas * Provide version-specific guidance ```markdown Example Assistant.md theme={null} You are a helpful assistant for Acme Corp's developer platform. ## Tone - Be concise and direct. Getting to the point helps people more than being exhaustive. - Use technical language appropriate for software developers. Most people asking you questions are familiar with Acme's products. ## Product context - Acme SDK v3 is the current stable release. v2 is deprecated. If people ask about v2, remind them it's deprecated but answer their questions. - Direct billing questions to support@acme.com. ## Terminology - Use "workspace" instead of "project" or "organization". - Use "access token" instead of "API key". ``` ## Manage billing The assistant uses tiered message allowances. A message is any user interaction with the assistant that receives a correct response. If you have unused messages, up to half of your message allowance can carry over to the next billing cycle. For example, if you have a 1,000 message allowance and you use 300 messages, 500 messages carry over to the next billing cycle giving you a total of 1,500 messages for the next billing cycle. By default, the assistant allows overages. You can disable overages to avoid incurring additional costs for usage beyond your tier. If you reach your message allowance with overages disabled, the assistant is unavailable until your message allowance resets. If you allow overages, each message beyond your allowance incurs an overage charge, but occasional overages may be cheaper than upgrading to a higher tier depending on your usage. ### Change your assistant tier Assistant tiers determine your monthly message allowance and pricing. View and change your current tier on the [Billing tab](https://dashboard.mintlify.com/products/assistant/settings/billing) of the assistant page in your dashboard. In the **Spending Controls** section, select your preferred tier from the dropdown menu. **Upgrade your tier:** * Your new message allowance is available immediately. * You pay a prorated difference for the current billing cycle. **Downgrade your tier:** * Your message allowance updates immediately. * Pricing changes take effect at the start of your next billing cycle. * Unused messages from your current tier **do not** carry over. ### Allow overages If you want to disallow overages, disable them in the **Billing Controls** section of the [Billing tab](https://dashboard.mintlify.com/products/assistant/settings/billing) of the assistant page in your dashboard. ### Set usage alerts In the Billing Controls section, set usage alerts to receive an email when you reach a certain percentage of your message allowance. ## Connect apps In the connect apps section, add the assistant to your [Discord](/ai/discord) server and [Slack](/ai/slack-bot) workspace to allow users to get answers from your documentation on those platforms. ## Assistant insights Use assistant insights to understand how users interact with your documentation and identify improvement opportunities. The [assistant page](https://dashboard.mintlify.com/products/assistant) shows usage trends for the month to date. View more detailed insights on the [analytics](/optimize/analytics#assistant) page. ## Make content AI ingestible Structure your documentation to help the assistant provide accurate, relevant answers. Clear organization and comprehensive context benefit both human readers and AI understanding. * Use semantic markup. * Write descriptive headings for sections. * Create a logical information hierarchy. * Use consistent formatting across your docs. * Include comprehensive metadata in page frontmatter. * Break up long blocks of text into shorter paragraphs. * Define specific terms and acronyms when first introduced. * Provide sufficient conceptual content about features and procedures. * Include examples and use cases. * Cross-reference related topics. * Add [hidden pages](/organize/hidden-pages) with additional context that users don't need, but the assistant can reference. ## Use the assistant Users have multiple ways to start a conversation with the assistant. Each method opens a chat panel on the right side of your docs. Users can ask any question and the assistant searches your documentation for an answer. If the assistant cannot retrieve relevant information, the assistant responds that it cannot answer the question. Add the assistant as a bot to your [Slack workspace](/ai/slack-bot) or [Discord server](/ai/discord) so that your community can ask questions without leaving their preferred platform. ### UI placement The assistant appears in two locations: as a button next to the search bar and as a bar at the bottom of the page. Search bar and assistant button in light mode. Search bar and assistant button in dark mode. Assistant bar in light mode. Assistant bar in dark mode. ### Keyboard shortcut Open the assistant chat panel with the keyboard shortcut Command + I on macOS and Ctrl + I on Windows. ### Highlight text Highlight text on a page and click the **Add to assistant** pop up button to open the assistant chat panel and add the highlighted text as context. You can add multiple text snippets or code blocks to the assistant's context. The Add to assistant button above highlighted text in light mode. The Add to assistant button above highlighted text in dark mode. ### Code blocks Click the **Ask AI** button in a code block to open the assistant chat panel and add the code block as context. You can add multiple code blocks or text snippets to the assistant's context. The Ask AI button in a code block in light mode. The Ask AI button in a code block in dark mode. ### URLs Open the assistant with a URL query parameter to create deep links that guide users to specific information or share assistant conversations with pre-filled questions. * **Open the assistant**: Append `?assistant=open` to open the assistant chat panel when the page loads. * Example: [https://mintlify.com/docs?assistant=open](https://mintlify.com/docs?assistant=open) * **Open with a pre-filled query**: Append `?assistant=YOUR_QUERY` to open the assistant and automatically submit a question. * Example: [https://mintlify.com/docs?assistant=explain webhooks](https://mintlify.com/docs?assistant=explain%20webhooks) ## Troubleshooting If the assistant UI is not visible in specific browsers, you may need to submit a false positive report to [EasyList](https://easylist.to). Browsers that use the EasyList Cookies List like Brave and Comet sometimes block the assistant or other UI elements. The EasyList Cookies List includes a domain-specific rule that hides fixed elements on certain domains to block cookie banners. This rule inadvertently affects legitimate UI components. Submit a false positive report to [EasyList](https://github.com/easylist/easylist) to request removal of the rule. This resolves the issue for all users once the filter list updates. # Discord bot Source: https://mintlify-docs.mintlify.app/ai/discord Add a bot to your Discord server that answers questions based on your documentation. Discord integrations are available on [Pro and Enterprise plans](https://mintlify.com/pricing?ref=discord) with access to the assistant. The Discord bot supports your community with real-time answers from your documentation. The bot uses the Mintlify assistant to search your docs and provide accurate, cited responses, so it is always up-to-date. The Discord bot only works in public channels. It replies to `@` mentions or to all messages in a specific channel. Each message sent by the Discord bot counts toward your assistant message usage. ## Add the Discord bot to your server You must have the "Manage Server" permission in Discord to add the bot. Go to the [Assistant](https://dashboard.mintlify.com/products/assistant) page in your dashboard. In the Discord card, click **Configure**. This opens Discord. The connected apps section of the assistant page. The connected apps section of the assistant page. In Discord, select the server you want to add the bot to and authorize the bot to access your server. Mention the bot to add it to a channel. The bot's default name is `@Mintlify Bot`. ## Create an `#ask-ai` channel To help your community quickly get answers to their questions, the bot can reply to every message in a channel that you choose. By default, the bot replies to every message in channels named `#ask-ai`. Create an `#ask-ai` channel and let your community know that the bot replies to messages in that channel. If you want the bot to reply to messages in a different channel, select a channel in the Discord bot [configuration menu](https://dashboard.mintlify.com/products/assistant/settings/integrations). The Discord configuration panel in light mode. The Discord configuration panel in dark mode. See [Starting Your First Discord Server](https://discord.com/blog/starting-your-first-discord-server) on the Discord blog for more information on creating a channel. ## Manage the Discord bot After you add the Discord bot to your server, you can manage or remove the bot from the [Integrations](https://dashboard.mintlify.com/products/assistant/settings/integrations) tab in your dashboard. In the Discord bot configuration menu, customize the bot by changing its avatar or name, and choose which channel it automatically replies to all messages in. # llms.txt Source: https://mintlify-docs.mintlify.app/ai/llmstxt Optimize your docs for LLMs to read and index. The [llms.txt file](https://llmstxt.org) is an industry standard that helps LLMs index content more efficiently, similar to how a sitemap helps search engines. AI tools can use this file to understand your documentation structure and find content relevant to user queries. Mintlify automatically hosts an `llms.txt` file at the root of your project that lists all available pages in your documentation. This file is always up to date and requires zero maintenance. You can optionally add a custom `llms.txt` file to the root of your project. If your site requires authentication to access your documentation, your `llms.txt` and `llms-full.txt` files are not available to LLMs and AI tools. LLMs and AI tools can only index publicly available content. View your `llms.txt` by appending `/llms.txt` to your documentation site's URL. ## llms.txt structure An `llms.txt` file is a plain Markdown file that contains: * **Site title** as an H1 heading. * **Structured content sections** with links and a description of each page in your documentation. * **API specification links** to your OpenAPI and AsyncAPI specs, if your documentation includes them. The `llms.txt` file lists your pages alphabetically in the order they appear in your repository, starting from the root directory. Each page's description comes from the `description` field in its frontmatter. For API reference pages, the description also includes the specification information from the `openapi` or `api` frontmatter field. Pages without a `description` field appear in the `llms.txt` file without a description. ```mdx Example llms.txt theme={null} # Site title ## Docs - [API](https://example.com/docs/api): Endpoint list and usage - [Install](https://example.com/docs/install): Setup steps - [Getting started](https://example.com/docs/start): Intro guide ## API specifications - [openapi](https://example.com/docs/openapi.json) - [asyncapi](https://example.com/docs/asyncapi.yaml) ``` This structured approach allows LLMs to efficiently process your documentation at a high level and locate relevant content for user queries, improving the accuracy and speed of AI-assisted documentation searches. ## llms-full.txt The `llms-full.txt` file combines your entire documentation site into a single file as context for AI tools and LLM indexing. Mintlify automatically hosts an `llms-full.txt` file at the root of your project. View your `llms-full.txt` by appending `/llms-full.txt` to your documentation site's URL. ## Custom files To add a custom `llms.txt` or `llms-full.txt` file, create an `llms.txt` or `llms-full.txt` file at the root of your project. Adding a custom file overrides the automatically generated file of the same name. If you delete a custom file, Mintlify restores the automatically generated file. Your custom `llms.txt` or `llms-full.txt` file must have a site title as an H1 heading. Other content is optional. See [Format](https://llmstxt.org/#format) in the `llms.txt` specification for more information on optional sections and best practices. # Model Context Protocol Source: https://mintlify-docs.mintlify.app/ai/model-context-protocol Connect your documentation and API endpoints to AI tools with a hosted MCP server. ## About MCP servers The Model Context Protocol (MCP) is an open protocol that creates standardized connections between AI applications and external services, like documentation. Mintlify generates an MCP server from your documentation, preparing your content for the broader AI ecosystem where any MCP client like Claude, Cursor, Goose, ChatGPT, and others can connect to your documentation. Your MCP server exposes a search tool for AI applications to query your documentation. Your users must connect your MCP server to their tools. ### How MCP servers work When an AI application connects to your documentation MCP server, it can search your documentation directly instead of making a generic web search in response to a user's prompt. Your MCP server provides access to all indexed content on your documentation site. * The AI application can proactively search your documentation while generating a response, not just when explicitly asked. * The AI application determines when to use the search tool based on the context of the conversation and the relevance of your documentation. * Each search (tool call) happens during the generation process, so the AI application searches up-to-date information from your documentation to generate its response. Some AI tools like Claude support both MCP and Skills. MCP gives the AI access to your documentation content, while Skills instruct the AI how to use that content effectively. They're complementary. MCP provides the data and Skills provide the instructions. ### Search filtering parameters The MCP search tool supports optional filtering parameters that AI applications can use to narrow search results. * **`version`**: Filter results to a specific documentation version. For example, `'v0.7'`. Only returns content tagged with the specified version or content available across all versions. * **`language`**: Filter results to a specific language code. For example, `'en'`, `'zh'`, or `'es'`. Only returns content in the specified language or content available across all languages. AI applications determine when to apply these filters based on the context of the user's query. For example, if a user asks about a specific API version, the AI application may automatically apply the appropriate filter to provide more relevant results. ### MCP compared to web search AI tools can search the web, but MCP provides distinct advantages for documentation. * **Direct source access**: Web search depends on what search engines have indexed, which may be stale or incomplete. MCP searches your current indexed documentation directly. * **Integrated workflow**: MCP allows the AI to search during response generation rather than performing a separate web search. * **No search noise**: SEO and ranking algorithms influence web search results. MCP goes straight to your documentation content. ## Access your MCP server MCP servers are available for public documentation and documentation using [partial authentication](/deploy/authentication-setup#make-pages-public). Your MCP server only searches public pages. Documentation that requires authentication for all pages cannot generate an MCP server. Mintlify automatically generates an MCP server for your documentation and hosts it at your documentation URL with the `/mcp` path. For example, Mintlify's MCP server is available at `https://mintlify.com/docs/mcp`. View and copy your MCP server URL on the [MCP server page](https://dashboard.mintlify.com/products/mcp) in your dashboard. MCP server page in the dashboard. MCP server page in the dashboard. Hosted MCP servers use the `/mcp` path in their URLs. Other navigation elements cannot use the `/mcp` path. ### Rate limits To protect availability, Mintlify applies rate limits to MCP servers. | Scope | Limit | Description | | :------------------------------ | :---------------------- | :----------------------------------------------------------------- | | Per user (IP address) | 200 requests per hour | Limits how frequently a single user can search your documentation. | | Per documentation site (domain) | 1,000 requests per hour | Limits total searches across all users of your MCP server. | ## Content filtering and indexing Your MCP server searches content that Mintlify indexes from your documentation repository. File processing and search indexing control what content is available through your MCP server. ### File processing with `.mintignore` If files match [.mintignore](/organize/mintignore) patterns, Mintlify does not process or index them. These files are not available through your MCP server. ### Search indexing with `docs.json` By default, Mintlify only indexes pages included in your `docs.json` navigation for search through your MCP server. Mintlify excludes [hidden pages](/organize/hidden-pages) (pages not in your navigation) from the search index unless you choose to index all pages. To include hidden pages in your MCP server's search results, add the `seo.indexing` property to your `docs.json`. ```json theme={null} "seo": { "indexing": "all" } ``` To exclude a specific page from search indexing, add `noindex: true` to its frontmatter. ```mdx theme={null} --- title: "Hidden page" description: "This page is not in the navigation and is not available through search." noindex: true --- ``` ## Use your MCP server Your users must connect your MCP server to their preferred AI tools. Publish your MCP server URL for users to access. Users copy your MCP server URL and add it to their AI tools. Once connected, users can search your documentation directly from their AI tools. These are some of the ways you can help your users connect to your MCP server: Add options in the [contextual menu](/ai/contextual-menu) for your users to connect to your MCP server from any page of your documentation. | Option | Identifier | Description | | :--------------------------- | :--------- | :---------------------------------------------------------- | | **Copy MCP server URL** | `mcp` | Copies your MCP server URL to the user's clipboard. | | **Copy MCP install command** | `add-mcp` | Copies the `npx add-mcp` command to install the MCP server. | | **Connect to Cursor** | `cursor` | Installs your MCP server in Cursor. | | **Connect to VS Code** | `vscode` | Installs your MCP server in VS Code. | Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL. Create a guide for your users that includes your MCP server URL and the steps to connect it to Claude. 1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings. 2. Select **Add custom connector**. 3. Add your MCP server name and URL. 4. Select **Add**. 5. When using Claude, select the attachments button (the plus icon). 6. Select your MCP server. See the [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server#connecting-to-a-remote-mcp-server) for more details. Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL. Create a guide for your users that includes your MCP server URL and the command to connect it to Claude Code. ```bash theme={null} claude mcp add --transport http ``` See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details. Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL. Create a guide for your users that includes your MCP server URL and the steps to connect it to Cursor. 1. Use Command + Shift + P (Ctrl + Shift + P on Windows) to open the command palette. 2. Search for "Open MCP settings". 3. Select **Add custom MCP**. This opens the `mcp.json` file. 4. In `mcp.json`, configure your server: ```json theme={null} { "mcpServers": { "": { "url": "" } } } ``` See the [Cursor documentation](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) for more details. Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL. Create a guide for your users that includes your MCP server URL and the steps to connect it to VS Code. 1. Create a `.vscode/mcp.json` file. 2. In `mcp.json`, configure your server: ```json theme={null} { "servers": { "": { "type": "http", "url": "" } } } ``` See the [VS Code documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details. ### Example: Connect to the Mintlify MCP server Connect to the Mintlify MCP server to search this documentation site within your preferred AI tool. This gives you more accurate answers about how to use Mintlify in your local environment and demonstrates how you can help your users connect to your MCP server. At the top of this page, select the contextual menu and choose **Connect to Cursor** or **Connect to VS Code** to connect the Mintlify MCP server to the IDE of your choice. To use the Mintlify MCP server with Claude: 1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings. 2. Select **Add custom connector**. 3. Add the Mintlify MCP server: * Name: `Mintlify` * URL: `https://mintlify.com/docs/mcp` 4. Select **Add**. 1. When using Claude, select the attachments button (the plus icon). 2. Select the Mintlify MCP server. 3. Ask Claude a question about Mintlify. See the [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server#connecting-to-a-remote-mcp-server) for more details. To use the Mintlify MCP server with Claude Code, run the following command: ```bash theme={null} claude mcp add --transport http Mintlify https://mintlify.com/docs/mcp ``` Test the connection by running: ```bash theme={null} claude mcp list ``` See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details. To connect the Mintlify MCP server to Cursor: 1. Use Command + Shift + P (Ctrl + Shift + P on Windows) to open the command palette. 2. Search for "Open MCP settings". 3. Select **Add custom MCP**. This opens the `mcp.json` file. In `mcp.json`, add: ```json theme={null} { "mcpServers": { "Mintlify": { "url": "https://mintlify.com/docs/mcp" } } } ``` In Cursor's chat, ask "What tools do you have available?" Cursor should show the Mintlify MCP server as an available tool. See [Installing MCP servers](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) in the Cursor documentation for more details. To connect the Mintlify MCP server to VS Code, create a `.vscode/mcp.json` file and add: ```json theme={null} { "servers": { "Mintlify": { "type": "http", "url": "https://mintlify.com/docs/mcp" } } } ``` See the [VS Code documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details. ### Using multiple MCP servers Users can connect multiple MCP servers to their AI tools. Connected MCP servers do not consume context until the AI calls a search tool. The AI decides when to search based on query relevance, so it doesn't search every connected server for every question. When the AI searches, each query returns multiple results that add to the conversation's context. If the AI searches several servers for a single question, this can use up significant context. Best practices for using multiple MCP servers: * Connect only the MCP servers relevant to your current work. * Be specific in your prompts so the AI searches the most relevant server. * Disconnect servers you're not actively using to reduce potential context usage. # skill.md Source: https://mintlify-docs.mintlify.app/ai/skillmd Make your docs agent-ready with a structured capability file. Mintlify hosts a `skill.md` file at the root of your project that describes what AI agents can do with your product. The [skill.md specification](https://agentskills.io/specification) is a structured, machine-readable format that makes capabilities, required inputs, and constraints for products explicit so that agents can use them more reliably. Mintlify automatically generates a `skill.md` file for your project by analyzing your documentation with an agentic loop. This file stays up to date as you make updates to your documentation and requires no maintenance. You can optionally add a custom `skill.md` file to the root of your project that overrides the automatically generated one. View your `skill.md` by appending `/skill.md` to your documentation site's URL. Mintlify only generates `skill.md` files for documentation sites that are public. Both `llms.txt` and `skill.md` files help agents work with your documentation, but they serve different purposes. * `llms.txt` is a directory. It lists all your documentation pages with descriptions so agents know where to find information. * `skill.md` is a capability summary. It tells agents what they can accomplish with your product, what inputs they need, and what constraints apply. ## Use `skill.md` files with agents If you use a [reverse proxy](/deploy/reverse-proxy), configure it to forward `/skill.md` and `/.well-known/skills/*` paths (with caching disabled) to your Mintlify subdomain. Agents can process your `skill.md` with the [skills CLI](https://www.npmjs.com/package/skills). ```bash theme={null} npx skills add https://your-docs-domain.com ``` This adds your product's capabilities to the agent's context so it can take actions on behalf of users. Teach your users how to use `skill.md` files with agents so that they have better results using your product with their AI tools. ## `skill.md` structure Mintlify generates a `skill.md` file following the [agentskills.io specification](https://agentskills.io/specification). The generated file includes: * **Metadata**: Project name, description, and version. * **Capabilities**: What agents can accomplish with your product. * **Skills**: Specific actions organized by category. * **Workflows**: Step-by-step procedures for common tasks. * **Integration**: Supported tools and services. * **Context**: Background on your product's architecture. ## Custom `skill.md` files Add a `skill.md` file to the root of your project to override the automatically generated file. If you delete a custom file, Mintlify generates a new `skill.md` file. Write a custom file when you want precise control over how agents interact with your product. Follow the [agentskills.io specification](https://agentskills.io/specification) to ensure compatibility with agent tooling. ### Frontmatter fields Custom `skill.md` files must start with YAML frontmatter. | Field | Type | Description | | --------------- | ------ | ----------------------------------------------------------------------------------- | | `name` | string | The name of your skill. | | `description` | string | A brief description of what your skill does. | | `license` | string | The license for your skill (for example, `MIT` or `Apache-2.0`). | | `compatibility` | string | Requirements or compatibility notes (for example, runtime dependencies). | | `metadata` | object | Additional metadata as string key-value pairs (for example, `author` or `version`). | | `allowed-tools` | string | Space-delimited list of pre-approved tools the skill may use (experimental). | ```md Example frontmatter theme={null} --- name: mintlify description: Build and maintain documentation sites with Mintlify. Use when creating docs pages, configuring navigation, adding components, or setting up API references. license: MIT compatibility: Requires Node.js for CLI. Works with any Git-based workflow. metadata: author: mintlify version: "1.0" --- ``` # Slack bot Source: https://mintlify-docs.mintlify.app/ai/slack-bot Add a bot to your Slack workspace that answers questions based on your documentation. The Slack app is available for [Pro and Custom plans](https://mintlify.com/pricing?ref=slack-app) with access to the assistant. The Slack app adds a bot to your workspace that supports your community with real-time answers. The bot uses the Mintlify assistant to search your docs and provide accurate, cited responses, so it is always up-to-date. The bot can only see messages in channels you specifically add it to. It does not have global read access to your workspace. The bot responds to `@` mentions or to all messages in a specific channel that you configure. Each message sent by the bot counts toward your assistant message usage. ## Set up the Slack app You can only install the Slack app once per workspace. If you have multiple Mintlify deployments, you can only connect one deployment at a time to a workspace. You must disconnect the app from one deployment before connecting it to another. If your Slack Workspace Owner requires admin approval to install apps, ask them to approve the Mintlify Slack app before you add it. Go to the [Assistant](https://dashboard.mintlify.com/products/assistant) page in your dashboard. In the Slack card, click **Configure**. This opens Slack. The connected apps section of the assistant page. The connected apps section of the assistant page. Follow the Slack prompts to add the app to your workspace. Mention the bot to add it to a channel. The bot's default name is `@mintlify-assistant`. ## Create an `#ask-ai` channel To help your users quickly get answers to their questions, the bot can reply to every message in a channel that you choose. By default, the bot replies to every message in channels named `#ask-ai`. Create an `#ask-ai` channel and let your users know that the bot replies to messages in that channel. See [Create a channel](https://slack.com/help/articles/201402297-Create-a-channel) in the Slack Help Center for more information. If you want the bot to reply to messages in a different channel, select a channel in the Slack bot [configuration menu](https://dashboard.mintlify.com/products/assistant/settings/integrations). The Slack configuration panel in light mode. The Slack configuration panel in dark mode. ## Manage the Slack app After you add the app to your workspace, you can manage or remove the app from the [Integrations](https://dashboard.mintlify.com/products/assistant/settings/integrations) tab. In the Slack bot configuration menu, customize the bot by changing its avatar or name, and choose which channel it automatically replies to all messages in. # AsyncAPI Setup Source: https://mintlify-docs.mintlify.app/api-playground/asyncapi-setup Create WebSocket documentation with AsyncAPI specifications for real-time API endpoints. AsyncAPI is a specification for describing asynchronous APIs, particularly WebSockets. Mintlify supports AsyncAPI 3.0 documents to generate interactive WebSocket documentation. ## Add an AsyncAPI specification file To create pages for your websockets, you must have a valid AsyncAPI schema document in either JSON or YAML format that follows the [AsyncAPI specification 3.0](https://www.asyncapi.com/docs/reference/specification/v3.0.0). Use the [AsyncAPI Studio](https://studio.asyncapi.com/) to validate your AsyncAPI schema. ```bash {3} theme={null} /your-project |- docs.json |- asyncapi.json ``` ## Auto-populate websockets pages To automatically generate pages for all channels in your AsyncAPI schema, add an `asyncapi` property to any navigation element. The `asyncapi` property accepts: * A path to an AsyncAPI schema document in your documentation repo * A URL to a hosted AsyncAPI document * An array of links to AsyncAPI schema documents ### Examples with tabs ```json theme={null} "navigation": { "tabs": [ { "tab": "API Reference", "asyncapi": "/path/to/asyncapi.json" } ] } ``` ```json theme={null} "navigation": { "tabs": [ { "tab": "API Reference", "asyncapi": "https://github.com/asyncapi/spec/blob/master/examples/simple-asyncapi.yml" } ] } ``` ```json theme={null} "navigation": { "tabs": [ { "tab": "API Reference", "asyncapi": [ "/path/to/events.json", "/path/to/webhooks.json" ] } ] } ``` When you specify multiple AsyncAPI files, each file generates its own set of channel pages. ### Examples with groups For more organization, use groups to structure your AsyncAPI documentation: ```json theme={null} "navigation": { "tabs": [ { "tab": "AsyncAPI", "groups": [ { "group": "Websockets", "asyncapi": { "source": "/path/to/asyncapi.json", "directory": "websockets" } } ] } ] } ``` The `directory` field is optional. If not specified, Mintlify adds the files to the `api-reference` folder of the docs repo. ## Channel page If you want more control over how you order your channels or if you want to reference only specific channels, create an MDX file with the `asyncapi` property in the frontmatter. ```mdx theme={null} --- title: "Websocket Channel" asyncapi: "/path/to/asyncapi.json channelName" --- ``` This approach allows you to: * Customize page metadata and titles * Add additional context and documentation around the channel * Control which channels appear in your documentation * Order channels manually in your navigation The channel name must exactly match the channel identifier in your AsyncAPI specification. # Create Manual API Pages Source: https://mintlify-docs.mintlify.app/api-playground/mdx-setup Document API endpoints manually with MDX files for full control over your API documentation. You can manually define API endpoints in individual MDX pages. This approach is useful for small APIs or prototyping. ## Setup In your `docs.json` file, define your base URL and authentication method. ```json Example docs.json theme={null} "api": { "mdx": { "server": "https://api.acme.com/", "auth": { "method": "key", "name": "x-api-key" } } } ``` If you want to hide the API playground, set the `display` field to `none`. You don't need to include an authentication method if you hide the playground. ```json theme={null} "api": { "playground": { "display": "none" } } ``` Find a full list of API configurations in [Settings](/organize/settings#api-configurations). Create an MDX file for each endpoint. Define the `title` and `api` in the frontmatter: ```mdx theme={null} --- title: 'Create new user' api: 'POST /v1/users' --- ``` The `api` frontmatter field accepts either a full URL or a relative path: * **Full URL** like `POST https://api.acme.com/v1/users`. The `server` field in `docs.json` is ignored for that endpoint. * **Relative path** like `POST /v1/users`. Requires a `server` field in `docs.json`. The server URL is prepended to the path. Specify path parameters by wrapping them in `{}`: ```bash theme={null} https://api.example.com/v1/endpoint/{userId} ``` To override the global playground display mode for a specific page, add `playground` to the frontmatter: ```mdx theme={null} --- title: 'Create new user' api: 'POST https://api.mintlify.com/user' playground: 'none' --- ``` **Options:** * `playground: 'interactive'` - Display the interactive playground (default) * `playground: 'simple'` - Display a copyable endpoint with no playground * `playground: 'none'` - Hide the playground entirely Use [parameter and response fields](/components/fields) to document your endpoint's parameters and return values. ```mdx theme={null} Unique identifier for the user User's email address Unique identifier for the newly created user User's email address ``` Add your endpoint pages to the navigation by updating the `pages` field in your `docs.json`: ```json docs.json theme={null} "navigation": { "tabs": [ { "tab": "API Reference", "groups": [ { "group": "Users", "pages": [ "api-reference/users/create-user", "api-reference/users/get-user", "api-reference/users/update-user" ] }, { "group": "Orders", "pages": [ "api-reference/orders/create-order", "api-reference/orders/list-orders" ] } ] } ] } ``` Each page path corresponds to an MDX file in your docs repository. For example, `api-reference/users/create-user.mdx`. ### Using OpenAPI endpoints in navigation If you have an OpenAPI specification, you can reference endpoints directly in your navigation without creating individual MDX files. ```json docs.json theme={null} "navigation": { "pages": [ "introduction", "/path/to/users-openapi.json POST /users", "/path/to/orders-openapi.json GET /orders" ] } ``` You can also set a default OpenAPI spec for a navigation group and reference endpoints by method and path: ```json docs.json theme={null} { "group": "API reference", "openapi": "/path/to/openapi-v1.json", "pages": [ "overview", "authentication", "GET /users", "POST /users", { "group": "Orders", "openapi": "/path/to/openapi-v2.json", "pages": [ "GET /orders", "POST /orders" ] } ] } ``` For more details on OpenAPI integration, see [OpenAPI setup](/api-playground/openapi-setup). ## Enable authentication You can set authentication globally in `docs.json` or override it on individual pages using the `authMethod` field in frontmatter. A page-specific method overrides the global setting. ### Bearer token ```json theme={null} "api": { "mdx": { "auth": { "method": "bearer" } } } ``` ```mdx theme={null} --- title: "Your page title" authMethod: "bearer" --- ``` ### Basic authentication ```json theme={null} "api": { "mdx": { "auth": { "method": "basic" } } } ``` ```mdx theme={null} --- title: "Your page title" authMethod: "basic" --- ``` ### API key ```json theme={null} "api": { "mdx": { "auth": { "method": "key", "name": "x-api-key" } } } ``` ```mdx theme={null} --- title: "Your page title" authMethod: "key" --- ``` ### None To disable authentication on a specific page, set `authMethod` to `none`: ```mdx Page Metadata theme={null} --- title: "Your page title" authMethod: "none" --- ``` # OpenAPI Setup Source: https://mintlify-docs.mintlify.app/api-playground/openapi-setup Generate API pages from your OpenAPI specification automatically. OpenAPI is a specification for describing APIs. Mintlify supports OpenAPI 3.0 and 3.1 documents to generate interactive API documentation and keep it up to date. ## Add an OpenAPI specification file To document your endpoints with OpenAPI, you need one or more valid OpenAPI specifications in either JSON or YAML format that follow the [OpenAPI specification 3.0 or 3.1](https://swagger.io/specification/). Add OpenAPI specifications to your documentation repository or host them online where you can access the specifications by URL. Specifications stored in your repository are served as downloadable files at their path on your docs domain. Mintlify supports `$ref` for **internal references only** within a single OpenAPI document. External references are not supported. ### Describe your API We recommend the following resources to learn about and construct your OpenAPI specification: * [Swagger's OpenAPI Guide](https://swagger.io/docs/specification/v3_0/basic-structure/) to learn the OpenAPI syntax * [The OpenAPI specification](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/) to reference details of the latest specification * [Swagger Editor](https://editor.swagger.io/) to edit, validate, and debug your OpenAPI document * [The Mint CLI](https://www.npmjs.com/package/mint) to validate your OpenAPI document with `mint openapi-check ` ### Specify the base URL for your API To enable the API playground, add a `servers` field to your OpenAPI specification with your API's base URL. ```json theme={null} { "servers": [ { "url": "https://api.example.com/v1" } ] } ``` In an OpenAPI specification, different API endpoints are specified by their paths, like `/users/{id}` or simply `/`. The base URL defines where these paths should be appended. The API playground uses these server URLs to determine where to send requests. If you specify multiple servers, a dropdown allows users to toggle between servers. If your API has endpoints that exist at different URLs, you can [override the servers field](https://swagger.io/docs/specification/v3_0/api-host-and-base-path/#overriding-servers) for a given path or operation. ### Specify authentication To enable authentication in your API documentation and playground, configure the `securitySchemes` and `security` fields in your OpenAPI specification. Add a `securitySchemes` field to define how users authenticate. This example shows a configuration for bearer authentication. ```json theme={null} { "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer" } } } } ``` Add a `security` field to require authentication. ```json theme={null} { "security": [ { "bearerAuth": [] } ] } ``` Common authentication types include: * [API Keys](https://swagger.io/docs/specification/authentication/api-keys/): For header, query, or cookie-based keys * [Bearer](https://swagger.io/docs/specification/authentication/bearer-authentication/): For JWT or OAuth tokens * [Basic](https://swagger.io/docs/specification/authentication/basic-authentication/): For username and password If different endpoints require different authentication methods, you can [override the security field](https://swagger.io/docs/specification/authentication/#:~:text=you%20can%20apply%20them%20to%20the%20whole%20API%20or%20individual%20operations) per operation. ## Customize your endpoint pages Customize your endpoint pages by adding the `x-mint` extension to your OpenAPI specification. The `x-mint` extension provides additional control over how your API documentation is generated and displayed. ### Metadata Override the default metadata for generated API pages by adding `x-mint: metadata` to any operation. You can use any metadata field that would be valid in MDX frontmatter except for `openapi`. ```json {7-13} theme={null} { "paths": { "/users": { "get": { "summary": "Get users", "description": "Retrieve a list of users", "x-mint": { "metadata": { "title": "List all users", "description": "Fetch paginated user data with filtering options", "og:title": "Display a list of users" } } } } } } ``` You can also control playground display per endpoint using the `playground` and `groups` metadata fields: ```json {7-11} theme={null} { "paths": { "/admin/users": { "post": { "summary": "Create admin user", "x-mint": { "metadata": { "playground": "auth", "groups": ["admin"], "public": true } } } } } } ``` This configuration makes the page publicly visible while restricting the interactive playground to authenticated users in the `admin` group. ### Content Add content before the auto-generated API documentation using `x-mint: content`. The `x-mint: content` extension supports all Mintlify MDX components and formatting. ```json {6-8} theme={null} { "paths": { "/users": { "post": { "summary": "Create user", "x-mint": { "content": "## Prerequisites\n\nThis endpoint requires admin privileges and has rate limiting.\n\nUser emails must be unique across the system." } } } } } ``` ### Href Set the URL of the autogenerated endpoint page using `x-mint: href`. When `x-mint: href` is present, the generated API page uses the specified URL instead of the default autogenerated URL. ```json {6-8} theme={null} { "paths": { "/legacy-endpoint": { "get": { "summary": "Legacy endpoint", "x-mint": { "href": "/deprecated-endpoints/legacy-endpoint" } } } } } ``` ## Auto-populate API pages Add an `openapi` field to any navigation element in your `docs.json` to automatically generate pages for OpenAPI endpoints. The `openapi` field accepts either a file path in your docs repo or a URL to a hosted OpenAPI document. To exclude specific endpoints from your auto-generated API pages, add the `x-hidden` property to the operation in your OpenAPI spec. There are two approaches for adding endpoint pages into your documentation: ### Dedicated API sections Generate dedicated API sections by adding an `openapi` field to a navigation element. All endpoints in the specification are included. ```json Single specification theme={null} "navigation": { "tabs": [ { "tab": "API Reference", "openapi": "openapi.json" } ] } ``` ```json Multiple specifications theme={null} "navigation": { "tabs": [ { "tab": "API Reference", "openapi": [ "openapi/v1.json", "openapi/v2.json" ] } ] } ``` To organize multiple OpenAPI specifications in separate sections, assign each specification to a different group: ```json {8-11, 15-18} theme={null} "navigation": { "tabs": [ { "tab": "API Reference", "groups": [ { "group": "Users API", "openapi": { "source": "/path/to/users-openapi.json", "directory": "users-api-reference" } }, { "group": "Admin API", "openapi": { "source": "/path/to/admin-openapi.json", "directory": "admin-api-reference" } } ] } ] } ``` The `directory` field is optional and specifies where generated API pages are stored in your docs repo. If not specified, defaults to the `api-reference` directory. ### Selective endpoints When you want more control over where endpoints appear in your documentation, you can reference specific endpoints in your navigation. #### Set a default OpenAPI spec Configure a default OpenAPI specification for a navigation element, then reference specific endpoints in the `pages` field: ```json {12, 15-16} theme={null} "navigation": { "tabs": [ { "tab": "Getting started", "pages": [ "quickstart", "installation" ] }, { "tab": "API reference", "openapi": "/path/to/openapi.json", "pages": [ "api-overview", "GET /users", "POST /users", "guides/authentication" ] } ] } ``` Any page entry matching the format `METHOD /path` generates an API page for that endpoint using the default OpenAPI specification. #### OpenAPI spec inheritance OpenAPI specifications are inherited down the navigation hierarchy. Child navigation elements inherit their parent's OpenAPI specification unless they define their own. ```json {3, 7-8, 11, 13-14} theme={null} { "group": "API reference", "openapi": "/path/to/openapi-v1.json", "pages": [ "overview", "authentication", "GET /users", "POST /users", { "group": "Orders", "openapi": "/path/to/openapi-v2.json", "pages": [ "GET /orders", "POST /orders" ] } ] } ``` ## Create MDX pages from your OpenAPI specification For more granular control over individual endpoint pages, create MDX pages from your OpenAPI specification. This lets you customize page metadata, content, and reorder or exclude pages in your navigation. ### Document endpoints Create a page for each endpoint and specify which OpenAPI operation to display using the `openapi` field in the frontmatter. ```mdx Example theme={null} --- title: "Get users" description: "Returns all plants from the system that the user has access to" openapi: "/path/to/openapi-1.json GET /users" deprecated: true version: "1.0" --- ``` ```mdx Format theme={null} --- title: "title of the page" description: "description of the page" openapi: openapi-file-path method path deprecated: boolean (not required) version: "version-string" (not required) --- ``` The method and path must exactly match your OpenAPI spec. #### Autogenerate endpoint pages To autogenerate MDX files from your OpenAPI specification, use the Mintlify [scraper](https://www.npmjs.com/package/@mintlify/scraping): ```bash theme={null} npx @mintlify/scraping@latest openapi-file -o ``` Add the `-o` flag to specify a folder to populate the files into. If a folder is not specified, the files populate in the working directory. ### Document data models Create a page for each data structure defined in your OpenAPI specification's `components.schemas` using the `openapi-schema` field in the frontmatter. ```mdx Example theme={null} --- openapi-schema: OrderItem --- ``` ```mdx With file path theme={null} --- openapi-schema: en-schema.json OrderItem --- ``` If you have schemas with the same name in multiple files, specify the OpenAPI file. ## Webhooks Webhooks are HTTP callbacks that your API sends to notify external systems when events occur. Webhooks are supported in OpenAPI 3.1+ documents. Add a `webhooks` field to your OpenAPI document alongside the `paths` field. To create an MDX page for a webhook (OpenAPI 3.1+), use `webhook` instead of an HTTP method: ```mdx theme={null} --- title: "Order updated webhook" description: "Triggered when an order is updated" openapi: "openapi.json webhook orderUpdated" --- ``` The webhook name must exactly match the key in your OpenAPI spec's `webhooks` field. # API Playground Source: https://mintlify-docs.mintlify.app/api-playground/overview Let developers test API endpoints directly in your documentation with interactive playgrounds. The API playground is an interactive environment that lets users test and explore your API endpoints. Developers can craft API requests, submit them, and view responses without leaving your documentation. API playground for the trigger an update endpoint. API playground for the trigger an update endpoint. The playground generates interactive pages for your endpoints based on your OpenAPI specification or AsyncAPI schema. If you modify your API, the playground automatically updates the relevant pages. We recommend generating your API playground from an OpenAPI specification. However, you can manually create API reference pages after defining a base URL and authentication method in your `docs.json`. ## Get started Validate your OpenAPI specification file using the [Swagger Editor](https://editor.swagger.io/) or [Mint CLI](https://www.npmjs.com/package/mint) command `mint openapi-check `. ```bash {3} theme={null} /your-project |- docs.json |- openapi.json ``` Update your `docs.json` to reference your OpenAPI specification. **To automatically generate pages for all endpoints in your OpenAPI specification**, add an `openapi` property to any navigation element. This example generates a page for each endpoint specified in `openapi.json` and organizes the pages in the "API reference" group. ```json Generate all endpoint pages theme={null} "navigation": { "groups": [ { "group": "API reference", "openapi": "openapi.json" } ] } ``` **To generate pages for only specific endpoints**, list the endpoints in the `pages` property of the navigation element. This example generates pages for only the `GET /users` and `POST /users` endpoints. To generate other endpoint pages, add additional endpoints to the `pages` array. ```json Generate specific endpoint pages theme={null} "navigation": { "groups": [ { "group": "API reference", "openapi": "openapi.json", "pages": [ "GET /users", "POST /users" ] } ] } ``` ## Customize your playground Customize your API playground by defining the following properties in your `docs.json`. ### Playground display Control how the API playground appears to users with the `playground.display` property: * `"interactive"`: Display the interactive playground (default) * `"simple"`: Display a copyable endpoint with no playground * `"none"`: Display nothing * `"auth"`: Display the interactive playground only to authenticated users ```json theme={null} { "api": { "playground": { "display": "interactive", "proxy": true } } } ``` The `proxy` option controls whether to pass API requests through a proxy server. Defaults to `true`. ### Example code snippets Configure the autogenerated API examples with the `examples` property: ```json theme={null} { "api": { "examples": { "languages": ["curl", "python", "javascript"], "defaults": "required", "prefill": true, "autogenerate": true } } } ``` **Available options:** * `languages`: Array of programming languages to show in code examples. Languages display in the order specified. * `defaults`: Whether to show optional parameters (`"all"`) or only required ones (`"required"`). Defaults to `"all"`. * `prefill`: Whether to prefill the API playground with data from schema examples. Defaults to `false`. * `autogenerate`: Whether to generate code samples from API specifications. Defaults to `true`. Supported languages include: cURL, Python, JavaScript, Node.js, PHP, Go, Java, Ruby, PowerShell, Swift, C#, .NET, TypeScript, C, C++, Kotlin, Rust, and Dart. ### Example configuration This example configures the API playground to be interactive with example code snippets for cURL, Python, and JavaScript. Only required parameters are shown in the code snippets, and the playground prefills the request body with example values. ```json theme={null} { "api": { "playground": { "display": "interactive" }, "examples": { "languages": ["curl", "python", "javascript"], "defaults": "required", "prefill": true } } } ``` ## Auth-based playground display Use the `auth` display mode to show the interactive playground only to authenticated users. This is useful when you want to let users view your API documentation publicly while restricting playground access to logged-in users. When `display` is set to `auth`: * Authenticated users see the interactive playground * Unauthenticated users see no playground (equivalent to `none`) You can also combine `auth` with the `groups` property in page frontmatter to restrict playground access to specific user groups. ```mdx Page with group-restricted playground theme={null} --- title: "Create user" openapi: POST /users playground: auth groups: ["admin", "developer"] public: true --- ``` In this example: * The page is publicly visible (anyone can view the documentation) * Only authenticated users in the `admin` or `developer` groups see the interactive playground * Users not in those groups see no playground The `auth` display mode requires [authentication](/deploy/authentication-setup) to be configured for your documentation. ## Custom endpoint pages When you need more control over your API documentation, use the `x-mint` extension in your OpenAPI specification or create individual MDX pages for your endpoints. Both options allow you to: * Customize page metadata * Add additional content like examples * Control playground behavior per page The `x-mint` extension is recommended so that all of your API documentation is automatically generated from your OpenAPI specification and maintained in one file. Individual MDX pages are recommended for small APIs or when you want to experiment with changes on a per-page basis. ## Further reading Learn how to create and configure your OpenAPI document Create manual API reference pages with MDX files Document WebSocket APIs with AsyncAPI schemas # Create agent job Source: https://mintlify-docs.mintlify.app/api/agent/create-agent-job Create an agent job to automatically edit your documentation This endpoint creates an agent job based on provided messages and branch information. The job executes asynchronously and returns a streaming response with the execution details and results. If a branch doesn't exist, the agent creates one. If files are edited successfully, a pull request is automatically created at the end of the job. ## Rate limits The agent API has the following limits: * 100 uses per Mintlify project per hour ## Suggested usage For best results, use the [useChat hook from ai-sdk](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat#usechat) to send requests and handle responses. ```bash cURL theme={null} curl -X POST https://api.mintlify.com/v1/agent/{projectId}/job \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "branch": "agent-update-docs", "messages": [ { "role": "user", "content": "Update the introduction page to include information about our new API endpoint" } ], "asDraft": false, "model": "sonnet" }' ``` ```javascript JavaScript theme={null} const response = await fetch( `https://api.mintlify.com/v1/agent/${projectId}/job`, { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ branch: 'agent-update-docs', messages: [ { role: 'user', content: 'Update the introduction page to include information about our new API endpoint' } ], asDraft: false, model: 'sonnet' }) } ); // The response is a streaming text response const reader = response.body.getReader(); const decoder = new TextDecoder(); while (true) { const { done, value } = await reader.read(); if (done) break; console.log(decoder.decode(value)); } ``` ```python Python theme={null} import requests response = requests.post( f"https://api.mintlify.com/v1/agent/{project_id}/job", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, json={ "branch": "agent-update-docs", "messages": [ { "role": "user", "content": "Update the introduction page to include information about our new API endpoint" } ], "asDraft": False, "model": "sonnet" }, stream=True ) # Stream the response for chunk in response.iter_content(chunk_size=None): if chunk: print(chunk.decode('utf-8'), end='') ``` ## Endpoint Your project ID. Can be copied from the [API keys](https://dashboard.mintlify.com/settings/organization/api-keys) page in your dashboard. ## Request Body The name of the Git branch that the agent should work on. Will be automatically created if it doesn't exist. A list of messages to provide to the agent. A default system prompt is always prepended automatically, so you typically only need to include user messages. The role of the message sender. Use `user` for task instructions. Use `system` to add supplementary instructions that are appended after the default system prompt (does not replace it). The content of the message. Control whether the pull request is created in draft or non-draft mode. When true, creates a draft pull request. When false (default), creates a regular pull request ready for review. The AI model to use for the agent job. Use `sonnet` for faster, cost-effective processing. Use `opus` for more capable, but slower processing. ## Response The endpoint returns a streaming text response containing the agent job execution details and results. The response includes an `X-Message-Id` header containing the message identifier for the created job. ```text Streaming Response theme={null} Agent job started... Reading documentation files... Updating introduction.mdx... Creating pull request... Pull request created: https://github.com/your-org/your-repo/pull/123 Agent job completed successfully. ``` ## Authentication This endpoint requires an admin API key (prefixed with `mint_`). Generate one on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. # Get agent job Source: https://mintlify-docs.mintlify.app/api/agent/get-agent-job Retrieve the details and status of a specific agent job This endpoint retrieves the details and status of a specific agent job by its unique identifier. Use this to check the progress, status, and results of a previously created agent job. ## Usage The response includes information such as: * Job execution status and completion state * Branch information and pull request details * Session metadata and timestamps ```bash cURL theme={null} curl -X GET https://api.mintlify.com/v1/agent/{projectId}/job/{id} \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```javascript JavaScript theme={null} const response = await fetch( `https://api.mintlify.com/v1/agent/${projectId}/job/${jobId}`, { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const job = await response.json(); console.log('Job status:', job.haulted ? 'Completed' : 'Running'); console.log('Pull request:', job.pullRequestLink); ``` ```python Python theme={null} import requests response = requests.get( f"https://api.mintlify.com/v1/agent/{project_id}/job/{job_id}", headers={ "Authorization": "Bearer YOUR_API_KEY" } ) job = response.json() print(f"Job status: {'Completed' if job['haulted'] else 'Running'}") print(f"Pull request: {job.get('pullRequestLink', 'N/A')}") ``` ## Endpoint Your project ID. Can be copied from the [API keys](https://dashboard.mintlify.com/settings/organization/api-keys) page in your dashboard. The unique identifier of the agent job to retrieve. ## Response The session ID for this job. The subdomain this session belongs to. Git branch name where changes were made. Whether the session execution was halted (completed). Reason for session halt. One of: `completed`, `github_missconfigured`, `error`. Link to the created pull request. Message for the user about the session outcome. List of todo items from the session. Brief description of the task. Current status of the task. One of: `pending`, `in_progress`, `completed`, `cancelled`. Priority level of the task. One of: `high`, `medium`, `low`. Unique identifier for the todo item. ISO 8601 timestamp when the session was created. ```json Response theme={null} { "sessionId": "abc123xyz789", "subdomain": "example", "branch": "agent-update-docs", "haulted": true, "haultReason": "completed", "pullRequestLink": "https://github.com/your-org/your-repo/pull/123", "messageToUser": "Successfully updated the introduction page with new API endpoint information.", "todos": [ { "content": "Update introduction.mdx with new API endpoint", "status": "completed", "priority": "high", "id": "todo-1" }, { "content": "Create pull request", "status": "completed", "priority": "medium", "id": "todo-2" } ], "createdAt": "2024-01-15T10:30:00.000Z" } ``` ## Authentication This endpoint requires an admin API key (prefixed with `mint_`). Generate one on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. # Get all agent jobs Source: https://mintlify-docs.mintlify.app/api/agent/get-all-jobs Retrieve all agent jobs for the specified domain This endpoint retrieves all agent jobs for the specified domain, providing an overview of all agent activities and their current status. This is useful for monitoring and managing multiple concurrent or historical agent jobs. ## Usage Use this endpoint to get a comprehensive view of all previous agent sessions. ```bash cURL theme={null} curl -X GET https://api.mintlify.com/v1/agent/{projectId}/jobs \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```javascript JavaScript theme={null} const response = await fetch( `https://api.mintlify.com/v1/agent/${projectId}/jobs`, { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const data = await response.json(); console.log(`Found ${data.allSessions.length} agent jobs`); ``` ```python Python theme={null} import requests response = requests.get( f"https://api.mintlify.com/v1/agent/{project_id}/jobs", headers={ "Authorization": "Bearer YOUR_API_KEY" } ) data = response.json() print(f"Found {len(data['allSessions'])} agent jobs") ``` ## Endpoint Your project ID. Can be copied from the [API keys](https://dashboard.mintlify.com/settings/organization/api-keys) page in your dashboard. ## Response Array of all agent sessions for the domain. The session ID for this job. The subdomain this session belongs to. Git branch name where changes were made. Whether the session execution was halted (completed). Reason for session halt. One of: `completed`, `github_missconfigured`, `error`. Link to the created pull request. Message for the user about the session outcome. List of todo items from the session. Brief description of the task. Current status of the task. One of: `pending`, `in_progress`, `completed`, `cancelled`. Priority level of the task. One of: `high`, `medium`, `low`. Unique identifier for the todo item. ISO 8601 timestamp when the session was created. ```json Response theme={null} { "allSessions": [ { "sessionId": "abc123xyz789", "subdomain": "example", "branch": "agent-update-docs", "haulted": true, "haultReason": "completed", "pullRequestLink": "https://github.com/your-org/your-repo/pull/123", "messageToUser": "Successfully updated the introduction page.", "todos": [ { "content": "Update introduction.mdx", "status": "completed", "priority": "high", "id": "todo-1" } ], "createdAt": "2024-01-15T10:30:00.000Z" }, { "sessionId": "def456uvw012", "subdomain": "example", "branch": "agent-add-api-docs", "haulted": true, "haultReason": "completed", "pullRequestLink": "https://github.com/your-org/your-repo/pull/124", "messageToUser": "Created new API documentation pages.", "todos": [ { "content": "Create API reference pages", "status": "completed", "priority": "high", "id": "todo-1" } ], "createdAt": "2024-01-14T14:20:00.000Z" } ] } ``` ## Authentication This endpoint requires an admin API key (prefixed with `mint_`). Generate one on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. # Get assistant conversations Source: https://mintlify-docs.mintlify.app/api/analytics/assistant-conversations Export AI assistant conversation history from your documentation Use this endpoint to export AI assistant conversation history from your documentation. Each conversation includes the user query, assistant response, sources cited, and query category. Paginate through results using the `cursor` parameter returned in the response. Continue fetching while `hasMore` is `true`. ## Filtering Filter conversations by date range using `dateFrom` and `dateTo` parameters. ## Conversation data Each conversation includes: * **query**: The user's question * **response**: The assistant's answer * **sources**: Pages referenced in the response, with title and URL * **queryCategory**: Classification of the query type (if available) ```bash cURL theme={null} curl -X GET "https://api.mintlify.com/v1/analytics/{projectId}/assistant?dateFrom=2024-01-01&dateTo=2024-01-31&limit=100" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```javascript JavaScript theme={null} const projectId = 'your-project-id'; const dateFrom = '2024-01-01'; const dateTo = '2024-01-31'; const response = await fetch( `https://api.mintlify.com/v1/analytics/${projectId}/assistant?dateFrom=${dateFrom}&dateTo=${dateTo}&limit=100`, { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const data = await response.json(); console.log(`Retrieved ${data.conversations.length} conversations`); // Paginate through results let cursor = data.nextCursor; while (data.hasMore && cursor) { const nextResponse = await fetch( `https://api.mintlify.com/v1/analytics/${projectId}/assistant?cursor=${cursor}`, { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const nextData = await nextResponse.json(); console.log(`Retrieved ${nextData.conversations.length} more conversations`); cursor = nextData.nextCursor; } ``` ```python Python theme={null} import requests project_id = 'your-project-id' date_from = '2024-01-01' date_to = '2024-01-31' response = requests.get( f"https://api.mintlify.com/v1/analytics/{project_id}/assistant", headers={ "Authorization": "Bearer YOUR_API_KEY" }, params={ "dateFrom": date_from, "dateTo": date_to, "limit": 100 } ) data = response.json() print(f"Retrieved {len(data['conversations'])} conversations") # Paginate through results cursor = data.get('nextCursor') while data['hasMore'] and cursor: next_response = requests.get( f"https://api.mintlify.com/v1/analytics/{project_id}/assistant", headers={ "Authorization": "Bearer YOUR_API_KEY" }, params={ "cursor": cursor } ) next_data = next_response.json() print(f"Retrieved {len(next_data['conversations'])} more conversations") cursor = next_data.get('nextCursor') ``` ## Endpoint Your project ID. Can be copied from the [API keys](https://dashboard.mintlify.com/settings/organization/api-keys) page in your dashboard. ## Query Parameters Date in ISO 8601 or YYYY-MM-DD format. Filter conversations that occurred on or after this date. Date in ISO 8601 or YYYY-MM-DD format. `dateTo` is an exclusive upper limit. Results include dates before, but not on, the specified date. Max results per page. Minimum: 1, Maximum: 1000. Pagination cursor (ULID format) returned from a previous response. ## Response List of assistant conversations. Unique conversation identifier. ISO 8601 timestamp when the conversation occurred. The user's question to the assistant. The assistant's response. Documentation pages referenced in the response. Title of the referenced documentation page. URL of the referenced documentation page. Auto-assigned category grouping for the conversation, if applicable. Cursor to retrieve the next page of results. Null if no more results. Whether additional results are available beyond this page. ```json Response theme={null} { "conversations": [ { "id": "conv_123abc", "timestamp": "2024-01-15T10:30:00.000Z", "query": "How do I authenticate with the API?", "response": "To authenticate with the API, you need to include your API key in the Authorization header of your requests. You can generate an API key from your dashboard settings...", "sources": [ { "title": "Authentication", "url": "https://docs.example.com/api-reference/authentication" }, { "title": "API Keys", "url": "https://docs.example.com/api-reference/api-keys" } ], "queryCategory": "authentication" }, { "id": "conv_456def", "timestamp": "2024-01-14T14:20:00.000Z", "query": "What programming languages are supported?", "response": "We provide SDKs and examples for JavaScript, Python, Ruby, Go, and PHP. You can find code examples in each language throughout our documentation...", "sources": [ { "title": "SDKs", "url": "https://docs.example.com/sdks" }, { "title": "Code Examples", "url": "https://docs.example.com/examples" } ], "queryCategory": "general" } ], "nextCursor": "01HQZX9K2MNBVCXZ7GQRST8WVY", "hasMore": true } ``` ## Authentication This endpoint requires an admin API key (prefixed with `mint_`). Generate one on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. # Get user feedback Source: https://mintlify-docs.mintlify.app/api/analytics/feedback Export user feedback collected from your documentation Use this endpoint to export user feedback collected from your documentation. Feedback includes contextual feedback from page ratings and code snippet feedback. Paginate through results using the `cursor` parameter returned in the response. Continue fetching while `hasMore` is `true`. ## Filtering Filter feedback by: * **Date range**: Use `dateFrom` and `dateTo` to limit results to a specific time period * **Source**: Filter by `code_snippet` or `contextual` feedback types * **Status**: Filter by status values like `pending`, `in_progress`, `resolved`, or `dismissed` ## Response types The response contains different feedback types based on the source: * **Contextual feedback**: Includes `helpful` boolean and optional `contact` email * **Code snippet feedback**: Includes `code`, `filename`, and `lang` fields ```bash cURL theme={null} curl -X GET "https://api.mintlify.com/v1/analytics/{projectId}/feedback?dateFrom=2024-01-01&dateTo=2024-01-31&limit=50" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```javascript JavaScript theme={null} const projectId = 'your-project-id'; const dateFrom = '2024-01-01'; const dateTo = '2024-01-31'; const response = await fetch( `https://api.mintlify.com/v1/analytics/${projectId}/feedback?dateFrom=${dateFrom}&dateTo=${dateTo}&limit=50`, { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const data = await response.json(); console.log(`Retrieved ${data.feedback.length} feedback items`); // Paginate through results let cursor = data.nextCursor; while (data.hasMore && cursor) { const nextResponse = await fetch( `https://api.mintlify.com/v1/analytics/${projectId}/feedback?cursor=${cursor}`, { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const nextData = await nextResponse.json(); console.log(`Retrieved ${nextData.feedback.length} more feedback items`); cursor = nextData.nextCursor; } ``` ```python Python theme={null} import requests project_id = 'your-project-id' date_from = '2024-01-01' date_to = '2024-01-31' response = requests.get( f"https://api.mintlify.com/v1/analytics/{project_id}/feedback", headers={ "Authorization": "Bearer YOUR_API_KEY" }, params={ "dateFrom": date_from, "dateTo": date_to, "limit": 50 } ) data = response.json() print(f"Retrieved {len(data['feedback'])} feedback items") # Paginate through results cursor = data.get('nextCursor') while data['hasMore'] and cursor: next_response = requests.get( f"https://api.mintlify.com/v1/analytics/{project_id}/feedback", headers={ "Authorization": "Bearer YOUR_API_KEY" }, params={ "cursor": cursor } ) next_data = next_response.json() print(f"Retrieved {len(next_data['feedback'])} more feedback items") cursor = next_data.get('nextCursor') ``` ## Endpoint Your project ID. Can be copied from the [API keys](https://dashboard.mintlify.com/settings/organization/api-keys) page in your dashboard. ## Query Parameters Date in ISO 8601 or YYYY-MM-DD format. Filter feedback created on or after this date. Date in ISO 8601 or YYYY-MM-DD format. `dateTo` is an exclusive upper limit. Results include dates before, but not on, the specified date. Filter by feedback source. One of: `code_snippet`, `contextual`. Comma-separated list of statuses to filter by. Values: `pending`, `in_progress`, `resolved`, `dismissed`. Max results per page. Minimum: 1, Maximum: 100. Pagination cursor returned from a previous response. ## Response List of feedback entries. Each entry contains different fields based on the feedback source. Unique feedback identifier. The path or URL to the source document. Text of the user's feedback comment. ISO 8601 timestamp when the feedback was submitted. Where the feedback originated. `code_snippet` is feedback on a code block, `contextual` is page-level feedback. Current review status of the feedback. One of: `pending`, `in_progress`, `resolved`, `dismissed`. (Contextual feedback only) Whether the user found the content helpful. (Contextual feedback only) Email address the user provided for follow-up. (Code snippet feedback only) The code snippet the feedback relates to. (Code snippet feedback only) Filename associated with the code snippet. (Code snippet feedback only) Programming language of the code snippet. Cursor to retrieve the next page of results. Null if no more results. Whether additional results are available beyond this page. ```json Response theme={null} { "feedback": [ { "id": "fb_123abc", "path": "/getting-started", "comment": "This page was very helpful!", "createdAt": "2024-01-15T10:30:00.000Z", "source": "contextual", "status": "pending", "helpful": true, "contact": "user@example.com" }, { "id": "fb_456def", "path": "/api-reference/authentication", "comment": "This code example has a typo", "createdAt": "2024-01-14T14:20:00.000Z", "source": "code_snippet", "status": "in_progress", "code": "const apiKey = 'YOUR_API_KEY';\nfetch('/api/data', {\n headers: { Authorization: `Bearer ${apiKey}` }\n});", "filename": "example.js", "lang": "javascript" } ], "nextCursor": "cursor_789ghi", "hasMore": true } ``` ## Authentication This endpoint requires an admin API key (prefixed with `mint_`). Generate one on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. # Assistant message Source: https://mintlify-docs.mintlify.app/api/assistant/create-assistant-message-v2 Generate AI assistant responses for your documentation (AI SDK v5+) The assistant message v2 endpoint is compatible with **AI SDK v5+**. If you use AI SDK v4, use the [assistant message v1 endpoint](/api/assistant/create-assistant-message) instead. ## Integration with `useChat` The `useChat` hook from Vercel's AI SDK is the recommended way to integrate the assistant API into your application. ```bash theme={null} npm i ai@^6 @ai-sdk/react ``` ```tsx theme={null} import { useState } from "react"; import { useChat } from "@ai-sdk/react"; import { DefaultChatTransport } from "ai"; function MyComponent({ domain }) { const [input, setInput] = useState(""); const { messages, sendMessage } = useChat({ transport: new DefaultChatTransport({ api: `https://api.mintlify.com/discovery/v2/assistant/${domain}/message`, headers: { Authorization: `Bearer ${process.env.PUBLIC_MINTLIFY_ASSISTANT_KEY}`, }, body: { fp: "anonymous", retrievalPageSize: 5, context: [ { type: "code", value: 'const example = "code snippet";', elementId: "code-block-1", }, ], }, }), }); return (
{messages.map((message) => (
{message.role === "user" ? "User: " : "Assistant: "} {message.parts .filter((part) => part.type === "text") .map((part) => part.text) .join("")}
))}
{ e.preventDefault(); if (input.trim()) { sendMessage({ text: input }); setInput(""); } }} > setInput(e.target.value)} />
); } ``` **Required configuration:** * `transport` - Use `DefaultChatTransport` to configure the API connection. * `body.fp` - Fingerprint identifier (use `'anonymous'` or a unique user identifier). * `body.retrievalPageSize` - Number of search results to use (recommended: 5). **Optional configuration:** * `body.context` - Array of contextual information to provide to the assistant. Each context object contains: * `type` - Either `'code'` or `'textSelection'`. * `value` - The code snippet or selected text content. * `path` (optional) - Path to the source file or page. * `elementId` (optional) - Identifier for the UI element containing the context.
See [useChat](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat) and [Transport](https://ai-sdk.dev/docs/ai-sdk-ui/transport) in the AI SDK documentation for more details. ## Rate limits The assistant API has the following limits: * 10,000 uses per key per month * 10,000 requests per Mintlify organization per hour * 10,000 requests per IP per day ```bash cURL theme={null} curl -X POST https://api.mintlify.com/discovery/v2/assistant/{domain}/message \ -H "Authorization: Bearer YOUR_ASSISTANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fp": "anonymous", "messages": [ { "id": "msg-1", "role": "user", "parts": [ { "type": "text", "text": "How do I get started?" } ] } ], "retrievalPageSize": 5 }' ``` ```javascript JavaScript theme={null} const response = await fetch( `https://api.mintlify.com/discovery/v2/assistant/${domain}/message`, { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ASSISTANT_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ fp: 'anonymous', messages: [ { id: 'msg-1', role: 'user', parts: [ { type: 'text', text: 'How do I get started?' } ] } ], retrievalPageSize: 5 }) } ); ``` ```python Python theme={null} import requests response = requests.post( f"https://api.mintlify.com/discovery/v2/assistant/{domain}/message", headers={ "Authorization": "Bearer YOUR_ASSISTANT_API_KEY", "Content-Type": "application/json" }, json={ "fp": "anonymous", "messages": [ { "id": "msg-1", "role": "user", "parts": [ { "type": "text", "text": "How do I get started?" } ] } ], "retrievalPageSize": 5 } ) ``` ## Endpoint The domain identifier from your `domain.mintlify.app` URL. Can be found at the end of your dashboard URL. For example, `dashboard.mintlify.com/organization/domain` has a domain identifier of `domain`. ## Request Body Fingerprint identifier for tracking conversation sessions. Use `anonymous` for anonymous users or provide a unique user identifier. Array of messages in the conversation. Use the handleSubmit function from the @ai-sdk/react package's useChat hook to manage messages and streaming responses. Unique identifier for the message. The role of the message sender. One of: `system`, `assistant`, `user`. Array of message parts. Each part has a type and type-specific fields. Must be `text` for text content. The text content. ISO 8601 timestamp when the message was created. Optional metadata associated with the message. Number of documentation search results to use for generating the response. Higher values provide more context but may increase response time. Recommended: 5. An optional identifier used to maintain conversation continuity across multiple messages. When provided, it allows the system to associate follow-up messages with the same conversation thread. The `threadId` is returned in the response as `event.threadId` when `event.type === 'finish'`. Optional filter criteria for the search. Optional version filter. Optional language filter. Optional array of group identifiers to filter results. Optional array of contextual information to provide to the assistant. The type of context being provided. Either `code` or `textSelection`. The code snippet or selected text content. Optional path to the source file or page. Optional identifier for the UI element containing the context. ## Response Streaming response compatible with AI SDK v5. Use the [useChat hook from @ai-sdk/react](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat#usechat) to handle the response stream. ## Authentication This endpoint requires an assistant API key (prefixed with `mint_dsc_`). This is a public key safe for use in client-side code. Generate one on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. # Search documentation Source: https://mintlify-docs.mintlify.app/api/assistant/search Perform semantic and keyword searches across your documentation Perform semantic and keyword searches across your documentation with configurable filtering and pagination. ```bash cURL theme={null} curl -X POST https://api.mintlify.com/discovery/v1/search/{domain} \ -H "Authorization: Bearer YOUR_ASSISTANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "how to authenticate", "pageSize": 10, "filter": { "version": "v2", "language": "en" } }' ``` ```javascript JavaScript theme={null} const response = await fetch( `https://api.mintlify.com/discovery/v1/search/${domain}`, { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ASSISTANT_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ query: 'how to authenticate', pageSize: 10, filter: { version: 'v2', language: 'en' } }) } ); const results = await response.json(); console.log(`Found ${results.length} results`); ``` ```python Python theme={null} import requests response = requests.post( f"https://api.mintlify.com/discovery/v1/search/{domain}", headers={ "Authorization": "Bearer YOUR_ASSISTANT_API_KEY", "Content-Type": "application/json" }, json={ "query": "how to authenticate", "pageSize": 10, "filter": { "version": "v2", "language": "en" } } ) results = response.json() print(f"Found {len(results)} results") ``` ## Endpoint The domain identifier from your `domain.mintlify.app` URL. Can be found at the end of your dashboard URL. For example, `dashboard.mintlify.com/organization/domain` has a domain identifier of `domain`. ## Request Body The search query to execute against your documentation content. Number of search results to return. Defaults to 10 if not specified. Optional filtering parameters to narrow search results. Filter results by documentation version. Filter results by content language. ## Response Array of search results. The matching content from your documentation. The path or URL to the source document. Additional metadata about the search result. ```json Response theme={null} [ { "content": "To authenticate with the API, include your API key in the Authorization header...", "path": "/api-reference/authentication", "metadata": { "title": "Authentication", "description": "Learn how to authenticate with our API" } }, { "content": "API keys can be generated from your dashboard settings...", "path": "/api-reference/api-keys", "metadata": { "title": "API Keys", "description": "Manage your API keys" } } ] ``` ## Authentication This endpoint requires an assistant API key (prefixed with `mint_dsc_`). This is a public key safe for use in client-side code. Generate one on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. # Introduction Source: https://mintlify-docs.mintlify.app/api/introduction Trigger updates, embed AI assistant, export analytics, and more The Mintlify REST API enables you to programmatically interact with your documentation, trigger updates, embed AI-powered chat experiences, and export analytics data. ## Endpoints * [Trigger update](/api/update/trigger): Trigger an update of your site when desired. * [Get update status](/api/update/status): Get the status of an update and other details about your docs. * [Create agent job](/api/agent/create-agent-job): Create an agent job to automatically edit your documentation. * [Get agent job](/api/agent/get-agent-job): Retrieve the details and status of a specific agent job. * [Get all agent jobs](/api/agent/get-all-jobs): Retrieve all agent jobs for a domain. * [Generate assistant message](/api/assistant/create-assistant-message-v2): Embed the assistant, trained on your docs, into any application of your choosing. * [Search documentation](/api/assistant/search): Search through your documentation. * [Get user feedback](/api/analytics/feedback): Export user feedback from your documentation. * [Get assistant conversations](/api/analytics/assistant-conversations): Export AI assistant conversation history. ### Common use cases * **Automated deployments**: Trigger site updates at set intervals or when events occur with [Trigger update](/api/update/trigger) and [Get update status](/api/update/status). * **CI/CD integration**: Update documentation as part of your deployment pipeline when code changes with [Trigger update](/api/update/trigger). * **Custom integrations**: Embed the AI assistant into your product, support portal, or internal tools with [Generate assistant message](/api/assistant/create-assistant-message-v2) and [Search documentation](/api/assistant/search). * **Automated editing**: Use agent jobs to programmatically update documentation at scale with [Create agent job](/api/agent/create-agent-job), [Get agent job](/api/agent/get-agent-job), and [Get all agent jobs](/api/agent/get-all-jobs). * **Analytics export**: Export feedback and assistant conversations for external analysis with [Get user feedback](/api/analytics/feedback) and [Get assistant conversations](/api/analytics/assistant-conversations). ## Authentication Generate API keys on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. Each API key belongs to an organization--you can use keys across multiple deployments within the same organization. You can create up to 10 API keys per hour per organization. ### Admin API key Use the admin API key to authenticate requests to [Trigger update](/api/update/trigger), [Get update status](/api/update/status), [Create agent job](/api/agent/create-agent-job), [Get agent job](/api/agent/get-agent-job), [Get all agent jobs](/api/agent/get-all-jobs), [Get user feedback](/api/analytics/feedback), and [Get assistant conversations](/api/analytics/assistant-conversations). Admin API keys begin with the `mint_` prefix. The admin API key is a server-side secret. Do not expose it in client-side code. ### Assistant API key Use the assistant API key to authenticate requests to [Generate assistant message](/api/assistant/create-assistant-message-v2) and [Search documentation](/api/assistant/search) endpoints. Assistant API keys begin with the `mint_dsc_` prefix. The assistant API key is a public token that you can reference in frontend code. Calls using the assistant API token can incur costs: either using your assistant credits or incurring overages. # Get update status Source: https://mintlify-docs.mintlify.app/api/update/status Get the status of an update and deployment details ```bash cURL theme={null} curl -X GET https://api.mintlify.com/v1/project/update-status/{statusId} \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```javascript JavaScript theme={null} const response = await fetch( `https://api.mintlify.com/v1/project/update-status/${statusId}`, { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const status = await response.json(); console.log('Update status:', status.status); ``` ```python Python theme={null} import requests response = requests.get( f"https://api.mintlify.com/v1/project/update-status/{status_id}", headers={ "Authorization": "Bearer YOUR_API_KEY" } ) status = response.json() print(f"Update status: {status['status']}") ``` ## Endpoint The status ID of a triggered update. Returned from the [Trigger update](/api/update/trigger) endpoint. ## Response The status ID of the triggered update. The documentation project ID. The status of the update. One of: `queued`, `in_progress`, `success`, `failure`. Summary of the status of the update. An ISO 8601 datetime string with the specified datetime in UTC. An ISO 8601 datetime string with the specified datetime in UTC. An array of log messages from the update process. The subdomain of the docs being updated. A screenshot URL of the docs. A screenshot URL of the docs in light mode. A screenshot URL of the docs in dark mode. The author of the update. The commit details The SHA of the commit. The ref of the commit. The commit message. Details on the changed files. New files added. Existing files that were modified. Files that were removed. The source of the update trigger. One of: `internal`, `github-app-installation`, `api`, `github`, `dashboard`. ```json Response theme={null} { "_id": "67890abcdef1234567890abc", "projectId": "12345abc", "status": "success", "summary": "Successfully deployed documentation", "createdAt": "2024-01-15T10:30:00.000Z", "endedAt": "2024-01-15T10:32:45.000Z", "logs": [ "Starting build...", "Building pages...", "Deployment successful" ], "subdomain": "example", "author": "john@example.com", "commit": { "sha": "abc123def456", "ref": "main", "message": "Update documentation", "filesChanged": { "added": ["new-page.mdx"], "modified": ["introduction.mdx"], "removed": [] } }, "source": "api" } ``` ## Authentication This endpoint requires an admin API key (prefixed with `mint_`). Generate one on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. # Trigger update Source: https://mintlify-docs.mintlify.app/api/update/trigger Queue a deployment update for your documentation project ```bash cURL theme={null} curl -X POST https://api.mintlify.com/v1/project/update/{projectId} \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```javascript JavaScript theme={null} const response = await fetch( `https://api.mintlify.com/v1/project/update/${projectId}`, { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); const data = await response.json(); console.log('Status ID:', data.statusId); ``` ```python Python theme={null} import requests response = requests.post( f"https://api.mintlify.com/v1/project/update/{project_id}", headers={ "Authorization": "Bearer YOUR_API_KEY" } ) data = response.json() print(f"Status ID: {data['statusId']}") ``` ## Endpoint Your project ID. Can be copied from the [API keys](https://dashboard.mintlify.com/settings/organization/api-keys) page in your dashboard. ## Response The status ID of the triggered update. Use this ID with the [Get update status](/api/update/status) endpoint to track the update progress. ```json Response theme={null} { "statusId": "67890abcdef1234567890abc" } ``` ## Details This endpoint queues a deployment update for your documentation project. The update is triggered from your configured deployment branch. Returns a status ID that can be used to track the update progress with the [Get update status](/api/update/status) endpoint. Use this endpoint to: * Trigger site updates at set intervals or when events occur * Update documentation as part of your CI/CD pipeline when code changes * Programmatically deploy documentation updates ## Authentication This endpoint requires an admin API key (prefixed with `mint_`). Generate one on the [API keys page](https://dashboard.mintlify.com/settings/organization/api-keys) in your dashboard. # Accordions Source: https://mintlify-docs.mintlify.app/components/accordions Use accordions to show and hide content. Accordions allow users to expand and collapse content sections. Use accordions for progressive disclosure and to organize information. ## Single accordion You can put any content in here, including other components, like code: ```java HelloWorld.java theme={null} class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ````mdx Accordion example theme={null} You can put any content in here, including other components, like code: ```java HelloWorld.java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ```` ## Accordion groups Group related accordions together using ``. This creates a cohesive section of accordions that can be individually expanded or collapsed. You can put other components inside Accordions. ```java HelloWorld.java theme={null} class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` Add icons to make accordions more visually distinct and scannable. Keep related content organized into groups. ````mdx Accordion Group Example theme={null} You can put other components inside Accordions. ```java HelloWorld.java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` Add icons to make accordions more visually distinct and scannable. Keep related content organized into groups. ```` ## Properties Title in the Accordion preview. Detail below the title in the Accordion preview. Whether the Accordion is open by default. The icon to display. Options: * [Font Awesome](https://fontawesome.com/icons) icon name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `fontawesome` in your `docs.json` * [Lucide](https://lucide.dev/icons) icon name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `lucide` in your `docs.json` * [Tabler](https://tabler.io/icons) icon name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `tabler` in your `docs.json` * URL to an externally hosted icon * Path to an icon file in your project * SVG code wrapped in curly braces For custom SVG icons: 1. Convert your SVG using the [SVGR converter](https://react-svgr.com/playground/). 2. Paste your SVG code into the SVG input field. 3. Copy the complete `...` element from the JSX output field. 4. Wrap the JSX-compatible SVG code in curly braces: `icon={ ... }`. 5. Adjust `height` and `width` as needed. The [Font Awesome](https://fontawesome.com/icons) icon style. Only used with Font Awesome icons. Options: `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`. # Callouts Source: https://mintlify-docs.mintlify.app/components/callouts Use callouts to style and emphasize important content. Callouts can be styled as a Note, Warning, Info, Tip, Check, Danger, or create your own callout: This adds a note in the content ```mdx theme={null} This adds a note in the content ``` This raises a warning to watch out for ```mdx theme={null} This raises a warning to watch out for ``` This draws attention to important information ```mdx theme={null} This draws attention to important information ``` This suggests a helpful tip ```mdx theme={null} This suggests a helpful tip ``` This brings us a checked status ```mdx theme={null} This brings us a checked status ``` This is a danger callout ```mdx theme={null} This is a danger callout ``` This is a custom callout ```mdx wrap theme={null} This is a custom callout ``` # Cards Source: https://mintlify-docs.mintlify.app/components/cards Highlight main points or links with customizable layouts and icons. Use cards to create visual containers for content. Cards are flexible containers that can include text, icons, images, and links. ## Basic card This is how you use a card with an icon and a link. Clicking on this card brings you to the Columns page. ```mdx Card example theme={null} This is how you use a card with an icon and a link. Clicking on this card brings you to the Columns page. ``` ## Card variations Cards support several layout and styling options to fit different content needs. ### Horizontal layout Add the `horizontal` property to display cards in a more compact, horizontal layout. This is an example of a horizontal card. ```mdx Horizontal card example theme={null} This is an example of a horizontal card. ``` ### Image cards Add an `img` property to display an image at the top of the card. This is an example of a card with an image. ```mdx Image card example theme={null} This is an example of a card with an image. ``` ### Link cards with custom CTAs You can customize the call-to-action text and control whether an arrow appears. By default, arrows only show for external links. This is an example of a card with an icon and a link. Clicking on this card brings you to the Columns page. ```mdx Link card example theme={null} This is an example of a card with an icon and a link. Clicking on this card brings you to the Columns page. ``` ## Group cards Use the [Columns component](/components/columns) to organize multiple cards side by side. The Columns component supports one to four columns and automatically adjusts for smaller screens. This is the first card. This is the second card. ```mdx Columns example theme={null} This is the first card. This is the second card. ``` ## Properties The title displayed on the card The icon to display. Options: * [Font Awesome](https://fontawesome.com/icons) icon name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `fontawesome` in your `docs.json` * [Lucide](https://lucide.dev/icons) icon name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `lucide` in your `docs.json` * [Tabler](https://tabler.io/icons) icon name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `tabler` in your `docs.json` * URL to an externally hosted icon * Path to an icon file in your project * SVG code wrapped in curly braces For custom SVG icons: 1. Convert your SVG using the [SVGR converter](https://react-svgr.com/playground/). 2. Paste your SVG code into the SVG input field. 3. Copy the complete `...` element from the JSX output field. 4. Wrap the JSX-compatible SVG code in curly braces: `icon={ ... }`. 5. Adjust `height` and `width` as needed. The [Font Awesome](https://fontawesome.com/icons) icon style. Only used with Font Awesome icons. Options: `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`. Icon color as a hex code (for example, `#FF6B6B`). URL to navigate to when the card is clicked. Display the card in a compact horizontal layout. URL or local path to an image displayed at the top of the card. Custom text for the action button. Show or hide the link arrow icon. # Code groups Source: https://mintlify-docs.mintlify.app/components/code-groups Display multiple code examples in one component Use the `CodeGroup` component to display multiple code blocks in a tabbed interface, allowing users to compare implementations across different programming languages or see alternative approaches for the same task. ```javascript helloWorld.js theme={null} console.log("Hello World"); ``` ```python hello_world.py theme={null} print('Hello World!') ``` ```java HelloWorld.java theme={null} class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` Code groups inherit global styling from your `docs.json` file. Customize your theme using `styling.codeblocks`. See [Settings](/organize/settings#param-styling) for configuration options. Code groups automatically synchronize with other code groups and [tabs](/components/tabs) on the same page when their labels match. When you select a language in one code group, all tabs and code groups with matching labels update to show the same language. ## Create code groups To create a code group, wrap multiple code blocks with `` tags. Each code block must include a title, which becomes the tab label. ````mdx theme={null} ```javascript helloWorld.js console.log("Hello World"); ``` ```python hello_world.py print('Hello World!') ``` ```java HelloWorld.java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ```` ## Language dropdown You can replace the tabs in a code group with a dropdown menu to toggle between languages using the `dropdown` prop. ```javascript helloWorld.js theme={null} console.log("Hello World"); ``` ```python hello_world.py theme={null} print('Hello World!') ``` ```java HelloWorld.java theme={null} class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ````mdx highlight=1 theme={null} ```javascript helloWorld.js console.log("Hello World"); ``` ```python hello_world.py print('Hello World!') ``` ```java HelloWorld.java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ```` # Fields Source: https://mintlify-docs.mintlify.app/components/fields Document API request and response parameters with type information. Use fields to document API parameters and responses. There are two types of fields: parameter fields and response fields. ## Parameter field The `` component is used to define parameters for your APIs or SDKs. Adding a `ParamField` automatically adds an [API Playground](/api-playground/overview). An example of a parameter field ```mdx theme={null} An example of a parameter field ``` ### Properties Whether the parameter is a query, path, body, or header. Followed by the parameter name. Expected type of the parameter's value. Supports `number`, `string`, `boolean`, `object`. Arrays can be defined using the `[]` suffix. For example `string[]`. Indicate whether the parameter is required. Indicate whether the parameter is deprecated. Default value populated when the request value is empty Placeholder text for the input in the playground. Description of the parameter (Markdown-enabled). ## Response field The `` component defines the return values of an API. An example of a response field ```mdx theme={null} A response field example ``` ### Properties The name of the response value. Expected type of the response value. This can be any arbitrary string. The default value. Indicate whether the response is required. Whether a field is deprecated. Labels that are shown before the name of the field. Labels that are shown after the name of the field. # Frames Source: https://mintlify-docs.mintlify.app/components/frames Add visual emphasis with styled frames around images and other components. Use frames to display images, diagrams, or other visual content with consistent styling and optional captions. Frames center content and provide visual separation from surrounding text. Photograph of a lake surrounded by trees with mountains in the distance in Yellowstone National Park. ## Captions Add additional context to an image using the optional `caption` prop. Captions appear in the frame below the image. Photograph of Yosemite Valley. ### Markdown in captions Captions support markdown formatting, including links and bold text. Photograph of Yosemite Valley. Photograph of a lake surrounded by trees with mountains in the distance in Yellowstone National Park. ## Hints Add text that precedes the frame using the optional `hint` prop. Hints appear above the frame. Photograph of a lake surrounded by trees with mountains in the distance in Yellowstone National Park. ## Properties Text that appears as part of the frame, centered below the content. Supports markdown formatting including links and bold text. Text that precedes the frame. ```mdx Frame theme={null} Descriptive alt text ``` ```mdx Frame with a caption theme={null} Descriptive alt text ``` ```mdx Frame with markdown in caption theme={null} Descriptive alt text ``` ```mdx Frame with bold text and links in caption theme={null} Descriptive alt text ``` ```mdx Frame with a hint theme={null} Descriptive alt text ``` ```mdx Frame with both hint and caption theme={null} Descriptive alt text ``` # Icons Source: https://mintlify-docs.mintlify.app/components/icons Use icons from popular libraries, external URLs, or files in your project. Use icons from Font Awesome, Lucide, Tabler, SVGs, external URLs, or files in your project to enhance your documentation. ```mdx Icon example theme={null} ``` ## Inline icons Icons are placed inline when used within a sentence, paragraph, or heading. Use icons for decoration or to add visual emphasis. ```markdown Inline icon example theme={null} Icons are placed inline when used within a sentence, paragraph, or heading. Use icons for decoration or to add visual emphasis. ``` ## Properties The icon to display. Options: * [Font Awesome icon](https://fontawesome.com/icons) name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `fontawesome` in your `docs.json` * [Lucide icon](https://lucide.dev/icons) name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `lucide` in your `docs.json` * [Tabler icon](https://tabler.io/icons) name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `tabler` in your `docs.json` * URL to an externally hosted icon * Path to an icon file in your project The [Font Awesome](https://fontawesome.com/icons) icon style. Only used with Font Awesome icons. Options: `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`. The color of the icon as a hex code (for example, `#FF5733`). The size of the icon in pixels. Custom CSS class name to apply to the icon. # Overview Source: https://mintlify-docs.mintlify.app/components/index Component library for layout, emphasis, API documentation, and navigation. Mintlify provides built-in MDX components for your documentation pages. Use these components to structure content, draw attention to important information, document APIs, and guide navigation. ## Structure your content Organize related content into switchable tabbed views. Display code examples in multiple languages. Display sequential instructions in a numbered format. Arrange content side by side in responsive layouts. Create sidebar panels for supplementary content. ## Draw attention Emphasize important information with styled alerts. Display prominent announcements at the top of pages. Add inline labels and status indicators. Highlight new or updated content. Add borders and styling to images and content. Display additional information on hover. ## Showcase AI prompts Display copyable AI prompts with Cursor integration. ## Show and hide content Expandable sections for progressive disclosure of content. Show and hide detailed content on demand. Conditionally show content based on context. ## Document your API Display parameter and property definitions. Document API response structures and fields. Show request and response examples side by side. ## Link to other pages Highlight content with customizable containers and icons. Display content in a grid of clickable tiles. ## Add visual context Add visual indicators using the Lucide icon library. Create flowcharts, sequence diagrams, and more. Display color swatches with hex values. # Response fields Source: https://mintlify-docs.mintlify.app/components/responses Display API response values. The `` component is designed to define the return values of an API. Many docs also use `` on pages when you need to list the types of something. A response field example ```mdx theme={null} A response field example ``` ## Props The name of the response value. Expected type of the response value - this can be any arbitrary string. The default value. Show "required" beside the field name. Whether a field is deprecated or not. Labels that are shown before the name of the field Labels that are shown after the name of the field ```mdx Response Field Example theme={null} A response field example ``` # Steps Source: https://mintlify-docs.mintlify.app/components/steps Create numbered step-by-step procedures. Use steps to display a series of sequential actions or events. You can add as many steps as needed. These are instructions or content that only pertain to the first step. These are instructions or content that only pertain to the second step. These are instructions or content that only pertain to the third step. ```mdx Steps example theme={null} These are instructions or content that only pertain to the first step. These are instructions or content that only pertain to the second step. These are instructions or content that only pertain to the third step. ``` ## Steps properties A list of `Step` components. The size of the step titles. One of `p`, `h2`, and `h3`. ## Individual step properties The content of a step either as plain text or components. The icon to display. Options: * [Font Awesome](https://fontawesome.com/icons) icon name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `fontawesome` in your `docs.json` * [Lucide](https://lucide.dev/icons) icon name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `lucide` in your `docs.json` * [Tabler](https://tabler.io/icons) icon name, if you have the `icons.library` [property](/organize/settings#param-icons) set to `tabler` in your `docs.json` * URL to an externally hosted icon * Path to an icon file in your project * SVG code wrapped in curly braces For custom SVG icons: 1. Convert your SVG using the [SVGR converter](https://react-svgr.com/playground/). 2. Paste your SVG code into the SVG input field. 3. Copy the complete `...` element from the JSX output field. 4. Wrap the JSX-compatible SVG code in curly braces: `icon={ ... }`. 5. Adjust `height` and `width` as needed. The [Font Awesome](https://fontawesome.com/icons) icon style. Only used with Font Awesome icons. Options: `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`. The title is the primary text for the step and shows up next to the indicator. The number of the step. The size of the step titles. One of `p`, `h2`, and `h3`. # Tabs Source: https://mintlify-docs.mintlify.app/components/tabs Organize content with tabs to show different options or versions. Use tabs to organize content into multiple panels that users can switch between. You can add any number of tabs and include other components inside each tab. ☝️ Welcome to the content that you can only see inside the first tab. You can add any number of components inside of tabs. For example, a code block: ```java HelloWorld.java theme={null} class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ✌️ Here's content that's only inside the second tab. This one has a icon! 💪 Here's content that's only inside the third tab. ````mdx Tabs example theme={null} ☝️ Welcome to the content that you can only see inside the first tab. You can add any number of components inside of tabs. For example, a code block: ```java HelloWorld.java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ✌️ Here's content that's only inside the second tab. This one has a icon! 💪 Here's content that's only inside the third tab. ```` Tabs with matching titles stay in sync across the page. For example, if you have multiple tab groups that include a `JavaScript` tab title, selecting `JavaScript` in one tab group automatically selects `JavaScript` in the others. This helps users who choose a language or framework once see that choice reflected everywhere. Tabs also sync with [code groups](/components/code-groups) that have matching titles. To disable tab synchronization, add `sync={false}` to a `` component. ```mdx Disable tab sync example theme={null} This tab group operates independently. Selecting tabs here won't affect other tab groups. ``` ## Properties The title of the tab. Short titles are easier to navigate. Tabs with matching titles synchronize their selections. A [Font Awesome](https://fontawesome.com/icons) icon, [Lucide](https://lucide.dev/icons) icon, URL to an icon, or relative path to an icon. For Font Awesome icons only: One of `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`. When `true`, tabs synchronize with other tabs and code groups on the page that have matching titles. Set to `false` to make tabs independent. Adds a bottom border and padding to the tabs container. Useful to visually separate tabbed content from the rest of the page, especially when tabs contain content of varying lengths. # Changelogs Source: https://mintlify-docs.mintlify.app/create/changelogs Create product changelogs with RSS feed support for subscribers. Create a changelog for your docs by adding [Update components](/components/update) to a page. Check out the [Mintlify changelog](/changelog) as an example: you can include links, images, text, and demos of your new features in each update. ## Setting up your changelog 1. Create a new page in your docs such as `changelog.mdx` or `updates.mdx`. 2. Add your changelog page to your navigation scheme in your `docs.json`. Add an `Update` for each changelog entry. Include relevant information like feature releases, bug fixes, or other announcements. ```mdx Example changelog.mdx theme={null} --- title: "Changelog" description: "Product updates and announcements" --- Added a new Wintergreen flavor. Released a new version of the Spearmint flavor, now with 10% more mint. Released a new version of the Spearmint flavor. ``` ## Customizing your changelog Control how people navigate your changelog and stay up to date with your product information. ### Table of contents Each `label` property for an `Update` automatically creates an entry in the right sidebar's table of contents. This is the default navigation for your changelog. Changelog with table of contents displayed in light mode. Changelog with table of contents displayed in dark mode. ### Tag filters Add `tags` to your `Update` components to replace the table of contents with tag filters. Users can filter the changelog by selecting one or more tags: ```mdx Tag filters example wrap theme={null} Added a new Wintergreen flavor. Released a new version of the Spearmint flavor, now with 10% more mint. Released a new version of the Spearmint flavor. Deprecated the Peppermint flavor. Released a new version of the Spearmint flavor. ``` Changelog in light mode with the Peppermint tag filter selected. Changelog in dark mode with the Peppermint tag filter selected. The table of contents and changelog filters are hidden when using `custom`, `center`, or `wide` page modes. Learn more about [page modes](/organize/pages#page-mode). ### Subscribable changelogs RSS feeds are only available on public documentation. Use `Update` components to create a subscribable RSS feed at your page URL with `/rss.xml` appended. For example, `mintlify.com/docs/changelog/rss.xml`. The RSS feed publishes entries when you add new `Update` components and when modify headings inside of existing `Update` components. RSS feed entries contain pure Markdown only. Components, code, and HTML elements are excluded. Use the `rss` property to provide alternative text descriptions for RSS subscribers when your updates include content that is excluded. ```xml Example RSS feed theme={null} <![CDATA[Product updates]]> https://mintlify.com/docs RSS for Node Mon, 21 Jul 2025 21:21:47 GMT https://mintlify.com/docs <![CDATA[June 2025]]> https://mintlify.com/docs/changelog#june-2025 https://mintlify.com/docs/changelog#june-2025 Mon, 23 Jun 2025 16:54:22 GMT ``` RSS feeds can integrate with Slack, email, or other subscription tools to notify users of product changes. Some options include: * [Slack](https://slack.com/help/articles/218688467-Add-RSS-feeds-to-Slack) * [Email](https://zapier.com/apps/email/integrations/rss/1441/send-new-rss-feed-entries-via-email) via Zapier * Discord bots like [Readybot](https://readybot.io) or [RSS Feeds to Discord Bot](https://rss.app/en/bots/rssfeeds-discord-bot) To make the RSS feed discoverable, you can display an RSS icon button that links to the feed at the top of the page. Add `rss: true` to the page frontmatter: ```mdx theme={null} --- rss: true --- ``` Changelog page in light mode with RSS feed button enabled. Changelog page in dark mode with RSS feed button enabled. # Format code Source: https://mintlify-docs.mintlify.app/create/code Display and style inline code and code blocks. ## Adding code samples You can add inline code snippets or code blocks. Code blocks support meta options for syntax highlighting, titles, line highlighting, icons, and more. ### Inline code To denote a `word` or `phrase` as code, enclose it in backticks (\`). ```mdx theme={null} To denote a `word` or `phrase` as code, enclose it in backticks (`). ``` ### Code blocks Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) by enclosing code in three backticks. Code blocks are copyable, and if you have the assistant enabled, users can ask AI to explain the code. Specify the programming language for syntax highlighting and to enable meta options. Add any meta options, like a title or icon, after the language. ```java HelloWorld.java example icon=java lines theme={null} class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ````mdx Format theme={null} ```java HelloWorld.java example lines icon="java" class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ```` ## Code block options Add meta options to your code blocks to customize their appearance. You must specify a programming language for a code block before adding any other meta options. ### Option syntax * **String and boolean options**: Wrap with `""`, `''`, or no quotes. * **Expression options**: Wrap with `{}`, `""`, or `''`. ### Syntax highlighting Enable syntax highlighting by specifying the programming language after the opening backticks of a code block. We use [Shiki](https://shiki.style/) for syntax highlighting and support all available languages. See the full list of [languages](https://shiki.style/languages) in Shiki's documentation. Customize code block themes globally using `styling.codeblocks` in your `docs.json` file. Set simple themes like `system` or `dark`, or configure custom [Shiki themes](https://shiki.style/themes) for light and dark modes. See [Settings](/organize/settings#param-styling) for configuration options. ```java Syntax highlighting example theme={null} class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ````mdx Format theme={null} ```java Syntax highlighting example class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ```` For custom themes, set your theme in `docs.json` to `"css-variables"` and override syntax highlighting colors using CSS variables with the `--mint-` prefix. The following variables are available: **Basic colors** * `--mint-color-text`: Default text color * `--mint-color-background`: Background color **Token colors** * `--mint-token-constant`: Constants and literals * `--mint-token-string`: String values * `--mint-token-comment`: Comments * `--mint-token-keyword`: Keywords * `--mint-token-parameter`: Function parameters * `--mint-token-function`: Function names * `--mint-token-string-expression`: String expressions * `--mint-token-punctuation`: Punctuation marks * `--mint-token-link`: Links **ANSI colors** * `--mint-ansi-black`, `--mint-ansi-black-dim` * `--mint-ansi-red`, `--mint-ansi-red-dim` * `--mint-ansi-green`, `--mint-ansi-green-dim` * `--mint-ansi-yellow`, `--mint-ansi-yellow-dim` * `--mint-ansi-blue`, `--mint-ansi-blue-dim` * `--mint-ansi-magenta`, `--mint-ansi-magenta-dim` * `--mint-ansi-cyan`, `--mint-ansi-cyan-dim` * `--mint-ansi-white`, `--mint-ansi-white-dim` * `--mint-ansi-bright-black`, `--mint-ansi-bright-black-dim` * `--mint-ansi-bright-red`, `--mint-ansi-bright-red-dim` * `--mint-ansi-bright-green`, `--mint-ansi-bright-green-dim` * `--mint-ansi-bright-yellow`, `--mint-ansi-bright-yellow-dim` * `--mint-ansi-bright-blue`, `--mint-ansi-bright-blue-dim` * `--mint-ansi-bright-magenta`, `--mint-ansi-bright-magenta-dim` * `--mint-ansi-bright-cyan`, `--mint-ansi-bright-cyan-dim` * `--mint-ansi-bright-white`, `--mint-ansi-bright-white-dim` **Custom syntax highlighting** Add syntax highlighting for languages not included in Shiki's default set by providing custom TextMate grammar files. Create a JSON file following the [TextMate grammar format](https://macromates.com/manual/en/language_grammars), then reference it in your `docs.json`. You can add multiple custom languages by including additional paths in the array. ```json docs.json theme={null} { "styling": { "codeblocks": { "languages": { "custom": ["/languages/my-custom-language.json"] } } } } ``` ### Twoslash In JavaScript and TypeScript code blocks, use `twoslash` to enable interactive type information. Users can hover over variables, functions, and parameters to see types and errors like in an IDE. ```ts twoslash Twoslash example theme={null} type Pet = "cat" | "dog" | "hamster"; function adoptPet(name: string, type: Pet) { return `${name} the ${type} is now adopted!`; } // Hover to see the inferred types const message = adoptPet("Mintie", "cat"); ``` ````mdx Format theme={null} ```ts twoslash Twoslash example type Pet = "cat" | "dog" | "hamster"; function adoptPet(name: string, type: Pet) { return `${name} the ${type} is now adopted!`; } // Hover to see the inferred types const message = adoptPet("Mintie", "cat"); ``` ```` ### Title Add a title to label your code example. Use `title="Your title"` or a string on a single line. ```javascript Title example theme={null} const hello = "world"; ``` ````mdx Format theme={null} ```javascript Title example const hello = "world"; ``` ```` ### Icon Add an icon to your code block using the `icon` property. See [Icons](/components/icons) for all available options. ```javascript Icon example icon=square-js theme={null} const hello = "world"; ``` ````mdx Format theme={null} ```javascript Icon example icon="square-js" const hello = "world"; ``` ```` ### Line highlighting Highlight specific lines in your code blocks using `highlight` with the line numbers or ranges you want to highlight. ```javascript Line highlighting example {1,2,5} theme={null} const greeting = "Hello, World!"; function sayHello() { console.log(greeting); } sayHello(); ``` ````mdx Format theme={null} ```javascript Line highlighting example highlight={1-2,5} const greeting = "Hello, World!"; function sayHello() { console.log(greeting); } sayHello(); ``` ```` ### Line focusing Focus on specific lines in your code blocks using `focus` with line numbers or ranges. ```javascript Line focusing example focus=2,4,5 theme={null} const greeting = "Hello, World!"; function sayHello() { console.log(greeting); } sayHello(); ``` ````mdx Format theme={null} ```javascript Line focusing example focus={2,4-5} const greeting = "Hello, World!"; function sayHello() { console.log(greeting); } sayHello(); ``` ```` ### Show line numbers Display line numbers on the left side of your code block using `lines`. ```javascript Show line numbers example lines theme={null} const greeting = "Hello, World!"; function sayHello() { console.log(greeting); } sayHello(); ``` ````mdx Format theme={null} ```javascript Show line numbers example lines const greeting = "Hello, World!"; function sayHello() { console.log(greeting); } sayHello(); ``` ```` ### Expandable Allow users to expand and collapse long code blocks using `expandable`. ```python Expandable example expandable theme={null} from datetime import datetime, timedelta from typing import Dict, List, Optional from dataclasses import dataclass @dataclass class Book: title: str author: str isbn: str checked_out: bool = False due_date: Optional[datetime] = None class Library: def __init__(self): self.books: Dict[str, Book] = {} self.checkouts: Dict[str, List[str]] = {} # patron -> list of ISBNs def add_book(self, book: Book) -> None: if book.isbn in self.books: raise ValueError(f"Book with ISBN {book.isbn} already exists") self.books[book.isbn] = book def checkout_book(self, isbn: str, patron: str, days: int = 14) -> None: if patron not in self.checkouts: self.checkouts[patron] = [] book = self.books.get(isbn) if not book: raise ValueError("Book not found") if book.checked_out: raise ValueError("Book is already checked out") if len(self.checkouts[patron]) >= 3: raise ValueError("Patron has reached checkout limit") book.checked_out = True book.due_date = datetime.now() + timedelta(days=days) self.checkouts[patron].append(isbn) def return_book(self, isbn: str) -> float: book = self.books.get(isbn) if not book or not book.checked_out: raise ValueError("Book not found or not checked out") late_fee = 0.0 if datetime.now() > book.due_date: days_late = (datetime.now() - book.due_date).days late_fee = days_late * 0.50 book.checked_out = False book.due_date = None # Remove from patron's checkouts for patron, books in self.checkouts.items(): if isbn in books: books.remove(isbn) break return late_fee def search(self, query: str) -> List[Book]: query = query.lower() return [ book for book in self.books.values() if query in book.title.lower() or query in book.author.lower() ] def main(): library = Library() # Add some books books = [ Book("The Hobbit", "J.R.R. Tolkien", "978-0-261-10295-4"), Book("1984", "George Orwell", "978-0-452-28423-4"), ] for book in books: library.add_book(book) # Checkout and return example library.checkout_book("978-0-261-10295-4", "patron123") late_fee = library.return_book("978-0-261-10295-4") print(f"Late fee: ${late_fee:.2f}") if __name__ == "__main__": main() ``` ````text Format theme={null} ```python Expandable example expandable from datetime import datetime, timedelta from typing import Dict, List, Optional from dataclasses import dataclass # ... if __name__ == "__main__": main() ``` ```` ### Wrap Enable text wrapping for long lines using `wrap`. This prevents horizontal scrolling and makes long lines easier to read. ```javascript Wrap example wrap theme={null} const greeting = "Hello, World! I am a long line of text that will wrap to the next line."; function sayHello() { console.log(greeting); } sayHello(); ``` ````mdx Format theme={null} ```javascript Wrap example wrap const greeting = "Hello, World! I am a long line of text that will wrap to the next line."; function sayHello() { console.log(greeting); } sayHello(); ``` ```` ### Diff Show a visual diff of added or removed lines in your code blocks. Added lines are highlighted in green and removed lines are highlighted in red. To create diffs, add these special comments at the end of lines in your code block: * `// [!code ++]`: Mark a line as added (green highlight). * `// [!code --]`: Mark a line as removed (red highlight). For multiple consecutive lines, specify the number of lines after a colon: * `// [!code ++:3]`: Mark the current line plus the next two lines as added. * `// [!code --:5]`: Mark the current line plus the next four lines as removed. The comment syntax must match your programming language (for example, `//` for JavaScript or `#` for Python). ```js Diff example lines theme={null} const greeting = "Hello, World!"; // [!code ++] function sayHello() { console.log("Hello, World!"); // [!code --] console.log(greeting); // [!code ++] } sayHello(); ``` ````text Format theme={null} ```js Diff example lines const greeting = "Hello, World!"; // [!code ++] function sayHello() { console.log("Hello, World!"); // [!code --] console.log(greeting); // [!code ++] } sayHello(); ``` ```` ## CodeBlock component Use the `` component in custom React components to programmatically render code blocks with the same styling and features as markdown code blocks. ### Props The programming language for syntax highlighting. The filename to display in the code block header. The icon to display in the code block header. See [Icons](/components/icons) for available options. Whether to show line numbers. Whether to wrap the code block. Whether to expand the code block. The lines to highlight. Provide a stringified array of numbers. Example: `"[1,3,4,5]"`. The lines to focus on. Provide a stringified array of numbers. Example: `"[1,3,4,5]"`. ### Example ```jsx theme={null} export const CustomCodeBlock = ({ filename, icon, language, highlight, children, }) => { return ( {children} ); }; ``` # Images and embeds Source: https://mintlify-docs.mintlify.app/create/image-embeds Add images, videos, and iframes. Add images, embed videos, and include interactive content with iframes to your documentation. Photograph of a scenic landscape with purple flowers in the foreground, mountains in the background, and a blue sky with scattered clouds. ## Images Add images to provide visual context, examples, or decoration to your documentation. ### Basic image syntax Use [Markdown syntax](https://www.markdownguide.org/basic-syntax/#images) to add images to your documentation: ```mdx theme={null} ![Alt text describing the image](/path/to/image.png) ``` Always include descriptive alt text to improve accessibility and SEO. The alt text should clearly describe what the image shows. Image files must be less than 20 MB. For larger files, host them on a CDN service like [Amazon S3](https://aws.amazon.com/s3) or [Cloudinary](https://cloudinary.com). ### HTML image embeds For more control over image display, use HTML `` tags: ```jsx theme={null} Main dashboard interface ``` #### Resize images with inline styles Use JSX inline styles with the `style` attribute to resize images: ```jsx theme={null} Diagram showing the architecture of the system ``` #### Disable image zoom To disable the default zoom on click for images, add the `noZoom` property: ```html highlight="4" theme={null} Descriptive alt text ``` #### Link images To make an image a clickable link, wrap the image in an anchor tag and add the `noZoom` property: ```html theme={null} Mintlify logo ``` Images within anchor tags automatically display a pointer cursor to indicate they are clickable. #### Light and dark mode images To display different images for light and dark themes, use Tailwind CSS classes: ```html theme={null} Light mode interface Dark mode interface ``` ### SVG images SVG files that use `foreignObject` elements render differently in production than in local development. Mintlify's image CDN strips `foreignObject` from SVGs as a security measure, which can truncate or hide text and other embedded HTML content. This commonly affects SVGs exported from tools like [draw.io](https://www.drawio.com) that have HTML text formatting or word wrap turned on. To fix this, disable **Formatted Text** and **Word Wrap** on all labels in your diagram before exporting to SVG. See the [draw.io documentation](https://www.drawio.com/doc/faq/svg-export-text-problems) for more information on SVG exports. ## Videos Mintlify supports [HTML tags in Markdown](https://www.markdownguide.org/basic-syntax/#html), giving you flexibility to create rich content. Always include fallback text content within video elements for browsers that don't support video playback. ### YouTube embeds Embed YouTube videos using iframe elements: ```html theme={null} ``` ``` ## Related resources Learn how to use the Frame component for presenting images. # Reusable snippets Source: https://mintlify-docs.mintlify.app/create/reusable-snippets Create reusable snippets to maintain consistency across pages. One of the core principles of software development is DRY (Don't Repeat Yourself), which applies to documentation too. If you find yourself repeating the same content in multiple places, create a custom snippet for that content. Snippets contain content that you can import into other files to reuse. You control where the snippet appears on a page. If you ever need to update the content, you only need to edit the snippet rather than every file where the snippet is used. ## How snippets work Snippets are any `.mdx`, `.md`, or `.jsx` files imported into another file. You can place snippet files anywhere in your project. When you import a snippet into another file, the snippet only appears where you import it and does not render as a standalone page. Any file in the `/snippets/` folder is always a snippet even if it is not imported into another file. ## Create snippets Create a file with the content you want to reuse. Snippets can contain all content types supported by Mintlify and they can import other snippets. ## Import snippets into pages Import snippets into pages using either an absolute or relative path. * **Absolute imports**: Start with `/` for imports from the root of your project. * **Relative imports**: Use `./` or `../` to import snippets relative to the current file's location. Relative imports enable IDE navigation. Press CMD and click a snippet name in your editor to jump directly to the snippet definition. ### Import text Add content to your snippet file that you want to reuse. ```mdx shared/my-snippet.mdx wrap theme={null} Hello world! This is my content I want to reuse across pages. ``` Import the snippet into your destination file using either an absolute or relative path. ```mdx Absolute import theme={null} --- title: "An example page" description: "This is an example page that imports a snippet." --- import MySnippet from "/shared/my-snippet.mdx"; The snippet content displays beneath this sentence. ``` ```mdx Relative import theme={null} --- title: "An example page" description: "This is an example page that imports a snippet." --- import MySnippet from "../shared/my-snippet.mdx"; The snippet content displays beneath this sentence. ``` ### Import variables Reference variables from a snippet in a page. Export variables from a snippet file. ```mdx shared/custom-variables.mdx theme={null} export const myName = "Ronan"; export const myObject = { fruit: "strawberries" }; ; ``` Import the snippet from your destination file and use the variable. ```mdx destination-file.mdx theme={null} --- title: "An example page" description: "This is an example page that imports a snippet with variables." --- import { myName, myObject } from "/shared/custom-variables.mdx"; Hello, my name is {myName} and I like {myObject.fruit}. ``` ### Import snippets with variables Use variables to pass data to a snippet when you import it. Add variables to your snippet and pass in properties when you import it. In this example, the variable is `{word}`. ```mdx shared/my-snippet.mdx theme={null} My keyword of the day is {word}. ``` Import the snippet into your destination file with the variable. The passed property replaces the variable in the snippet definition. ```mdx destination-file.mdx theme={null} --- title: "An example page" description: "This is an example page that imports a snippet with a variable." --- import MySnippet from "/shared/my-snippet.mdx"; ``` ### Import React components Create a snippet with a JSX component. See [React components](/customize/react-components) for more information. ```js components/my-jsx-snippet.jsx theme={null} export const MyJSXSnippet = () => { return (

Hello, world!

); }; ``` When creating JSX snippets, use arrow function syntax (`=>`) rather than function declarations. The `function` keyword is not supported in snippets.
Import the snippet. ```mdx destination-file.mdx theme={null} --- title: "An example page" description: "This is an example page that imports a snippet with a React component." --- import { MyJSXSnippet } from "/components/my-jsx-snippet.jsx"; ```
# Format text Source: https://mintlify-docs.mintlify.app/create/text Learn how to format text, create headers, and style content. ## Headers Headers organize your content and create navigation anchors. They appear in the table of contents and help users scan your documentation. ### Creating headers Use `#` symbols to create headers of different levels: ```mdx theme={null} ## Main section header ### Subsection header #### Sub-subsection header ``` Use descriptive, keyword-rich headers that clearly indicate the content that follows. This improves both user navigation and search engine optimization. ### Disabling anchor links By default, headers include clickable anchor links that allow users to link directly to specific sections. You can disable these anchor links using the `noAnchor` prop in HTML or React headers. ```mdx HTML header example theme={null}

Header without anchor link

``` ```mdx React header example theme={null} Header without anchor link ```
When `noAnchor` is used, the header does not display the anchor chip and clicking the header text does not copy the anchor link to the clipboard. ## Text formatting We support most Markdown formatting for emphasizing and styling text. ### Basic formatting Apply these formatting styles to your text: | Style | Syntax | Example | Result | | ----------------- | ---------- | ---------------------- | ---------------------- | | **Bold** | `**text**` | `**important note**` | **important note** | | *Italic* | `_text_` | `_emphasis_` | *emphasis* | | ~~Strikethrough~~ | `~text~` | `~deprecated feature~` | ~~deprecated feature~~ | ### Combining formats You can combine formatting styles: ```mdx theme={null} **_bold and italic_** **~~bold and strikethrough~~** *~~italic and strikethrough~~* ``` ***bold and italic***
**~~bold and strikethrough~~**
*~~italic and strikethrough~~* ### Superscript and subscript For mathematical expressions or footnotes, use HTML tags: | Type | Syntax | Example | Result | | ----------- | ----------------- | --------------------- | ------------------- | | Superscript | `text` | `example2` | example2 | | Subscript | `text` | `examplen` | examplen | ## Links Links help users navigate between pages and access external resources. Use descriptive link text to improve accessibility and user experience. ### Internal links Link to other pages in your documentation using root-relative paths: ```mdx theme={null} [Quickstart](/quickstart) [Steps](/components/steps) ``` [Quickstart](/quickstart)
[Steps](/components/steps) ### External links For external resources, include the full URL: ```mdx theme={null} [Markdown Guide](https://www.markdownguide.org/) ``` [Markdown Guide](https://www.markdownguide.org/) ### Broken links You can check for broken links in your documentation using the [CLI](/installation): ```bash theme={null} mint broken-links ``` ## Blockquotes Blockquotes highlight important information, quotes, or examples within your content. ### Single line blockquotes Add `>` before text to create a blockquote: ```mdx theme={null} > This is a quote that stands out from the main content. ``` > This is a quote that stands out from the main content. ### Multi-line blockquotes For longer quotes or multiple paragraphs: ```mdx theme={null} > This is the first paragraph of a multi-line blockquote. > > This is the second paragraph, separated by an empty line with `>`. ``` > This is the first paragraph of a multi-line blockquote. > > This is the second paragraph, separated by an empty line with `>`. Use blockquotes sparingly to maintain their visual impact and meaning. Consider using [callouts](/components/callouts) for notes, warnings, and other information. ## Mathematical expressions We support LaTeX for rendering mathematical expressions and equations. You can override automated detection by configuring `styles.latex` in your `docs.json` [settings](/organize/settings#param-latex). ### Inline math Use single dollar signs, `$`, for inline mathematical expressions: ```mdx theme={null} The Pythagorean theorem states that $(a^2 + b^2 = c^2)$ in a right triangle. ``` The Pythagorean theorem states that $(a^2 + b^2 = c^2)$ in a right triangle. ### Block equations Use double dollar signs, `$$`, for standalone equations: ```mdx theme={null} $$ E = mc^2 $$ ``` $$ E = mc^2 $$ LaTeX support requires proper mathematical syntax. Refer to the [LaTeX documentation](https://www.latex-project.org/help/documentation/) for comprehensive syntax guidelines. ## Line breaks and spacing Control spacing and line breaks to improve content readability. ### Paragraph breaks Separate paragraphs with blank lines: ```mdx theme={null} This is the first paragraph. This is the second paragraph, separated by a blank line. ``` This is the first paragraph. This is the second paragraph, separated by a blank line. ### Manual line breaks Use HTML `
` tags for forced line breaks within paragraphs: ```mdx theme={null} This line ends here.
This line starts on a new line. ``` This line ends here.
This line starts on a new line. In most cases, paragraph breaks with blank lines provide better readability than manual line breaks. ## Best practices ### Content organization * Use headers to create clear content hierarchy * Follow proper header hierarchy (don't skip from H2 to H4) * Write descriptive, keyword-rich header text ### Text formatting * Use bold for emphasis, not for entire paragraphs * Reserve italics for terms, titles, or subtle emphasis * Avoid over-formatting that distracts from content ### Links * Write descriptive link text instead of "click here" or "read more" * Use root-relative paths for internal links * Test links regularly to prevent broken references # Custom domain Source: https://mintlify-docs.mintlify.app/customize/custom-domain Host your documentation on a custom domain with automatic SSL/TLS certificates. Host your documentation on your own custom domain instead of the default Mintlify subdomain. Setting up a custom domain involves adding it to your dashboard and configuring DNS records with your domain provider. Looking to set up a subpath like `example.com/docs`? See [/docs subpath](/deploy/docs-subpath). ## Setup overview Add your custom domain in the Mintlify dashboard. Update DNS settings with your domain provider to point to Mintlify. Allow time for DNS propagation and automatic TLS certificate provisioning. ## Add your custom domain Go to the [Custom domain setup](https://dashboard.mintlify.com/settings/deployment/custom-domain) page in your Mintlify dashboard. Enter your domain name (for example, `docs.example.com` or `www.example.com`) and click **Add domain**. The Custom domain setup page showing the field to enter your custom domain URL. The Custom domain setup page showing the field to enter your custom domain URL. ## Configure DNS settings Log in to your domain provider's website and navigate to your domain's DNS settings. Create a new DNS record with the following values: ```text theme={null} CNAME | docs | cname.mintlify-dns.com. ``` Each domain provider has different ways to add DNS records. Refer to your domain provider's documentation for specific instructions. ### DNS propagation DNS changes typically take 1-24 hours to propagate globally, though it can take up to 48 hours in some cases. You can verify your DNS is configured correctly using [DNSChecker](https://dnschecker.org). Once your DNS records are active, your documentation is first accessible via HTTP. HTTPS is available after Vercel provisions your TLS certificate. ### Automatic TLS provisioning Once your DNS records propagate and resolve correctly, Vercel automatically provisions a free SSL/TLS certificate for your domain using Let's Encrypt. This typically completes within a few hours of DNS propagation, though it can take up to 24 hours in rare cases. Certificates are automatically renewed before expiration. No manual intervention is required for SSL/TLS certificates. The process is fully automated once DNS is properly configured. ### CAA records If your domain uses CAA (Certification Authority Authorization) records, you must authorize Let's Encrypt to issue certificates for your domain. Add the following CAA record to your DNS settings: ```text theme={null} 0 issue "letsencrypt.org" ``` ### Reserved paths The `/.well-known/acme-challenge` path is reserved for certificate validation and cannot be redirected or rewritten. If you have configured redirects or rewrites for this path, certificate provisioning fails. ### Provider-specific settings If Vercel is your domain provider, you must add a verification `TXT` record. This information appears on your dashboard after submitting your custom domain, and is emailed to you. If Cloudflare is your DNS provider, you must enable the "Full (strict)" mode for the SSL/TLS encryption setting. Additionally, disable "Always Use HTTPS" in your Edge Certificates settings. Cloudflare's HTTPS redirect blocks Let's Encrypt from validating your domain during certificate provisioning. ## Set a canonical URL After configuring your DNS, set a canonical URL to ensure search engines index your preferred domain. A canonical URL tells search engines which version of your documentation is the primary one. This improves SEO when your documentation is accessible from multiple URLs and prevents issues with duplicate content. Add the `canonical` meta tag to your `docs.json`: ```json docs.json theme={null} { "seo": { "metatags": { "canonical": "https://www.your-custom-domain-here.com" } } } ``` Replace `https://www.your-custom-domain-here.com` with your actual custom domain. For example, if your custom domain is `docs.mintlify.com`, you would use: ```json docs.json theme={null} { "seo": { "metatags": { "canonical": "https://docs.mintlify.com" } } } ``` Setting a canonical URL is especially important if your documentation is accessible from both your custom domain and the default Mintlify subdomain. # Fonts Source: https://mintlify-docs.mintlify.app/customize/fonts Customize typography with Google Fonts, local fonts, or externally hosted fonts. Set a custom font for your entire site or separately for headings and body text. Use Google Fonts, local font files, or externally hosted fonts. The default font varies by theme. Fonts are controlled by the [fonts property](/organize/settings#param-fonts) in your `docs.json`. ## Google Fonts Mintlify automatically loads [Google Fonts](https://fonts.google.com) when you specify a font family name in your `docs.json`. ```json docs.json theme={null} { "fonts": { "family": "Inter" } } ``` No additional configuration is needed for Google Fonts. Simply specify the font family name and Mintlify handles the rest. ## Local fonts To use local fonts, place your font files in your project directory and reference them in your `docs.json` configuration. ### Setting up local fonts Create a `fonts` directory in your project and add your font files: ```text theme={null} your-project/ ├── fonts/ │ ├── InterDisplay-Regular.woff2 │ └── InterDisplay-Bold.woff2 ├── docs.json └── ... ``` Reference your local fonts using relative paths from your project root: ```json docs.json theme={null} { "fonts": { "family": "InterDisplay", "source": "/fonts/InterDisplay-Regular.woff2", "format": "woff2", "weight": 400 } } ``` ### Local fonts for headings and body Configure separate local fonts for headings and body text in your `docs.json`: ```json docs.json theme={null} { "fonts": { "heading": { "family": "InterDisplay", "source": "/fonts/InterDisplay-Bold.woff2", "format": "woff2", "weight": 700 }, "body": { "family": "InterDisplay", "source": "/fonts/InterDisplay-Regular.woff2", "format": "woff2", "weight": 400 } } } ``` When specifying separate fonts for headings and body, both configurations must include all required fields (family, source, format, and weight). ## Externally hosted fonts Use externally hosted fonts by referencing a font source URL in your `docs.json`: ```json docs.json theme={null} { "fonts": { "family": "Hubot Sans", "source": "https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2", "format": "woff2", "weight": 400 } } ``` Externally hosted fonts should use HTTPS URLs and support CORS to ensure they load correctly across all browsers. ## Font configuration reference Font configuration for your documentation. Font family name, such as "Inter" or "Playfair Display". Font weight, such as 400 or 700. Variable fonts support precise weights such as 550. URL to your font source, such as `https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2`, or path to your local font file, such as `/assets/fonts/InterDisplay.woff2`. Google Fonts are loaded automatically when you specify a Google Font `family` name, so no source URL is needed. Font file format. Required when using the `source` field. Override font settings specifically for headings. Font family name for headings. Font weight for headings. URL to your font source, such as `https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2`, or path to your local font file for headings. Google Fonts are loaded automatically when you specify a Google Font `family` name, so no source URL is needed. Font file format for headings. Required when using the `source` field. Override font settings specifically for body text. Font family name for body text. Font weight for body text. URL to your font source, such as `https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2`, or path to your local font file for body text. Google Fonts are loaded automatically when you specify a Google Font `family` name, so no source URL is needed. Font file format for body text. Required when using the `source` field. # React components Source: https://mintlify-docs.mintlify.app/customize/react-components Build interactive and reusable elements with React components in your documentation. [React components](https://react.dev) are a powerful way to create interactive and reusable elements in your documentation. Use React hooks to build dynamic interfaces that respond to user interactions. ## Using React components You can build React components directly in your MDX files using [React hooks](https://react.dev/reference/react/hooks). ### Example: Counter component This example declares a `Counter` component and then uses it with ``. ```mdx theme={null} export const Counter = () => { const [count, setCount] = useState(0) const increment = () => setCount(count + 1) const decrement = () => setCount(count - 1) return (
{count}
) } ``` The counter renders as an interactive React component with increment and decrement buttons. React components defined in MDX files have access to all standard React hooks including `useState`, `useEffect`, `useMemo`, and more. ## Importing components To import React components in your MDX files, the component files must be located in the `/snippets/` folder. Learn more about [reusable snippets](/create/reusable-snippets). Nested imports are not supported. If a React component references other components, you must import all components directly into the parent MDX file rather than importing components within component files. ### Example: Color generator This example demonstrates a more complex `ColorGenerator` component that uses multiple React hooks. Create a `color-generator.jsx` file in the `snippets` folder: ```jsx /snippets/color-generator.jsx theme={null} export const ColorGenerator = () => { const [hue, setHue] = useState(180) const [saturation, setSaturation] = useState(50) const [lightness, setLightness] = useState(50) const [colors, setColors] = useState([]) useEffect(() => { const newColors = [] for (let i = 0; i < 5; i++) { const l = Math.max(10, Math.min(90, lightness - 20 + i * 10)) newColors.push(`hsl(${hue}, ${saturation}%, ${l}%)`) } setColors(newColors) }, [hue, saturation, lightness]) const copyToClipboard = (color) => { navigator.clipboard .writeText(color) .then(() => { console.log(`Copied ${color} to clipboard!`) }) .catch((err) => { console.error("Failed to copy: ", err) }) } return (
{colors.map((color, idx) => (
copyToClipboard(color)} /> ))}

Base color: hsl({hue}, {saturation}%, {lightness}%)

) } ``` Import the `ColorGenerator` component and use it in an MDX file: ```mdx theme={null} import { ColorGenerator } from "/snippets/color-generator.jsx" ``` The color generator renders as an interactive React component with sliders to adjust hue, saturation, and lightness. ## Considerations React hook components render on the client-side, which has several implications: * **SEO**: Search engines might not fully index dynamic content. * **Initial load**: Visitors may experience a flash of loading content before components render. * **Accessibility**: Ensure dynamic content changes are announced to screen readers. * **Optimize dependency arrays**: Include only necessary dependencies in your `useEffect` dependency arrays. * **Memoize complex calculations**: Use `useMemo` or `useCallback` for expensive operations. * **Reduce re-renders**: Break large components into smaller ones to prevent cascading re-renders. * **Lazy loading**: Consider lazy loading complex components to improve initial page load time. When building React components for documentation, prioritize accessibility by using semantic HTML, ARIA labels, and keyboard navigation support. # Themes Source: https://mintlify-docs.mintlify.app/customize/themes Choose the appearance of your documentation with pre-built themes. Customize the appearance of your documentation by selecting from a variety of professionally designed themes. Each theme offers distinct visual aesthetics and layouts to match your brand and content style. ## Configuring themes Set your theme in `docs.json` using the [theme](/organize/settings#param-theme) configuration property: ```json docs.json theme={null} { "theme": "mint" } ``` ## Available themes Mintlify offers nine professionally designed themes, each with unique aesthetics and navigation patterns: Classic documentation theme with time-tested layouts and familiar navigation. Modern, clean aesthetics perfect for AI and SaaS products. Sophisticated fintech theme with deep customization for enterprise documentation. Stripped-back essentials for distraction-free documentation. Retro terminal vibes with monospace fonts for that 80s hacker aesthetic. Card-based organization meets minimalist design for intuitive navigation. Modern documentation crafted for complex navigation and custom components. Minimal, elegant layouts designed for large-scale content-focused documentation. Clean, minimal design for polished documentation. ## Preview themes Click on any theme card above to preview it in action. Each preview link showcases the theme's navigation structure, typography, color palette, and overall visual design. Choose a theme that complements your brand identity and matches your documentation's complexity level. Enterprise products may benefit from Palm, while developer tools might prefer Linden or Mint. # Authentication setup Source: https://mintlify-docs.mintlify.app/deploy/authentication-setup Control access to your documentation by authenticating users. [Pro plans](https://mintlify.com/pricing?ref=authentication) include password authentication. [Enterprise plans](https://mintlify.com/pricing?ref=authentication) include all authentication methods. Authentication requires users to log in before accessing your documentation. When you enable authentication, users must log in to access any content. You can configure specific pages or groups as public while keeping other pages protected. ## Configure authentication Select the handshake method that you want to configure. Password authentication provides access control only and does **not** support user-specific features like group-based access control or API playground pre-filling. ### Prerequisites * Your security requirements allow sharing passwords among users. ### Set up 1. In your dashboard, go to [Authentication](https://dashboard.mintlify.com/products/authentication). 2. Enable authentication. 3. In the **Password Protection** section, enter a secure password After you enter a password, your site redeploys. When it finishes deploying, anyone who visits your site must enter the password to access your content. Securely share the password and documentation URL with authorized users. ### Example You host your documentation at `docs.foo.com` and you need basic access control without tracking individual users. You want to prevent public access while keeping setup simple. **Create a strong password** in your dashboard. **Share credentials** with authorized users. ### Prerequisites * Everyone who needs to access your documentation must be a member of your Mintlify organization. ### Set up 1. In your dashboard, go to [Authentication](https://dashboard.mintlify.com/products/authentication). 2. Enable authentication. 3. In the **Custom Authentication** section, click **Mintlify Auth**. 4. Click **Enable Mintlify Auth**. After you enable Mintlify authentication, your site redeploys. When it finishes deploying, anyone who visits your site must log in to your Mintlify organization to access your content. 1. In your dashboard, go to [Members](https://dashboard.mintlify.com/settings/organization/members). 2. Add each person who should have access to your documentation. 3. Assign appropriate roles based on their editing permissions. ### Example You host your documentation at `docs.foo.com` and your entire team has access to your dashboard. You want to restrict access to team members only. **Enable Mintlify authentication** in your dashboard settings. **Verify team access** by checking that all team members are active in your organization. ### Prerequisites * An OAuth or OIDC server that supports the Authorization Code Flow. * Ability to create an API endpoint accessible by OAuth access tokens (optional, to enable group-based access control). ### Set up 1. In your dashboard, go to [Authentication](https://dashboard.mintlify.com/products/authentication). 2. Enable authentication. 3. In the **Custom Authentication** section, click **OAuth**. 4. Configure these fields: * **Authorization URL**: Your OAuth endpoint. * **Client ID**: Your OAuth 2.0 client identifier. * **Client Secret**: Your OAuth 2.0 client secret. * **Scopes** (optional): Permissions to request. Copy the **entire** scope string (for example, for a scope like `provider.users.docs`, copy the complete `provider.users.docs`). Use multiple scopes if you need different access levels. * **Additional authorization parameters** (optional): Additional query parameters to add to the initial authorization request. * **Token URL**: Your OAuth token exchange endpoint. * **Info API URL** (optional): Endpoint on your server that Mintlify calls to retrieve user info. Required for group-based access control. If omitted, the OAuth flow only verifies identity. * **Logout URL** (optional): The native logout URL for your OAuth provider. When users log out, Mintlify validates the logout redirect against this configured URL for security. The redirect only succeeds if it exactly matches the configured `logoutUrl`. If you do not configure a logout URL, users redirect to `/login`. Mintlify redirects users with a `GET` request and does not append query parameters, so include any parameters (for example, `returnTo`) directly in the URL. * **Redirect URL** (optional): The URL to redirect users to after authentication. 5. Click **Save changes**. After you configure your OAuth settings, your site redeploys. When it finishes deploying, anyone who visits your site must log in to your OAuth provider to access your content. 1. Copy the **Redirect URL** from your [authentication settings](https://dashboard.mintlify.com/products/authentication). 2. Add the redirect URL as an authorized redirect URL for your OAuth server. To enable group-based access control, create an API endpoint that: * Responds to `GET` requests. * Accepts an `Authorization: Bearer ` header for authentication. * Returns user data in the `User` format. See [User data format](#user-data-format) for more information. Mintlify calls this endpoint with the OAuth access token to retrieve user information. No additional query parameters are sent. Add this endpoint URL to the **Info API URL** field in your [authentication settings](https://dashboard.mintlify.com/products/authentication). ### Example You host your documentation at `foo.com/docs` and you have an existing OAuth server at `auth.foo.com` that supports the Authorization Code Flow. **Configure your OAuth server details** in your dashboard: * **Authorization URL**: `https://auth.foo.com/authorization` * **Client ID**: `ydybo4SD8PR73vzWWd6S0ObH` * **Scopes**: `['provider.users.docs']` * **Token URL**: `https://auth.foo.com/exchange` * **Info API URL**: `https://api.foo.com/docs/user-info` * **Logout URL**: `https://auth.foo.com/logout?returnTo=https%3A%2F%2Ffoo.com%2Fdocs` **Create a user info endpoint** at `api.foo.com/docs/user-info`, which requires an OAuth access token with the `provider.users.docs` scope, and returns: ```json theme={null} { "groups": ["engineering", "admin"], "expiresAt": 1735689600, "apiPlaygroundInputs": { "header": { "Authorization": "Bearer user_abc123" } } } ``` Control session length with the `expiresAt` field in your user info response. This is a Unix timestamp (seconds since epoch) indicating when the session should expire. See [User data format](#user-data-format) for more details. **Configure your OAuth server to allow redirects** to your callback URL. ### Prerequisites * An authentication system that can generate and sign JWTs. * A backend service that can create redirect URLs. ### Set up 1. In your dashboard, go to [Authentication](https://dashboard.mintlify.com/products/authentication). 2. Enable authentication. 3. In the **Custom Authentication** section, click **JWT**. 4. Enter the URL of your existing login flow. 5. Click **Save changes**. 6. Click **Generate new key**. 7. Store your key securely where it can be accessed by your backend. After you generate a private key, your site redeploys. When it finishes deploying, anyone who visits your site must log in to your JWT authentication system to access your content. Modify your existing login flow to include these steps after user authentication: * Create a JWT containing the authenticated user's info in the `User` format. See [User data format](#user-data-format) for more information. * Sign the JWT with your secret key, using the EdDSA algorithm. * Create a redirect URL back to the `/login/jwt-callback` path of your docs, including the JWT as the hash. ### Example You host your documentation at `docs.foo.com` with an existing authentication system at `foo.com`. You want to extend your login flow to grant access to the docs while keeping your docs separate from your dashboard (or you don't have a dashboard). Create a login endpoint at `https://foo.com/docs-login` that extends your existing authentication. After verifying user credentials: * Generate a JWT with user data in Mintlify's format. * Sign the JWT and redirect to `https://docs.foo.com/login/jwt-callback#{SIGNED_JWT}`. ```ts TypeScript theme={null} import * as jose from 'jose'; import { Request, Response } from 'express'; const TWO_WEEKS_IN_MS = 1000 * 60 * 60 * 24 * 7 * 2; const signingKey = await jose.importPKCS8(process.env.MINTLIFY_PRIVATE_KEY, 'EdDSA'); export async function handleRequest(req: Request, res: Response) { const user = { expiresAt: Math.floor((Date.now() + TWO_WEEKS_IN_MS) / 1000), // 2 week session expiration groups: res.locals.user.groups, apiPlaygroundInputs: { header: { "Authorization": `Bearer ${res.locals.user.apiKey}`, }, }, }; const jwt = await new jose.SignJWT(user) .setProtectedHeader({ alg: 'EdDSA' }) .setExpirationTime('10 s') // 10 second JWT expiration .sign(signingKey); return res.redirect(`https://docs.foo.com/login/jwt-callback#${jwt}`); } ``` ```python Python theme={null} import jwt # pyjwt import os from datetime import datetime, timedelta from fastapi.responses import RedirectResponse private_key = os.getenv(MINTLIFY_JWT_PEM_SECRET_NAME, '') @router.get('/auth') async def return_mintlify_auth_status(current_user): jwt_token = jwt.encode( payload={ 'exp': int((datetime.now() + timedelta(seconds=10)).timestamp()), # 10 second JWT expiration 'expiresAt': int((datetime.now() + timedelta(weeks=2)).timestamp()), # 2 week session expiration 'groups': ['admin'] if current_user.is_admin else [], 'apiPlaygroundInputs': { 'header': { 'Authorization': f'Bearer {current_user.api_key}', }, }, }, key=private_key, algorithm='EdDSA' ) return RedirectResponse(url=f'https://docs.foo.com/login/jwt-callback#{jwt_token}', status_code=302) ``` ### Redirect unauthenticated users When an unauthenticated user tries to access a protected page, the redirect to your login URL preserves the user's intended destination. 1. User attempts to visit a protected page: `https://docs.foo.com/quickstart`. 2. Redirect to your login URL with a redirect query parameter: `https://foo.com/docs-login?redirect=%2Fquickstart`. 3. After authentication, redirect to `https://docs.foo.com/login/jwt-callback?redirect=%2Fquickstart#{SIGNED_JWT}`. 4. User lands in their original destination. ## Make pages public When using authentication, all pages require authentication to access by default. You can make specific pages viewable without authentication at the page or group level with the `public` property. ### Individual pages To make a page public, add `public: true` to the page's frontmatter. ```mdx Public page example theme={null} --- title: "Public page" public: true --- ``` ### Groups of pages To make all pages in a group public, add `"public": true` beneath the group's name in the `navigation` object of your `docs.json`. ```json Public group example theme={null} { "navigation": { "groups": [ { "group": "Public group", "public": true, "icon": "play", "pages": [ "quickstart", "installation", "settings" ] }, { "group": "Private group", "icon": "pause", "pages": [ "private-information", "secret-settings" ] } ] } } ``` ## Control access with groups When you use OAuth or JWT authentication, you can restrict specific pages to certain user groups. This is useful when you want different users to see different content based on their role or attributes. Manage groups through user data passed during authentication. See [User data format](#user-data-format) for details. ```json Example user info theme={null} { "groups": ["admin", "beta-users"], "expiresAt": 1735689600 } ``` Specify which groups can access specific pages using the `groups` property in frontmatter. ```mdx Example page restricted to the admin group highlight={3} theme={null} --- title: "Admin dashboard" groups: ["admin"] --- ``` Users must belong to at least one of the listed groups to access the page. If a user tries to access a page without the required group, they'll receive a 404 error. ### How groups interact with public pages * All pages require authentication by default. * Pages with a `groups` property are only accessible to authenticated users in those groups. * Pages without a `groups` property are accessible to all authenticated users. * Pages with `public: true` and no `groups` property are accessible to everyone. ```mdx Public page theme={null} --- title: "Public guide" public: true --- ``` ```mdx Protected page theme={null} --- title: "API reference" --- ``` ```mdx Protected page with groups theme={null} --- title: "Advanced configurations" groups: ["pro", "enterprise"] --- ``` ## User data format When using OAuth or JWT authentication, your system returns user data that controls session length, group membership, and [content personalization](/create/personalization). ```tsx Format theme={null} type User = { expiresAt?: number; groups?: string[]; content?: Record; apiPlaygroundInputs?: { server?: Record; header?: Record; query?: Record; cookie?: Record; path?: Record; }; }; ``` ```json Example theme={null} { "expiresAt": 1735689600, "groups": ["admin", "beta-users"], "content": { "firstName": "Jane", "company": "Acme Corp" }, "apiPlaygroundInputs": { "header": { "Authorization": "Bearer user_abc123" }, "server": { "baseUrl": "https://api.foo.com" } } } ``` Session expiration time in seconds since epoch. When the current time passes this value, the user must re-authenticate. **For JWT:** This differs from the JWT's `exp` claim, which determines when a JWT is considered invalid. Set the JWT `exp` claim to a short duration (10 seconds or less) for security. Use `expiresAt` for the actual session length (hours to weeks). List of groups the user belongs to. Pages with matching `groups` in their frontmatter are accessible to this user. **Example**: A user with `groups: ["admin", "engineering"]` can access pages tagged with either the `admin` or `engineering` groups. Custom data accessible in MDX pages via the `user` variable for [personalized content](/create/personalization#dynamic-mdx-content). Pre-fills API playground fields with user-specific values. When a user authenticates, these values populate the corresponding input fields in the API playground. Users can override pre-filled values, and their overrides persist in local storage. Only values that match the current endpoint's security scheme are applied. Header values to pre-fill, keyed by header name. Query parameter values to pre-fill, keyed by parameter name. Cookie values to pre-fill, keyed by cookie name. Server variable values to pre-fill, keyed by variable name. Path parameter values to pre-fill, keyed by parameter name. # Deployments Source: https://mintlify-docs.mintlify.app/deploy/deployments Manage deployments, view history, and monitor status. Your documentation site automatically deploys when you push changes to your connected repository. This requires the Mintlify GitHub app to be properly installed and connected. If your latest changes are not appearing on your live site, first check that the GitHub account or organization that owns your docs repository has the GitHub App installed. See [GitHub troubleshooting](/deploy/github#troubleshooting) for more information. If you have the GitHub App installed, but changes are still not deploying, manually trigger a deployment from your dashboard. ## Manually trigger a deployment Check that your latest commit appears in your docs repository and did not encounter any errors. Go to your [dashboard](https://dashboard.mintlify.com) and select the deploy button. The manual update button emphasized with an orange rectangle. The manual update button emphasized with an orange rectangle. ## Delete a deployment You can permanently delete a deployment from the [Danger zone](https://dashboard.mintlify.com/settings/organization/danger-zone) in your dashboard settings. This action is irreversible and removes all deployment data, including any associated preview deployments. Go to the [Danger zone](https://dashboard.mintlify.com/settings/organization/danger-zone) in the settings page of your dashboard. 1. In the **Delete my deployment** section, provide a reason for deletion. 2. Click the delete button and confirm that you want to delete the deployment. Deleting a deployment is permanent and cannot be undone. If you have an active subscription, you'll receive a prorated credit for any unused time remaining in your billing period. If you have multiple deployments, you'll be redirected to another deployment after deletion. If you delete your only deployment, you'll be redirected to the Mintlify homepage. When you delete a deployment, the organization admin receives an email notification confirming the deletion. # GitHub Source: https://mintlify-docs.mintlify.app/deploy/github Connect to a GitHub repository for automated deployments, pull request previews, and continuous synchronization. Mintlify uses a GitHub App to automatically sync your documentation with your GitHub repository. **Do you need the GitHub App?** * **Mintlify-hosted repository** in the `mintlify-community` organization: No. The GitHub App is already configured. * **Your own repository**: Yes. Install the GitHub App to enable automatic deployments when you push changes. See your repository in the [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) page of your dashboard. If your repository is in a private repository owned by the Mintlify organization, the GitHub App is automatically configured and managed by Mintlify. You can use the web editor to make changes to your documentation. If you want to work on your documentation locally, clone the repository to your own organization and update your Git settings to use your own repository. ## Clone to your own repository If you skipped connecting your own Git repository during onboarding, your documentation lives in a private repository owned by the Mintlify organization. To move it to your own account or organization: 1. Go to [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) in your dashboard. 2. Download your documentation as a zip file. 3. Create a new repository on GitHub or GitLab. 4. Extract the zip contents and push them to your new repository. 5. Return to [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) and connect your new repository to Mintlify. 6. Install the GitHub App by following the steps in [Install the GitHub App](#install-the-github-app) below. ## Install the GitHub App You must have organization ownership or administrator permissions in a repository to install the app. If you lack the necessary permissions, the repository owner must approve the installation request. Install the Mintlify GitHub App through your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app). We recommend only granting access to your documentation repository. Mintlify GitHub App installation page with the 'Only select repositories' option selected. ## Permissions When you install the GitHub App, grant the following permissions. Read permissions: * `metadata`: Basic repository information Read and write permissions: * `checks`: Create status checks on pull requests * `code`: Read file changes when you commit to your docs branch * `deployments`: Generate preview deployments for pull requests * `pull requests`: Create branches and pull requests from the web editor The app only accesses repositories that you explicitly grant it access to. If you have branch protection rules enabled, the app can't push directly to protected branches. ## Manage repository access When installing the GitHub App, you can grant access to all of your repositories or specific ones. We recommend only granting access to your documentation repository and any repositories that you want to provide as context for the agent. You can modify this selection anytime in your [GitHub App settings](https://github.com/apps/mintlify/installations/new). ## Configure docs source Change the organization, repository, or branch that your documentation builds from in the [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) section of your dashboard. ## GitHub Enterprise with IP allowlists If your GitHub Enterprise Cloud organization has an IP allowlist enabled, you need to add Mintlify's egress IP address (`54.242.90.151`) to your allowlist for the GitHub App to function properly. Follow [GitHub's documentation](https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization) to configure your IP allowlist. ## Troubleshooting ### Deployment not triggering automatically If pushes to your repository don't trigger deployments, check the following possible problems. Check that the correct repository has the app installed. 1. Go to [GitHub App settings](https://dashboard.mintlify.com/settings/organization/github-app) in your dashboard. 2. Check that your repository is on the active app installations list. Ensure that you're pushing to the correct branch. 1. Go to [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) 2. Verify the branch in your dashboard matches the branch that you're pushing to. ### GitHub App connection issues If you encounter problems with the GitHub app, resetting the connection can solve most problems. 1. In GitHub, go to [installations](https://github.com/settings/installations) and select **Configure** next to the Mintlify app. Scroll down and select **Uninstall**. 2. Go to [Authorized GitHub Apps](https://github.com/settings/apps/authorizations) and select **Revoke** next to the Mintlify app. 1. In your Mintlify dashboard, go to [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) and install the GitHub app. 2. Authorize your account in the [My Profile](https://dashboard.mintlify.com/settings/account) section of your dashboard. ### Feedback add-ons are unavailable The edit suggestions and raise issues feedback features are only available for public GitHub repositories. If these options are disabled in your dashboard, check your repository visibility. If your repository is public and you cannot enable the edit suggestions or raise issues options in your dashboard, revalidate your Git settings. Go to [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) in your dashboard. Click the green check mark in the corner of the Git settings box to revalidate your repository settings. This forces an update to your repository settings to reflect whether your repository is public or private. The Git Settings page in the Mintlify dashboard. An orange arrow points to the green check mark that revalidates the repository settings. The Git Settings page in the Mintlify dashboard. An orange arrow points to the green check mark that revalidates the repository settings. # Preview deployments Source: https://mintlify-docs.mintlify.app/deploy/preview-deployments Get unique preview URLs for pull requests to review changes before merging. Preview deployments are available on [Pro and Enterprise plans](https://mintlify.com/pricing?ref=preview-deployments). Preview deployments let you see how changes to your docs look before merging to production. Each preview creates a shareable URL that updates automatically as you push new changes. Preview URLs are publicly viewable by default. Share a preview link with anyone who needs to review your changes. ## Create preview deployments Preview deployments are created automatically through pull requests or manually from your dashboard. ### Automatic previews Automatic previews are only created for pull requests targeting your [deployment branch](/guides/git-concepts#deployment-branch). When you create a pull request, the Mintlify bot automatically adds a link to view the preview deployment in your pull request. The preview updates each time you push new commits to the branch. Link to view deployment in the pull request timeline Link to view deployment in the pull request timeline ### Manual previews You can manually create a preview for any branch. 1. Go to your [dashboard](https://dashboard.mintlify.com/). 2. Select **Previews**. 3. Select **Create custom preview**. 4. Enter the name of the branch you want to preview. 5. Select **Create deployment**. ## Redeploy a preview Redeploy a preview to refresh content or retry after a failed deployment. 1. Select the preview from your [dashboard](https://dashboard.mintlify.com/). 2. Select **Redeploy**. The Previews menu with the deploy button emphasized by an orange rectangle. The Previews menu with the deploy button emphasized by an orange rectangle. ## Preview widget The preview widget appears on preview deployments to help you navigate and review updated pages. The widget is a floating button in the bottom-right corner of your preview deployment. Preview widget expanded to show list of changed files. Preview widget expanded to show list of changed files. 1. Click the widget to show all added, modified, or removed files in the preview. 2. Click a file to view the changes on the corresponding page. 3. Use the search bar to filter the list of changed files. The widget only appears on preview deployments, not on your live site or local previews. ## Restrict access to preview deployments By default, preview deployments are publicly accessible to anyone with the URL. You can restrict access to authenticated members of your Mintlify organization. 1. Navigate to the **Previews** section in the [Add-ons](https://dashboard.mintlify.com/products/addons) page of your dashboard. 2. Click the **Preview authentication** toggle to enable or disable preview authentication. The preview authentication toggle in the Add-ons page The preview authentication toggle in the Add-ons page ## Troubleshooting preview deployments If your preview deployment fails, try these troubleshooting steps. * **View the build logs**: In your [dashboard](https://dashboard.mintlify.com/), go to **Previews** and click the failed preview. The deployment logs show errors that caused failures. * **Check your configuration**: * Invalid `docs.json` syntax * Missing or incorrect file paths referenced in your navigation * Invalid frontmatter in MDX files * Broken image links or missing image files * **Validate locally**: Run `mint dev` locally to catch build errors before pushing to the repository. * **Check recent changes**: Review the most recent commits in your branch to identify what changes caused the build to fail. # Web editor overview Source: https://mintlify-docs.mintlify.app/editor/index Edit and publish documentation in your browser. Decorative image in light mode Decorative image in dark mode Create, edit, and publish documentation directly in your browser with the web editor. View and share previews of your changes; manage your site's navigation structure with drag-and-drop components; and publish updates using your team's preferred workflow. ## Key features * **Visual and Markdown editing**: Switch between visual and Markdown editing modes to suit your workflow. * **Live preview**: See real-time changes without creating a preview deployment. * **Shareable preview links**: Create preview links for your team from the editor. * **Drag-and-drop navigation**: Organize your site structure visually without editing configuration files. * **Git synchronization**: All changes sync automatically with your documentation repository. * **Team collaboration**: Multiple team members can work simultaneously with branch-based workflows. ## Get started Create, edit, and organize pages. Structure your site navigation. Upload and use images, videos, and other assets. Preview your site in real time as you edit. ## Publish and collaborate Save and publish your documentation updates. Work with teams using branches and pull requests. ## Reference Configure site branding, colors, and features. Speed up your workflow with keyboard shortcuts. # Accessibility Source: https://mintlify-docs.mintlify.app/guides/accessibility Create documentation that as many people as possible can use with WCAG compliance. When you create accessible documentation, you prioritize content design that makes your documentation usable by as many people as possible regardless of how they access and interact with your documentation. Accessible documentation improves the user experience for everyone. Your content is more clear, better structured, and easier to navigate. This guide offers some best practices for creating accessible documentation, but it is not exhaustive. You should consider accessibility an ongoing process. Technologies and standards change over time, which introduce new opportunities to improve documentation. ## What is accessibility? Accessibility (sometimes abbreviated as a11y for the number of letters between the first and last letters of "accessibility") is intentionally designing and building websites and tools that as many people as possible can use. People with temporary or permanent disabilities should have the same level of access to digital technologies. And designing for accessibility benefits everyone, including people who access your website on mobile devices or slow networks. Accessible documentation follows web accessibility standards, primarily the [Web Content Accessibility Guidelines (WCAG)](https://www.w3.org/WAI/WCAG22/quickref/). These guidelines help ensure your content is perceivable, operable, understandable, and robust. ## Getting started with accessibility Making your documentation accessible is a process. You don't have to fix everything all at once and you can't do it only once. If you're just beginning to implement accessibility practices for your documentation, consider a phased approach where you start with high-impact changes and build from there. ### First steps Here are three things you can do right now to improve the accessibility of your documentation: 1. **Run `mint a11y`** to identify accessibility issues in your content. 2. **Add alt text** to all images. 3. **Check your heading hierarchy** to ensure one H1 per page and headings follow sequential order. ### Plan your accessibility work The best workflow is the one that works for your team. Here is one way that you can approach accessibility work: **Phase 1: Images and structure** * Review all images for descriptive alt text. * Audit link text and replace generic phrases like "click here." * Fix heading hierarchy issues across your documentation. **Phase 2: Navigation and media** * Test keyboard navigation on your documentation. * Test screen reader support. * Add captions and transcripts to embedded videos. * Review color contrast. **Phase 3: Build it into your workflow** * Run `mint a11y` before publishing new content. * Include accessibility checks in your content review process. * Test keyboard navigation when adding interactive features. * Verify new external links and embeds include proper titles and descriptions. Starting small and building accessibility into your regular workflow makes it sustainable. Each improvement helps more users access your documentation successfully. ## Structure your content Well-structured content is easier to navigate and understand, especially for screen reader users who rely on headings to move through pages and people who use keyboard navigation. ### Use proper heading hierarchy Each page should have a single H1 heading, which is defined by the `title:` property in a page's frontmatter. Use additional headings in order without skipping. For example, don't skip from H2 to H4. ```mdx theme={null} # Page title (H1) ## Main section (H2) ### Subsection (H3) ### Another subsection (H3) ## Another main section (H2) # Page title (H1) ## Main section (H2) #### Subsection (H4) ### Another subsection (H3) ``` Headings at the same level should have unique names. ```mdx theme={null} ## Accessibility tips (H2) ### Write effective alt text (H3) ### Use proper color contrast (H3) ## Accessibility tips (H2) ### Tip (H3) ### Tip (H3) ``` ### Write descriptive link text Link text should be meaningful and connected to the destination. Avoid vague phrases like "click here" or "read more." ```mdx theme={null} Learn how to [configure your navigation](/organize/navigation). [Learn more](/organize/navigation). ``` ### Keep content scannable * Break up long paragraphs. * Use lists for steps and options. * Highlight information with callouts. ### Use proper table structure Use tables sparingly and only for tabular data that has meaning inherited from the column and row headers. When using tables, include headers so screen readers can associate data with the correct column: ```mdx theme={null} | Feature | Status | | ------- | ------ | | Search | Active | | Analytics | Active | ``` ## Write descriptive alt text Alt text makes images accessible to screen reader users and appears when images fail to load. Images in your documentation should have alt text that describes the image and makes it clear why the image is included. Even with alt text, you should not rely on images alone to convey information. Make sure your content describes what the image communicates. ### Write effective alt text * **Be specific**: Describe what the image shows, not just that it's an image. * **Be concise**: Aim for one to two sentences. * **Avoid redundancy**: Don't start with "Image of" because screen readers already know that the alt text is associated with an image. However, you should include descriptions like "Screenshot of" or "Diagram of" if that context is important to the image. ```mdx theme={null} ![Screenshot of the dashboard showing three active projects and two pending invitations](/images/dashboard.png) ![Dashboard screenshot](/images/dashboard.png) ``` ### Add alt text to images For Markdown images, include alt text in the square brackets: ```mdx theme={null} ![Description of the image](/path/to/image.png) ``` For HTML images, use the `alt` attribute: ```html theme={null} Settings panel with accessibility options enabled. The options are emphasized with an orange rectangle. ``` ### Add titles to embedded content Iframes and video embeds require descriptive titles: ```html theme={null} ``` ## Design for readability Visual design choices affect how accessible your documentation is to users with low vision, color blindness, or other visual disabilities. ### Ensure sufficient color contrast If you customize your theme colors, verify the contrast ratios meet WCAG requirements: * Body text: minimum 4.5:1 contrast ratio * Large text: minimum 3:1 contrast ratio * Interactive elements: minimum 3:1 contrast ratio Test both light and dark mode. The `mint a11y` command checks for color contrast. ### Don't rely on color alone If you use color to convey information, include a text label or icon as well. For example, don't mark errors only with red text. Include an error icon or the word "Error." ### Use clear, concise language * Write in plain language. * Define technical terms when first used. * Avoid run-on sentences. * Use active voice. ## Make code examples accessible Code blocks are a core part of technical documentation, but they require specific accessibility considerations to ensure screen reader users can understand them. In general, follow these guidelines: * Break long code examples into smaller, logical chunks. * Comment complex logic within the code. * Consider providing a text description for complex algorithms. * When showing file structure, use actual code blocks with language labels rather than ASCII art. ### Specify the programming language Always declare the language for syntax highlighting. This helps screen readers announce the code context to users: ````mdx theme={null} ```javascript function getUserData(id) { return fetch(`/api/users/${id}`); } ``` ```` ### Provide context around code Provide clear context for code blocks: ````mdx theme={null} The following function fetches user data from the API: ```javascript function getUserData(id) { return fetch(`/api/users/${id}`); } ``` This returns a promise that resolves to the user object. ```` ## Video and multimedia accessibility Videos, animations, and other multimedia content need text alternatives so all users can access the information they contain. ### Add captions to videos Captions make video content accessible to users who are deaf or hard of hearing. They also help users in sound-sensitive environments and non-native speakers: * Use captions for all spoken content in videos. * Include relevant sound effects in captions. * Ensure captions are synchronized with the audio. * Use proper punctuation and speaker identification when multiple people speak. Most video hosting platforms support adding captions. Upload caption files or use auto-generated captions as a starting point, then review for accuracy. ### Provide transcripts Transcripts offer an alternative way to access video content. They're searchable, easier to reference, and accessible to screen readers: ```mdx theme={null} In this tutorial, we'll walk through setting up authentication... ``` Place transcripts near the video or provide a clear link to access them. ### Consider alternatives to video-only content If critical information only appears in a video: * Provide the same information in text form. * Include key screenshots with descriptive alt text. * Create a written tutorial that covers the same material. This ensures users who can't access video content can still complete their task. ## Test your documentation Regular testing helps you catch accessibility issues before users encounter them. ### Check for accessibility issues with `mint a11y` Use the `mint a11y` CLI command to automatically scan your documentation for common accessibility issues: ```bash theme={null} mint a11y ``` The command checks for: * Missing alt text on images and videos. * Insufficient color contrast. When the scan completes, review the reported issues and fix them in your content. Run the command again to verify your fixes. Use flags to check for specific accessibility issues. ```bash theme={null} # Check only for missing alt text mint a11y --skip-contrast # Check only for color contrast issues mint a11y --skip-alt-text ``` ### Basic keyboard navigation test Navigate through your documentation using only your keyboard: 1. Press Tab to move forward through interactive elements. 2. Press Shift + Tab to move backward. 3. Press Enter to activate links and buttons. 4. Verify all interactive elements are reachable and have visible focus indicators. ### Go deeper with accessibility testing For more comprehensive testing: * **Screen readers**: Test with [NVDA (Windows)](https://www.nvaccess.org/) or [VoiceOver (Mac)](https://www.apple.com/accessibility/voiceover/). * **Browser extensions**: Install [axe DevTools](https://www.deque.com/axe/browser-extensions/) or [WAVE](https://wave.webaim.org/extension/) to scan pages for issues. * **WCAG guidelines**: Review the [Web Content Accessibility Guidelines](https://www.w3.org/WAI/WCAG22/quickref/) for detailed standards. ## Additional resources Continue learning about accessibility with these trusted resources: * **[WebAIM](https://webaim.org/)**: Practical articles and tutorials on web accessibility * **[The A11y Project](https://www.a11yproject.com/)**: Community-driven accessibility resources and checklist * **[W3C Web Accessibility Initiative (WAI)](https://www.w3.org/WAI/)**: Official accessibility standards and guidance # Claude Code Source: https://mintlify-docs.mintlify.app/guides/claude-code Configure Claude Code to write, review, and update your documentation. Claude Code is an agentic command line tool that can help you maintain your documentation. It can write new content, review existing pages, and keep docs up to date. You can train Claude Code to understand your documentation standards and workflows by adding a `CLAUDE.md` file to your project and refining it over time. ## Getting started **Prerequisites:** * Active Claude subscription (Pro, Max, or API access) **Setup:** 1. Install Claude Code: ```bash theme={null} npm install -g @anthropic-ai/claude-code ``` 2. Navigate to your docs directory. 3. (Optional) Add the `CLAUDE.md` file below to your project. 4. Run `claude` to start. ## CLAUDE.md template Save a `CLAUDE.md` file at the root of your docs directory to help Claude Code understand your project. This file trains Claude Code on your documentation standards, preferences, and workflows. See [Manage Claude's memory](https://docs.anthropic.com/en/docs/claude-code/memory) in the Anthropic docs for more information. Copy this example template or make changes for your docs specifications: ```mdx theme={null} # Mintlify documentation ## Working relationship - You can push back on ideas-this can lead to better documentation. Cite sources and explain your reasoning when you do so - ALWAYS ask for clarification rather than making assumptions - NEVER lie, guess, or make up anything ## Project context - Format: MDX files with YAML frontmatter - Config: docs.json for navigation, theme, settings - Components: Mintlify components ## Content strategy - Document just enough for user success - not too much, not too little - Prioritize accuracy and usability - Make content evergreen when possible - Search for existing content before adding anything new. Avoid duplication unless it is done for a strategic reason - Check existing patterns for consistency - Start by making the smallest reasonable changes ## docs.json - Refer to the [docs.json schema](https://mintlify.com/docs.json) when building the docs.json file and site navigation ## Frontmatter requirements for pages - title: Clear, descriptive page title - description: Concise summary for SEO/navigation ## Writing standards - Second-person voice ("you") - Prerequisites at start of procedural content - Test all code examples before publishing - Match style and formatting of existing pages - Include both basic and advanced use cases - Language tags on all code blocks - Alt text on all images - Relative paths for internal links ## Git workflow - NEVER use --no-verify when committing - Ask how to handle uncommitted changes before starting - Create a new branch when no clear branch exists for changes - Commit frequently throughout development - NEVER skip or disable pre-commit hooks ## Do not - Skip frontmatter on any MDX file - Use absolute URLs for internal links - Include untested code examples - Make assumptions - always ask for clarification ``` ## Sample prompts Once you have Claude Code set up, try these prompts to see how it can help with common documentation tasks. You can copy and paste these examples directly, or adapt them for your specific needs. ### Convert notes to polished docs Turn rough drafts into proper Markdown pages with components and frontmatter. **Example prompt:** ```text wrap theme={null} Convert this text into a properly formatted MDX page: [paste your text here] ``` ### Review docs for consistency Get suggestions to improve style, formatting, and component usage. **Example prompt:** ```text wrap theme={null} Review the files in docs/ and suggest improvements for consistency and clarity ``` ### Update docs when features change Keep documentation current when your product evolves. **Example prompt:** ```text wrap theme={null} Our API now requires a version parameter. Update our docs to include version=2024-01 in all examples ``` ### Generate comprehensive code examples Create multi-language examples with error handling. **Example prompt:** ```text wrap theme={null} Create code examples for [your API endpoint] in JavaScript, Python, and cURL with error handling ``` ## Extending Claude Code Beyond manually prompting Claude Code, you can integrate it with your existing workflows. ### Automation with GitHub Actions Run Claude Code automatically when code changes to keep docs up to date. You can trigger documentation reviews on pull requests or update examples when API changes are detected. ### Multi-instance workflows Use separate Claude Code sessions for different tasks - one for writing new content and another for reviewing and quality assurance. This helps maintain consistency and catch issues that a single session might miss. ### Team collaboration Share your refined `CLAUDE.md` file with your team to ensure consistent documentation standards across all contributors. Teams often develop project-specific prompts and workflows that become part of their documentation process. ### Custom commands Create reusable slash commands in `.claude/commands/` for frequently used documentation tasks specific to your project or team. # Content types Source: https://mintlify-docs.mintlify.app/guides/content-types Choose the right content type for your documentation goals. This page explains different content types, when to use each one, and how to approach writing for each type. Documentation should be organized around the specific goal you're trying to help people achieve. ## Categorize using the Diátaxis framework The [Diátaxis framework](https://diataxis.fr) is a helpful guide for categorizing content based on your audience's needs. Documentation can generally be mapped into one of these types: 1. Tutorials: Learning-oriented content for new users 2. How-to guides: Task-oriented guidance for specific problems 3. Explanations: Understanding-oriented conceptual discussions 4. Reference: Information-oriented technical descriptions Defining content types helps you plan documentation with a clear purpose and makes it easier for users to find what they need. A diagram of the Diátaxis framework showing four quadrants that correspond to the four content types: Tutorials, How-To Guides, Reference, and Explanation. ## Picking a type | Question | Tutorial | How-To | Reference | Explanation | | :------------------------------------- | :--------------------- | :----------------------- | :----------------------- | :---------------------- | | What is the user's goal? | Learn through practice | Solve a specific problem | Find precise information | Understand concepts | | What is the user's knowledge? | Beginner | Intermediate | Experienced | Any level | | What is the primary focus? | Learning by doing | Achieving a goal | Providing information | Deepening understanding | | How is the content structured? | Step-by-step | Problem-solution | Organized facts | Conceptual discussions | | Is it task-oriented? | Yes, guided tasks | Yes, specific tasks | No, informational | No, conceptual | | Is it designed for linear progression? | Yes | No | No | No | ## Writing for each type ### Tutorials (Learning-oriented) * **Audience goal**: Learn something new through step-by-step instructions. * **Characteristics**: Sequential and assumes no prior knowledge. * **Writing approach**: * Set expectations of what the user achieves after reading. * Use clear, incremental steps. Minimize choices that need to be made by the user. * Point out milestones along the way. * Minimize theory and focus on concrete actions. ### How-To Guides (Problem-oriented) * **Audience goal**: Perform a specific task correctly. * **Characteristics**: Goal-driven and assumes some prior knowledge. * **Writing approach**: * Write from the perspective of the user, not the product. * Describe a logical sequence and omit unnecessary details. * Minimize context beyond what is necessary. ### Reference (Information-oriented) * **Audience goal**: Find details about a product's features. * **Characteristics**: Unambiguous, product-focused, scannable. * **Writing approach**: * Be scannable and concise. * Prioritize consistency. * Avoid explanatory content. Focus on examples that are easy to copy and modify. ### Explanation (Understanding-oriented) * **Audience goal**: Expand general understanding of a concept or highly complex feature. * **Characteristics**: Theoretical, potentially opinionated, broad in scope. * **Writing approach**: * Provide background context, such as design decisions or technical constraints. * Acknowledge opinions and alternatives. * Draw connections to other areas in the product or industry. ## Tips and tricks 1. **Maintain purpose**: Before writing, assign each page a specific content type and make it top of mind in the doc throughout your writing. 2. **Consider content freshness**: Regardless of content type, try to optimize for evergreen documentation. If something represents a moment in time of what a feature looks like on a specific date, it's probably better suited for a changelog or blog post than in your documentation. Or if something changes very frequently avoid putting it in your docs. 3. **Think like your users**: Consider different user personas when organizing content. See [Understand your audience](/guides/understand-your-audience) for more information. 4. **Use templates**: Start with [content templates](/guides/content-templates) that provide the basic structure for each content type. While the Diátaxis framework provides a starting point, successful documentation requires contextual adaptation to your product. Start by understanding the framework's principles, then adjust them to serve your users' needs. ## Related pages Copy and modify templates for each content type. Write effective documentation with consistent style. Research and define your documentation audience. Organize your documentation structure effectively. Use data and metrics to improve documentation. # Cursor Source: https://mintlify-docs.mintlify.app/guides/cursor Configure Cursor to be your writing assistant. Transform Cursor into a documentation expert that knows your components, style guide, and best practices. ## Use Cursor with Mintlify Cursor rules provide persistent context about your documentation, ensuring more consistent suggestions that fit your standards and style. * **Project rules** are stored in your documentation repository and shared with your team. * **User rules** apply to your personal Cursor environment. We recommend creating project rules for your docs so that all contributors have access to the same rules. Create rules files in the `.cursor/rules` directory of your docs repo. See the [Cursor Rules documentation](https://docs.cursor.com/context/rules) for complete setup instructions. ## Example project rule This rule provides Cursor with context to properly format Mintlify components and follow technical writing best practices. You can use this example as-is or customize it for your documentation: * **Writing standards**: Update language guidelines to match your style guide. * **Component patterns**: Add project-specific components or modify existing examples. * **Code examples**: Replace generic examples with real API calls and responses for your product. * **Style and tone preferences**: Adjust terminology, formatting, and other rules. Add this rule with any modifications as an `.mdc` file in the `.cursor/rules` directory of your docs repo. ````mdx wrap theme={null} # Mintlify technical writing rule You are an AI writing assistant specialized in creating exceptional technical documentation using Mintlify components and following industry-leading technical writing practices. ## Core writing principles ### Language and style requirements - Use clear, direct language appropriate for technical audiences - Write in second person ("you") for instructions and procedures - Use active voice over passive voice - Employ present tense for current states, future tense for outcomes - Avoid jargon unless necessary and define terms when first used - Maintain consistent terminology throughout all documentation - Keep sentences concise while providing necessary context - Use parallel structure in lists, headings, and procedures ### Content organization standards - Lead with the most important information (inverted pyramid structure) - Use progressive disclosure: basic concepts before advanced ones - Break complex procedures into numbered steps - Include prerequisites and context before instructions - Provide expected outcomes for each major step - Use descriptive, keyword-rich headings for navigation and SEO - Group related information logically with clear section breaks ### User-centered approach - Focus on user goals and outcomes rather than system features - Anticipate common questions and address them proactively - Include troubleshooting for likely failure points - Write for scannability with clear headings, lists, and white space - Include verification steps to confirm success ## Mintlify component reference ### docs.json - Refer to the [docs.json schema](https://mintlify.com/docs.json) when building the docs.json file and site navigation ### Callout components #### Note - Additional helpful information Supplementary information that supports the main content without interrupting flow #### Tip - Best practices and pro tips Expert advice, shortcuts, or best practices that enhance user success #### Warning - Important cautions Critical information about potential issues, breaking changes, or destructive actions #### Info - Neutral contextual information Background information, context, or neutral announcements #### Check - Success confirmations Positive confirmations, successful completions, or achievement indicators ### Code components #### Single code block Example of a single code block: ```javascript config.js const apiConfig = { baseURL: 'https://api.example.com', timeout: 5000, headers: { 'Authorization': `Bearer ${process.env.API_TOKEN}` } }; ``` #### Code group with multiple languages Example of a code group: ```javascript Node.js const response = await fetch('/api/endpoint', { headers: { Authorization: `Bearer ${apiKey}` } }); ``` ```python Python import requests response = requests.get('/api/endpoint', headers={'Authorization': f'Bearer {api_key}'}) ``` ```curl cURL curl -X GET '/api/endpoint' \ -H 'Authorization: Bearer YOUR_API_KEY' ``` #### Request/response examples Example of request/response documentation: ```bash cURL curl -X POST 'https://api.example.com/users' \ -H 'Content-Type: application/json' \ -d '{"name": "John Doe", "email": "john@example.com"}' ``` ```json Success { "id": "user_123", "name": "John Doe", "email": "john@example.com", "created_at": "2024-01-15T10:30:00Z" } ``` ### Structural components #### Steps for procedures Example of step-by-step instructions: Run `npm install` to install required packages. Verify installation by running `npm list`. Create a `.env` file with your API credentials. ```bash API_KEY=your_api_key_here ``` Never commit API keys to version control. #### Tabs for alternative content Example of tabbed content: ```bash brew install node npm install -g package-name ``` ```powershell choco install nodejs npm install -g package-name ``` ```bash sudo apt install nodejs npm npm install -g package-name ``` #### Accordions for collapsible content Example of accordion groups: - **Firewall blocking**: Ensure ports 80 and 443 are open - **Proxy configuration**: Set HTTP_PROXY environment variable - **DNS resolution**: Try using 8.8.8.8 as DNS server ```javascript const config = { performance: { cache: true, timeout: 30000 }, security: { encryption: 'AES-256' } }; ``` ### Cards and columns for emphasizing information Example of cards and card groups: Complete walkthrough from installation to your first API call in under 10 minutes. Learn how to authenticate requests using API keys or JWT tokens. Understand rate limits and best practices for high-volume usage. ### API documentation components #### Parameter fields Example of parameter documentation: Unique identifier for the user. Must be a valid UUID v4 format. User's email address. Must be valid and unique within the system. Maximum number of results to return. Range: 1-100. Bearer token for API authentication. Format: `Bearer YOUR_API_KEY` #### Response fields Example of response field documentation: Unique identifier assigned to the newly created user. ISO 8601 formatted timestamp of when the user was created. List of permission strings assigned to this user. #### Expandable nested fields Example of nested field documentation: Complete user object with all associated data. User profile information including personal details. User's first name as entered during registration. URL to user's profile picture. Returns null if no avatar is set. ### Media and advanced components #### Frames for images Wrap all images in frames: Main dashboard showing analytics overview Analytics dashboard with charts #### Videos Use the HTML video element for self-hosted video content: Embed YouTube videos using iframe elements: #### Tooltips Example of tooltip usage: API #### Updates Use updates for changelogs: ## New features - Added bulk user import feature - Improved error messages with actionable suggestions ## Bug fixes - Fixed pagination issue with large datasets - Resolved authentication timeout problems ## Required page structure Every documentation page must begin with YAML frontmatter: ```yaml --- title: "Clear, specific, keyword-rich title" description: "Concise description explaining page purpose and value" --- ``` ## Content quality standards ### Code examples requirements - Always include complete, runnable examples that users can copy and execute - Show proper error handling and edge case management - Use realistic data instead of placeholder values - Include expected outputs and results for verification - Test all code examples thoroughly before publishing - Specify language and include filename when relevant - Add explanatory comments for complex logic - Never include real API keys or secrets in code examples ### API documentation requirements - Document all parameters including optional ones with clear descriptions - Show both success and error response examples with realistic data - Include rate limiting information with specific limits - Provide authentication examples showing proper format - Explain all HTTP status codes and error handling - Cover complete request/response cycles ### Accessibility requirements - Include descriptive alt text for all images and diagrams - Use specific, actionable link text instead of "click here" - Ensure proper heading hierarchy starting with H2 - Provide keyboard navigation considerations - Use sufficient color contrast in examples and visuals - Structure content for easy scanning with headers and lists ## Component selection logic - Use **Steps** for procedures and sequential instructions - Use **Tabs** for platform-specific content or alternative approaches - Use **CodeGroup** when showing the same concept in multiple programming languages - Use **Accordions** for progressive disclosure of information - Use **RequestExample/ResponseExample** specifically for API endpoint documentation - Use **ParamField** for API parameters, **ResponseField** for API responses - Use **Expandable** for nested object properties or hierarchical information ```` ## Enhance with MCP server Connect the Mintlify MCP server to Cursor to give it access to search the Mintlify documentation while helping you write. When you connect the MCP server, Cursor searches the up to date Mintlify documentation for context so you don't have to leave your IDE to reference documentation. See [Model Context Protocol](/ai/model-context-protocol#example%3A-connect-to-the-mintlify-mcp-server) for complete setup instructions. # Create developer documentation Source: https://mintlify-docs.mintlify.app/guides/developer-documentation Build documentation that helps developers integrate with your APIs, SDKs, and tools. Developer documentation helps people understand and integrate with your product. Good documentation helps people do more with your product, reduces support burden, speeds up adoption, and improves developer experience. Mintlify provides infrastructure built for developer documentation. * **API reference generation**: Generate interactive [API references](/api-playground/overview) from OpenAPI specifications that let developers test endpoints in your documentation. * **Code blocks with explanations**: The [assistant](/ai/assistant) explains code examples in context, helping developers understand implementation details. * **Git sync**: Keep documentation in sync with your codebase using [GitHub](/deploy/github) or [GitLab](/deploy/gitlab). * **Versioning**: Maintain documentation for multiple [versions](/organize/navigation#versions) so developers on older versions can still find accurate information. ## Prerequisites If you haven't created a Mintlify project yet, see the [Quickstart](/quickstart) to deploy your site. * Your API specification in OpenAPI format (if documenting an API) * A Git repository for your documentation * Admin access to your Mintlify organization ## Migrate existing documentation If you're creating documentation from scratch, skip to [Plan your documentation structure](#plan-your-documentation-structure). ### Audit existing content Review your current documentation to understand what you have and what you need to migrate. * **API reference**: Is it generated from a spec or hand-written? What endpoints do you document? * **Guides and tutorials**: What integration guides exist? Are they current? * **Code examples**: What languages and frameworks do you use? * **SDK documentation**: Do you have separate documentation for each SDK? * **Changelog**: Do you maintain a changelog or release notes? * **Metadata**: Do you have metadata for your content like dates, authors, and tags? ### Export your existing content * Export to **Markdown** for the simplest migration to Mintlify. * Export **OpenAPI specs** for API reference content. * Export to **HTML** if Markdown isn't available, then convert to Markdown. ## Plan your documentation structure Developer documentation typically includes several content types. Structure your navigation around how your users understand your product. ```json docs.json example theme={null} { "navigation": { "groups": [ { "group": "Get Started", "pages": [ "introduction", "quickstart", "authentication" ] }, { "group": "Guides", "pages": [ "guides/webhooks", "guides/error-handling", "guides/rate-limits", "guides/pagination" ] }, { "group": "API Reference", "pages": [ "api-reference/overview", "api-reference/users", "api-reference/orders", "api-reference/products" ] }, { "group": "SDKs", "pages": [ "sdks/javascript", "sdks/python", "sdks/go" ] } ] } } ``` See [Navigation](/organize/navigation) for more configuration options. ## Set up your API reference If you have an API, generate an interactive reference from your OpenAPI specification. Add your OpenAPI specification file to your project. You can use YAML or JSON format. ```text theme={null} your-project/ ├── docs.json ├── openapi.yaml └── api-reference/ └── overview.mdx ``` Reference your OpenAPI file in your `docs.json` configuration. ```json Configuration example theme={null} { "openapi": "openapi.yaml" } ``` Add the endpoints to your `docs.json` navigation. See [OpenAPI setup](/api-playground/openapi-setup) for configuration options. ```json Navigation example theme={null} { "group": "API Reference", "pages": [ "api-reference/overview", "api-reference/users/list-users", "api-reference/users/get-user", "api-reference/users/create-user" ] } ``` ## Set up the assistant The assistant helps developers find answers and understand code examples. Configure it from your [dashboard](https://dashboard.mintlify.com/products/assistant/settings). * **Sample questions**: Add developer-focused questions like "How do I authenticate API requests?" or "Show me how to handle webhooks." * **Code explanations**: The assistant can explain code blocks in context when developers ask questions about specific examples. ## Set up versioning If you maintain multiple API versions, configure versioning so developers find documentation for their version. ```json Versioning example theme={null} { "versions": ["v2", "v1"], "navigation": { "groups": [ { "group": "API Reference", "version": "v2", "pages": ["v2/api-reference/users"] }, { "group": "API Reference", "version": "v1", "pages": ["v1/api-reference/users"] } ] } } ``` See [Versions](/organize/navigation#versions) for more information. ## Connect to your repository Install the Mintlify [GitHub App](/deploy/github) to keep documentation in sync with your codebase and enable contributions. Link your GitHub repository in the [dashboard](https://dashboard.mintlify.com). This enables automatic deployments when you push changes. Set your production branch and enable preview deployments for pull requests. This lets you review documentation changes before they go live. If you use GitLab, see [GitLab](/deploy/gitlab) for configuration instructions. ## Maintain your documentation Developer documentation needs regular updates so that information is accurate and usable. Update your OpenAPI specification whenever you release changes. If your specification is generated from code, automate this in your release process. Review code examples when you release new SDK versions or product updates. Outdated examples cause integration failures and support requests. Document breaking changes, new features, and deprecations. Developers rely on changelogs to understand what changed between versions. See [Changelogs](/create/changelogs) for more information. Review assistant conversations and search analytics to identify gaps in your documentation. If developers repeatedly ask about the same topic, improve that section. See [Maintenance](/guides/maintenance) for more information. ## Next steps Your developer documentation is ready to launch. After deploying: 1. Announce the documentation to your developer community. 2. Monitor search patterns and assistant conversations for gaps. 3. Set up a process to update docs with each API release. 4. Gather feedback from developers to improve content over time. # Guides Source: https://mintlify-docs.mintlify.app/guides/index Learn how to create effective documentation with best practices and workflows. The guides in this section contain advice for creating documentation that helps your users succeed. Whether you're starting from scratch or improving existing docs, these guides help you plan, write, and maintain your documentation. Above all else, consider your users' needs and goals. Document what helps them use your product and get back to their tasks. ## Topics ### AI tools Use AI-powered tools to accelerate your documentation workflow. * [Automate documentation updates](/guides/automate-agent): Tutorial that teaches how to set up automated documentation updates using the agent. * [Build an in-app assistant](/guides/assistant-embed): Tutorial that teaches how to add an AI chat bot in a React app to help users find answers from your documentation. * [Claude Code](/guides/claude-code), [Cursor](/guides/cursor), [Windsurf](/guides/windsurf): Guides for using AI coding assistants to maintain documentation. * [GEO](/guides/geo): Best practices for optimizing your documentation for AI search and answer engines. ### API documentation Create API documentation that lets users test and learn how to use your API, and is easy to maintain. * [Migrate from MDX to OAS](/guides/migrating-from-mdx): Move your API documentation from individual MDX pages to autogenerated pages from an OpenAPI specification. ### Best practices Make your documentation best in class. * [Accessibility](/guides/accessibility): Make your docs accessible to as many users as possible. * [Content types](/guides/content-types): Choose the right format for tutorials, how-tos, references, and explanations. * [Content templates](/guides/content-templates): Copy and modify templates for each content type. * [Improve your docs](/guides/improving-docs): Use data and feedback to continuously improve your documentation. * [Internationalization](/guides/internationalization): Set up multi-language documentation to reach global audiences. * [Linking](/guides/linking): Create internal links, reference API endpoints, and maintain link integrity across your documentation. * [Maintenance](/guides/maintenance): Keep your documentation accurate and up-to-date. * [Media](/guides/media): Add images, videos, and other media effectively while managing maintenance burden. * [Organize navigation](/guides/navigation): Design information architecture that works for your users. * [SEO](/guides/seo): Optimize your docs for search engines. * [Style and tone](/guides/style-and-tone): Write with a consistent voice. * [Understand your audience](/guides/understand-your-audience): Research and serve your users' needs and goals. ### Git workflows Understand Git to get the most out of Mintlify and a docs-as-code approach to documentation. * [Git concepts](/guides/git-concepts): Learn the fundamentals of Git for documentation. * [Branches](/guides/branches): Use branches to manage documentation changes. ### Use cases Learn how Mintlify supports different use cases and find a solution that works for you. * [Create developer documentation](/guides/developer-documentation): Help your users get the most from your product or API with developer documentation that answers questions and gets people back to their main tasks. * [Create a knowledge base](/guides/knowledge-base): Set up an internal knowledge base to consolidate information for your team, improve search, and reduce maintenance burden. * [Create a support center](/guides/support-center): Build a self-service support center that helps customers find answers, reduces ticket volume, and improves customer satisfaction. * [Create a custom frontend](/guides/custom-frontend): Use the Mintlify Astro integration to render your documentation with a fully custom frontend. ## Where to start Learn about content types to understand how to structure your docs. Learn how to use metrics and feedback to make your docs better. Automate documentation updates with the agent. Learn Git workflows for collaborative documentation. # Create a knowledge base Source: https://mintlify-docs.mintlify.app/guides/knowledge-base Host your internal knowledge base on Mintlify to consolidate information for your team, improve search, and reduce maintenance burden. An internal knowledge base helps your team find answers and maintain a source of truth. If your team has information spread across different channels and platforms, people might find inaccurate or no information when they search for answers. A centralized knowledge base solves this by putting answers where everyone can find them and giving your team a specific place to record shared knowledge. Mintlify provides the infrastructure for knowledge bases that your entire team can contribute to. * **AI-powered search**: The [assistant](/ai/assistant) answers questions using your knowledge base content, so people find answers without knowing exactly where to look. * **Slack integrations**: Add the assistant to [Slack](/ai/slack-bot) so your team can ask questions and use the [agent](/agent/slack) to capture knowledge from conversations. * **Low-barrier contributions**: The [web editor](/editor) and [agent](/agent/index) let anyone on your team update content without learning Git or Markdown. * **Authentication built-in**: Control access with [SSO or OAuth](/deploy/authentication-setup), and use [groups](/deploy/authentication-setup#control-access-with-groups) to show different content to different teams. ## Prerequisites If you haven't created a Mintlify project yet, see the [Quickstart](/quickstart) to deploy your site. * An authentication system (SSO or OAuth provider like Okta or Azure AD) * Control over your domain for hosting * Admin access to your Mintlify organization ## Migrate existing content If you're creating a knowledge base from scratch, skip to [Design the navigation structure](#design-the-navigation-structure). ### Audit existing content Catalog the content you currently have in your existing knowledge base. This helps you understand what content you need to migrate, plan how to organize it in your new knowledge base, identify any gaps in your content, and confirm that you moved all of your content to your new knowledge base. * **Total number of articles**: Helps estimate migration effort and track completeness. * **Topics and content**: Informs your navigation structure and content organization. * **Current organization**: See how your content is currently organized and whether it matches your desired structure. * **Content types**: Determine any content conversion requirements for text, PDFs, videos, and embedded content. * **Metadata**: Identify any metadata to preserve like dates, authors, and tags. * **Access requirements**: Determine the best authentication approach for your knowledge base. ### Export your existing content Most knowledge base platforms support exporting content in standard formats. The format you choose depends on your current platform and your priorities. * Export to **Markdown** for the simplest migration to Mintlify. (recommended) * Export to **HTML** if Markdown isn't available. You must convert your content to Markdown later. * Export to **JSON or CSV** if you have structured metadata to preserve. ## Design the navigation structure Your navigation structure determines how people find content in your knowledge base. You can recreate your existing structure or redesign it to better match how your team thinks about the content. Migrating is a good time to improve your structure. Consider whether your current organization actually works for your team, or if you can reorganize to make information easier to find. Your `docs.json` file defines the navigation structure of your knowledge base. Create this file at the root of your project repository. ```json theme={null} { "navigation": { "groups": [ { "group": "Finance", "pages": [ "finance/overview", "finance/budgeting-process", "finance/expense-reports", "finance/cost-allocation" ] }, { "group": "HR", "pages": [ "hr/overview", "hr/onboarding", "hr/benefits", "hr/time-off-policy" ] }, { "group": "Engineering", "pages": [ "engineering/overview", "engineering/dev-setup", "engineering/deployment", "engineering/code-standards" ] } ] } } ``` See [Navigation](/organize/navigation) for more information on how to structure your knowledge base. ## Set up authentication Determine who needs access to what content in your knowledge base. If everyone should have access to the entire knowledge base, set up only [authentication](/deploy/authentication-setup). If you need to restrict access to certain content to specific users or groups, set up authentication with [group-based access control](/deploy/authentication-setup#control-access-with-groups). ## Migrate your content Move your exported content into a folder structure that matches the navigation structure you designed. Convert content to Markdown if needed, add any missing frontmatter, and set up internal links. Create folders that match your `docs.json` structure. For example, if your `docs.json` has a Finance group, create a `finance/` folder: ```text theme={null} your-project/ ├── docs.json ├── finance/ │ ├── overview.mdx │ ├── budgeting-process.mdx │ ├── expense-reports.mdx │ └── cost-allocation.mdx ├── hr/ │ ├── overview.mdx │ ├── onboarding.mdx │ ├── benefits.mdx │ └── time-off-policy.mdx └── engineering/ ├── overview.mdx ├── dev-setup.mdx ├── deployment.mdx └── code-standards.mdx ``` Place each article in its corresponding folder. The file path must match the path in your `docs.json`. For example, if `docs.json` references `"finance/expense-reports"`, the file should be `finance/expense-reports.mdx` in your project repository. Every `.mdx` file needs frontmatter at the top with metadata. Every page requires a title and description. See [Pages](/organize/pages) for more information on page metadata. ```mdx theme={null} --- title: "Expense Report Process" description: "How to submit and track expense reports" --- Your content here... ``` Link between pages using paths from your project root. ```mdx theme={null} See [Onboarding Guide](/hr/onboarding) for new employee setup. For questions, contact [HR Benefits Team](/hr/benefits#common-questions). ``` If you exported your content as HTML, convert it to Markdown. Some tools that can help include: * **Pandoc**: Command-line tool that converts between many formats. * **CloudConvert**: Online converter supporting HTML, DOCX, PDF, and more. * **VS Code extensions**: Search for "HTML to Markdown" in extensions. If you have PDFs, videos, or other media, decide how to include them in your knowledge base. * **Embed videos**: Embed videos or link to hosted videos. * **Link to PDFs**: Add PDFs to your project repository and link to them from relevant pages. * **Convert PDFs to Markdown**: If you want the content of a PDF to be a page, convert PDFs to Markdown. ## Set up the assistant The assistant is automatically enabled for Pro and Enterprise plans. The assistant lets your team ask questions and get answers with cited sources from your knowledge base. Configure the assistant from your [dashboard](https://dashboard.mintlify.com/products/assistant/settings): * **Sample questions**: Add common questions like "how do I submit an expense report" or "what is the vacation policy" so people can get answers with one click. * **Search sites**: Include additional sites the assistant can search when answering questions. * **Deflection email**: Set a support email for questions the assistant can't answer. ### Add the assistant to Slack The [Slack bot](/ai/slack-bot) lets your team ask the assistant questions without leaving Slack. Create a channel where the bot responds to every message or let people @mention the bot in any channel. ## Enable team contributions A knowledge base stays accurate when everyone can update it, not just the people who set it up. Mintlify provides three ways for team members to contribute quickly to your knowledge base. ### Web editor The [web editor](/editor) lets anyone create and edit pages in their browser. Contributors can: * Edit pages visually or in Markdown. * Drag and drop to reorganize navigation. * Upload images and media. * Create branches and pull requests for review. This works well for subject matter experts who know the content but aren't comfortable with code workflows. ### Agent The [agent](/agent/index) in your dashboard creates documentation updates from natural language prompts. Describe what you want to change, and the agent creates a pull request with the updates. For example, a team member could prompt "add a section to the expense policy page explaining how to submit receipts for meals over \$50" and copy the existing expense policy page into the prompt. The agent would draft the content and open a PR for review. ### Capture knowledge from Slack Teams share valuable information in Slack that often never makes it into documentation. The [agent in Slack](/agent/slack) can capture this knowledge and convert it into structured documentation. When someone shares useful information in a Slack thread, any team member can mention `@mintlify` with instructions to document it. The agent reads the conversation, extracts the relevant information, and creates a pull request. This is useful for capturing technical decisions, troubleshooting solutions, and process explanations while the context is still fresh. For example, if your team discussed how to configure a new integration in a thread, you could reply: > @mintlify Create a guide for configuring the Acme integration based on this conversation. The agent uses the thread context to create documentation that captures the key information from the discussion. ### Locally Anyone with access to your knowledge base repository can work locally in their preferred editor and push changes to your repository. ## Establish maintenance workflows A knowledge base can decay quickly without maintenance. Set up systems to keep content up to date and help your team contribute to the knowledge base. Designate an owner or small team for each section. They don't have to write all the content, but they're responsible for: * Reviewing content regularly. * Flagging outdated information. * Approving new pages in their section. * Responding when people report errors. Content becomes stale over time. Establish a review schedule. * **Critical content**: Review every 30 days * **Standard content**: Review every 90 days * **Evergreen content**: Review yearly When reviewing, check: * Are links still valid? * Have systems or processes changed? * Are examples current? * Is there new information that should be added? Make it easy for anyone to improve the knowledge base. Your guidelines should cover: * **Format**: Do you have specific templates or format requirements? * **Process**: How should someone propose and submit changes? * **Review**: Who reviews submissions? What's the turnaround time? * **Scope**: What types of content are in scope? Review how your team uses the knowledge base to prioritize content and identify areas for improvement. Set a regular cadence for reviewing usage metrics—monthly or quarterly are good intervals. * Which articles get the most views? Invest in keeping these accurate and easy to read. * Which articles get no views? Consider removing them or improving discoverability. * What's the bounce rate? If people leave immediately, the content might not be helpful or navigation could be improved. ## Next steps Your knowledge base is ready to launch. After deploying: 1. Announce the knowledge base to your team. 2. Monitor usage and search patterns in your analytics. 3. Encourage contributions when people find gaps. 4. Review and update content regularly. The most successful knowledge bases evolve based on how teams actually use them. # Organize navigation Source: https://mintlify-docs.mintlify.app/guides/navigation Design information architecture that aligns with user needs. This page explains why and how to organize your documentation in a way that makes sense for your users. ## Why is navigation important? Navigation might seem unimportant because experienced users looking for specific answers typically navigate directly to pages via a search engine or your documentation site's search bar. But the information architecture of your documentation helps people build a mental model for how to think about your product, and provides structure for people and AI tools that use your documentation. Well designed navigation helps people quickly grasp your product and succeed when using your documentation. ## Map the foundation with stakeholders Align with key stakeholders like your founders, product managers, or engineering leads on how your product works, what's most important, and how users should interact with it. Example questions to ask: * What's the simplest way to explain how the product works? * What are the product's core building blocks? * How do users typically adopt the product? Where do people most often get stuck? * How does the product's architecture influence how people use it? * What are the most important integrations or dependencies? * What is changing or evolving in the product? * If the product was broken into different layers, what would they be? Would it be by tasks that people perform or by features that people use? ## Validate your assumptions Once you've established a structure, you need to validate whether it actually works for real users. The way people navigate your documentation often reveals gaps in your information architecture that internal teams might overlook. ### Track real user journeys Use tools like session replays (for example, [FullStory](https://www.fullstory.com), [Hotjar](https://www.hotjar.com)) or analytics (for example, [Mixpanel](https://mixpanel.com)) to study how users move through your docs. Pay attention to: * **Entry points:** Where do users start their journey? Are they coming from search, a support ticket, or directly from your product? * **Navigation patterns:** Do they follow the expected navigation structure, or do they take unexpected detours? * **Friction points:** Where do users pause, loop back, or abandon their session? These could indicate unclear organization or missing content. * **Search behavior:** Are users searching for terms that don't exist in your documentation? This might highlight gaps in your content or misalignment in terminology. ### Test with real users Analytics help surface trends, but direct conversations provide deeper insights. Get on research calls where customers attempt to find answers to specific questions. Ask them to narrate their thought process as they navigate. New hires are also a great proxy for users since they don't have as much prior context as tenured members of your team. Before they get too familiar with your product from the inside, ask them to complete a task using only the documentation. Have them outline in detail how they approached the task. Where they clicked first, how they interpreted section names, and where they got stuck. Their instincts can reveal whether your docs are intuitive or if they assume too much knowledge. ## Identify common challenges Based on your observations, look for these common navigation problems: * **Overloaded categories:** Too many top-level sections can overwhelm users. Consider grouping related topics together. * **Hidden essential content:** Don't bury critical information. Prioritize frequently accessed content. * **Unclear section names:** If users hesitate before clicking, your labels might not be intuitive. Align terminology with how your audience naturally thinks. Try to design an elegant and functional information architecture, but remember, it's hard to make documentation that works for absolutely everyone. Consider the majority of your users and what helps them succeed. ## Iterate over time Above all, stay flexible. Your navigation should evolve with your product and user needs. You don't have to be right on the first try. # SEO Source: https://mintlify-docs.mintlify.app/guides/seo Improve SEO to increase documentation discoverability. This page explains fundamental strategies to optimize your documentation SEO. ## Content basics Make your writing and structure easy for search engines to scan. * **Headings and subheadings:** Use sequential, meaningful headers to structure your content. Each page has an H1 created from the `title:` property in the frontmatter. * **Short paragraphs and bullet points:** Break down large chunks of text into easily readable sections. Use bullet points and numbered lists where appropriate. * **Internal linking:** Link to related content using descriptive anchor text. For example, "Learn more about rate limiting" instead of "Click here." ## Technical SEO basics Once your content is optimized, ensure your documentation performs well from a technical standpoint. These basic technical SEO practices help make your docs more discoverable: * **Meta tags and descriptions:** Craft SEO-friendly titles (50-60 characters) and descriptions (150-160 characters) for each page. Most [meta tags](/optimize/seo) are automatically generated. * **Alt text for images:** Provide descriptive alt text for images with relevant keywords. For example, "OAuth 2.0 API authentication flow" instead of just "diagram". This enhances SEO and accessibility. * **Sitemaps:** Ensure your sitemap is up-to-date. Mintlify automatically generates a sitemap. However, you can manually create a sitemap if you prefer a custom format. Once created, search engines index site maps over time, but you can submit your sitemap directly to Google Search Console to speed up the process. ## Page performance Use tools like [Google PageSpeed Insights](https://pagespeed.web.dev) to identify areas for technical SEO improvement. Examples of more advanced optimizations: * **Optimize media for speed:** Compress images using formats like WebP or AVIF and ensure your pages load quickly (ideally under 3 seconds). * **Structured data (schema markup):** Add schema markup (like HowTo, FAQ) to your pages to help search engines better understand and rank your content. ## Keyword research To increase organic traffic, invest time into understanding which keywords help users land on your documentation. * **Keyword research:** Use free tools like [Google Keyword Planner](https://ads.google.com/intl/en_us/home/tools/keyword-planner/) or [Keywords Everywhere](https://keywordseverywhere.com) to identify common phrases or long-tail keywords. * **Integrate keywords naturally:** Add keywords naturally into headings, subheadings, and throughout the body text. Don't overstuff keywords. Your documentation should be written for your users, not search engines. # Style and tone Source: https://mintlify-docs.mintlify.app/guides/style-and-tone Write effective technical documentation with consistent style. This page explains stylistic choices, common mistakes, and implementation tips for writing technical documentation. ## Writing principles * **Be concise.** People are reading documentation to achieve a goal. Get to the point quickly. * **Clarity over cleverness.** Be simple, direct, and avoid jargon or complex sentence structure. * **Use active voice.** Instead of saying "A configuration file should be created," use "Create a configuration file." * **Be skimmable.** Use headlines to orient readers. Break up text-heavy paragraphs. Use bullet points and lists to make it easier to scan. * **Write in second person.** Referring to your reader makes it easier to follow instructions and makes the documentation feel more personal. ## Common writing mistakes * **Spelling and grammar mistakes.** Even a few spelling and grammar mistakes in your documentation make it less credible and harder to read. * **Inconsistent terminology.** Calling something an "API key" in one paragraph then "API token" in the next makes it difficult for users to follow along. * **Product-centric terminology.** Your users don't have the full context of your product. Use language that your users are familiar with. * **Colloquialisms.** Especially for localization, colloquialisms hurt clarity. ## Tips for enforcing style Leverage existing style guides to standardize your documentation: * [Microsoft Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) * [Splunk Style Guide](https://docs.splunk.com/Documentation/StyleGuide/current/StyleGuide/Howtouse) * [Google Developer Documentation Style Guide](https://developers.google.com/style) When you know which writing principles you want to implement, automate as much as you can. You can use [CI checks](/deploy/ci) or linters like [Vale](https://vale.sh). ## Related pages Choose the right content type for your documentation goals. Make your documentation accessible to more users. Learn text formatting and styling options. Improve documentation discoverability. # Create a support center Source: https://mintlify-docs.mintlify.app/guides/support-center Build a self-service support center that helps customers find answers, reduces ticket volume, and improves customer satisfaction. A support center helps customers solve problems and find information about your product. When customers can find answers themselves, they get help faster and your support team can focus on complex issues that require their expertise. Mintlify provides infrastructure for support centers that scale with your customer base. * **AI-powered search**: The [assistant](/ai/assistant) answers customer questions using your support content, so people can find answers without knowing exactly where to look or specific terms to search for. * **Feedback collection**: Built-in [feedback widgets](/optimize/feedback) let customers rate articles and report issues so you can improve content. * **Analytics**: Track which articles get views, what questions customers ask, and where they struggle. * **Authentication**: Use [SSO or OAuth](/deploy/authentication-setup) to show personalized content based on customer plans or account types. ## Prerequisites If you haven't created a Mintlify project yet, see the [Quickstart](/quickstart) to deploy your site. * Content for your most common support topics * Admin access to your Mintlify organization * Domain for hosting your support center ## Migrate existing content If you're creating a support center from scratch, skip to [Plan your support center structure](#plan-your-support-center-structure). ### Audit existing content Review your current support resources to understand what to migrate. * **Help articles**: What topics do you address? Which articles get the most views? * **FAQs**: Do you have frequently asked questions that should become articles? * **Support tickets**: What questions do customers ask repeatedly? These should become self-service content. * **Product documentation**: Is there overlap between support content and product docs? ### Export your existing content * Export to **Markdown** for the simplest migration to Mintlify. * Export to **HTML** if Markdown isn't available, then convert to Markdown. * Export **ticket data** to identify common questions that need documentation. ## Plan your support center structure Organize your support center around customer problems, not product features. Customers arrive with questions and goals, so structure content that aligns with how they think about your product and common tasks. Review your support tickets to understand what customers actually ask about. This helps you prioritize content and structure navigation around real problems. ```json theme={null} { "navigation": { "groups": [ { "group": "Get Started", "pages": [ "getting-started/quick-setup", "getting-started/first-steps" ] }, { "group": "Account", "pages": [ "account/billing", "account/plans", "account/team-management", "account/security" ] }, { "group": "Using the Product", "pages": [ "product/feature-one", "product/feature-two", "product/integrations" ] }, { "group": "Troubleshooting", "pages": [ "troubleshooting/common-errors", "troubleshooting/connectivity", "troubleshooting/performance" ] } ] } } ``` See [Navigation](/organize/navigation) for more configuration options. ## Write effective support content Support content should help customers solve problems quickly. Every article should answer one specific question or solve one specific problem. Organize related content into groups instead of creating overly long pages that have too much information. ### Structure articles for scanning Customers scan support pages looking for their specific issue. Use clear headings and short paragraphs. ```mdx Example support page theme={null} --- title: "Fix login issues" description: "Troubleshoot common problems signing in to your account" --- ## Reset your password If you forgot your password, request a reset link from the login page. 1. Go to the login page. 2. Select **Forgot password**. 3. Enter your email address. 4. Check your inbox for the reset link. ## Clear browser cache Old cached data can cause login problems. Clear your browser cache and try again. ## Check account status If your account is suspended or deactivated, you'll see an error when logging in. Contact support if you believe this is a mistake. ``` ### Include step-by-step instructions When explaining how to do something, use numbered steps. Click the gear icon in the toolbar. Click **Billing** in the navigation menu. Click **Update** next to your current payment method and enter new details. ### Add visual aids Screenshots and diagrams help customers confirm they're in the right place. ```mdx Example screenshot theme={null} ![Settings page with billing section highlighted](/images/billing-settings.png) ``` ## Set up the assistant The assistant answers customer questions using your support content. Configure it from your [dashboard](https://dashboard.mintlify.com/products/assistant/settings). Add common questions customers ask, such as: * "How do I cancel my subscription?" * "Why was my payment declined?" * "How do I add team members?" Sample questions appear as quick-access buttons, helping customers get answers with one click. Configure a support email for questions the assistant can't answer. This ensures customers can still reach your team when self-service isn't enough. Check assistant conversations regularly to identify: * Questions the assistant can't answer (content gaps) * Incorrect or incomplete answers (content to improve) * Common question patterns (content to prioritize) ## Enable feedback collection Feedback helps you understand which pages are helpful and which need improvement. Review [feedback](/optimize/feedback) to see which pages customers find helpful and which need improvement. Read all comments and update pages based on valid feedback. ## Set up analytics Monitor how customers use your support center to improve content over time. * **Popular articles**: Which articles get the most views? Keep these accurate and well-maintained. * **Search queries**: What do customers search for? Create content for common searches that return no results. * **Assistant conversations**: What questions does the assistant receive? Use this to identify content gaps. ## Restrict content by customer segment If you have different customer tiers or product plans, show relevant content to each segment using group-based access control. Configure [authentication](/deploy/authentication-setup) to identify customers when they visit your support center. Return group information in your user data to define customer segments based on plan type, account status, or other attributes. See [User data format](/deploy/authentication-setup#user-data-format) for details. Use frontmatter to specify which groups can see each article. ```mdx theme={null} --- title: "Enterprise SSO setup" groups: ["enterprise"] --- ``` ## Maintain your support center Support content becomes outdated as your product changes. Establish processes to keep content accurate. When you ship product changes, update affected support articles. Include documentation updates in your release process. Check article ratings and customer feedback weekly. Address negative feedback promptly. It often indicates confusing or incorrect content. If customers submit tickets for issues covered in your support center, investigate why self-service didn't work. The article might be hard to find, unclear, or incomplete. Remove or archive articles about deprecated features. Outdated content confuses customers and reduces trust in your support center. ## Next steps Your support center is ready to launch. After deploying: 1. Link to your support center from your product and website. 2. Monitor assistant conversations and search queries to find content gaps. 3. Review feedback ratings weekly and improve low-rated articles. 4. Track ticket volume to measure self-service effectiveness. A good support center reduces support costs while improving customer satisfaction. Invest in content that answers common questions effectively. # Windsurf Source: https://mintlify-docs.mintlify.app/guides/windsurf Configure Windsurf to be your writing assistant. Transform Windsurf into a documentation expert that understands your style guide, components, and project context through workspace rules and memories. ## Use Windsurf with Mintlify Windsurf's Cascade AI assistant can be tuned to write documentation according to your standards using Mintlify components. Workspace rules and memories provide persistent context about your project, ensuring more consistent suggestions from Cascade. * **Workspace rules** are stored in your documentation repository and shared with your team. * **Memories** provide individual context that builds up over time. We recommend setting up workspace rules for shared documentation standards. You can develop memories as you work, but since they are not shared, they are not consistent across team members. Create workspace rules in the `.windsurf/rules` directory of your docs repo. See [Memories & Rules](https://docs.windsurf.com/windsurf/cascade/memories) in the Windsurf documentation for more information. ## Example workspace rule This rule provides Cascade with context about Mintlify components and general technical writing best practices. You can use this example rule as-is or customize it for your documentation: * **Writing standards**: Update language guidelines to match your style guide. * **Component patterns**: Add project-specific components or modify existing examples. * **Code examples**: Replace generic examples with real API calls and responses for your product. * **Style and tone preferences**: Adjust terminology, formatting, and other rules. Save your rule as a `.md` file in the `.windsurf/rules` directory of your docs repo. ````mdx theme={null} # Mintlify technical writing rule ## Project context - This is a documentation project on the Mintlify platform - We use MDX files with YAML frontmatter - Navigation is configured in `docs.json` - We follow technical writing best practices ## Writing standards - Use second person ("you") for instructions - Write in active voice and present tense - Start procedures with prerequisites - Include expected outcomes for major steps - Use descriptive, keyword-rich headings - Keep sentences concise but informative ## Required page structure Every page must start with frontmatter: ```yaml --- title: "Clear, specific title" description: "Concise description for SEO and navigation" --- ``` ## Mintlify components ### docs.json - Refer to the [docs.json schema](https://mintlify.com/docs.json) when building the docs.json file and site navigation ### Callouts - `` for helpful supplementary information - `` for important cautions and breaking changes - `` for best practices and expert advice - `` for neutral contextual information - `` for success confirmations ### Code examples - When appropriate, include complete, runnable examples - Use `` for multiple language examples - Specify language tags on all code blocks - Include realistic data, not placeholders - Use `` and `` for API docs ### Procedures - Use `` component for sequential instructions - Include verification steps with `` components when relevant - Break complex procedures into smaller steps ### Content organization - Use `` for platform-specific content - Use `` for progressive disclosure - Use `` and `` for highlighting content - Wrap images in `` components with descriptive alt text ## API documentation requirements - Document all parameters with `` - Show response structure with `` - Include both success and error examples - Use `` for nested object properties - Always include authentication examples ## Quality standards - Test all code examples before publishing - Use relative paths for internal links - Include alt text for all images - Ensure proper heading hierarchy (start with h2) - Check existing patterns for consistency ```` ## Working with Cascade Once your rules are set up, you can use Cascade to assist with various documentation tasks. See [Cascade](https://docs.windsurf.com/windsurf/cascade) in the Windsurf documentation for more information. ### Example prompts **Writing new content**: ```text wrap theme={null} Create a new page explaining how to authenticate with our API. Include code examples in JavaScript, Python, and cURL. ``` **Improving existing content**: ```text wrap theme={null} Review this page and suggest improvements for clarity and component usage. Focus on making the steps easier to follow. ``` **Creating code examples**: ```text wrap theme={null} Generate a complete code example showing error handling for this API endpoint. Use realistic data and include expected responses. ``` **Maintaining consistency**: ```text wrap theme={null} Check if this new page follows our documentation standards and suggest any needed changes. ``` ## Enhance with MCP server Connect the Mintlify MCP server to Windsurf to give Cascade access to search the Mintlify documentation while helping you write. When you connect the MCP server, Cascade searches the up to date Mintlify documentation for context so you don't have to leave your IDE to reference documentation. See [Model Context Protocol](/ai/model-context-protocol#example%3A-connect-to-the-mintlify-mcp-server) for complete setup instructions. # Install the CLI Source: https://mintlify-docs.mintlify.app/installation Use the CLI to preview docs locally, test changes in real-time, and catch issues before deploying your documentation site. Decorative graphic representing the CLI. Decorative graphic representing the CLI. Use the [CLI](https://www.npmjs.com/package/mint) to preview your documentation locally as you write and edit. View changes in real-time before deploying, test your documentation site's appearance and features, and catch issues like broken links or accessibility problems. The CLI also has utilities for maintaining your documentation, including commands to rename files, validate OpenAPI specifications, and migrate content between formats. ## Prerequisites * [Node.js](https://nodejs.org/en) v20.17.0+ (LTS versions recommended) installed * [Git](https://git-scm.com/downloads) installed * Your documentation repository cloned locally ### Clone your repository 1. Go to the [Git settings](https://dashboard.mintlify.com/settings/deployment/git-settings) page of your dashboard. 2. Note your repository location. It is one of these formats: * `mintlify-community/docs-{org-name}-{id}` (Mintlify-hosted repository) * `your-org/your-repo` (your own GitHub repository) Replace `your-org/your-repo` with your actual repository details from [Git settings](https://dashboard.mintlify.com/settings/deployment/git-settings). ```bash theme={null} git clone https://github.com/your-org/your-repo cd your-repo ``` **GitHub App required.** To enable automatic deployments when you push changes, you must install the GitHub app. See [GitHub](/deploy/github) for more information. You can clone your repository as a private or public repository. Public repositories are visible to anyone who navigates to the repository URL. Private repositories are only visible to people in your organization. On the [Git settings](https://dashboard.mintlify.com/settings/deployment/git-settings) page of your dashboard, select **Clone as private** or **Clone as public**. ## Install the CLI Run the following command to install the CLI: ```bash npm theme={null} npm i -g mint ``` ```bash pnpm theme={null} pnpm add -g mint ``` ## Preview locally Navigate to your documentation directory containing your `docs.json` file and run: ```bash theme={null} mint dev ``` A local preview of your documentation is available at `http://localhost:3000`. Alternatively, if you do not want to install the CLI globally, you can run a one-time script: ```bash theme={null} npx mint dev ``` ### Custom ports By default, the CLI uses port 3000. You can customize the port using the `--port` flag. To run the CLI on port 3333, for instance, use this command: ```bash theme={null} mint dev --port 3333 ``` If you attempt to run on a port that is already in use, the CLI uses the next available port: ```mdx theme={null} Port 3000 is already in use. Trying 3001 instead. ``` ## Skip OpenAPI processing If you have many OpenAPI files, skip OpenAPI file processing during local development to improve performance by using the `--disable-openapi` flag: ```bash theme={null} mint dev --disable-openapi ``` ### Preview as a specific group If you use group-based access control to restrict access to your documentation, you can preview as a specific authentication group by using the `--groups [groupname]` flag. For example, if you have a group named `admin`, you can preview as a member of that group with the command: ```bash theme={null} mint dev --groups admin ``` ## Create a new project To create a new documentation project, run the following command: ```bash theme={null} mint new [directory] ``` This command clones the [starter kit](https://github.com/mintlify/starter) into a specified directory. If you do not specify a directory, the CLI tool prompts you to create a new subdirectory or overwrite the current directory. Overwriting the current directory deletes any existing files. The CLI tool prompts you for a project name and [theme](/customize/themes) to finish setting up your project. ### Flags | Flag | Description | Required | | --------- | -------------------------------------------------------------------------------------- | -------- | | `--name` | Set the name of the new project. | Yes | | `--theme` | Set the [theme](/customize/themes) of the new project. | Yes | | `--force` | Overwrite the current directory without prompting, even if it contains existing files. | No | When running `mint new` in non-interactive environments like CI/CD pipelines or with AI coding agents, you must provide all required flags (`--name` and `--theme`). The CLI automatically detects non-interactive environments. If required flags are missing, it outputs usage instructions instead of hanging on prompts. ## Update the CLI If your local preview is out of sync with what you see on the web in the production version, update your local CLI: ```bash theme={null} mint update ``` If this `mint update` command is not available on your local version, re-install the CLI with the latest version: ```bash npm theme={null} npm i -g mint@latest ``` ```bash pnpm theme={null} pnpm add -g mint@latest ``` ## Additional commands ### Find broken links Identify any broken internal links with the following command: ```bash theme={null} mint broken-links ``` The command ignores files matching [.mintignore](/organize/mintignore) patterns. Links that point to ignored files are reported as broken. To also check anchor links like `/path/to/page#anchor`, use the `--check-anchors` flag: ```bash theme={null} mint broken-links --check-anchors ``` ### Find accessibility issues Test the color contrast ratios and search for missing alt text on images and videos in your documentation with the following command: ```bash theme={null} mint a11y ``` Use flags to check for specific accessibility issues. ```bash theme={null} # Check only for missing alt text mint a11y --skip-contrast # Check only for color contrast issues mint a11y --skip-alt-text ``` ### Validate documentation build Validate your documentation build in strict mode, which exits with an error if there are any warnings or errors. Use this command for CI/CD pipelines to prevent broken documentation deployments. ```bash theme={null} mint validate ``` Use flags to configure the validation command. * `--groups [groupname]`: Mock user groups for validation (useful when testing group-based access control) * `--disable-openapi`: Disable OpenAPI file generation during validation ### Check OpenAPI spec Check your OpenAPI file for errors with the following command: ```bash theme={null} mint openapi-check ``` Pass a filename (for example, `./openapi.yaml`) or a URL (for example, `https://petstore3.swagger.io/api/v3/openapi.json`). ### Rename files Rename and update all references to files with the following command: ```bash theme={null} mint rename ``` ### Migrate MDX endpoint pages Migrate MDX endpoint pages to autogenerated pages from your OpenAPI specification with the following command: ```bash theme={null} mint migrate-mdx ``` This command converts individual MDX endpoint pages to autogenerated pages defined in your `docs.json`, moves MDX content to the `x-mint` extension in your OpenAPI specification, and updates your navigation. See [Migrating from MDX](/guides/migrating-from-mdx) for detailed information. ## Formatting While developing locally, we recommend using extensions in your IDE to recognize and format MDX files. If you use Cursor, Windsurf, or VS Code, we recommend the [MDX VS Code extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting. If you use JetBrains, we recommend the [MDX IntelliJ IDEA plugin](https://plugins.jetbrains.com/plugin/14944-mdx) for syntax highlighting, and setting up [Prettier](https://prettier.io/docs/webstorm) for code formatting. ## Troubleshooting This may be due to an outdated version of Node.js. Try the following: 1. Remove the currently installed version of the mint CLI: `npm uninstall -g mint` 2. Upgrade to Node.js v20.17.0+. 3. Reinstall the mint CLI: `npm install -g mint` **Solution**: Go to the root of your device and delete the `~/.mintlify` folder. Afterwards, run `mint dev` again. This is due to not having the required permissions to globally install node packages. **Solution**: Try running `sudo npm i -g mint`. When prompted, enter the password that you use to unlock your computer. This is likely due to an outdated version of the CLI. **Solution:** Run `mint update` to get the latest changes. If you have any problems with the CLI package, you should first run `npm ls -g`. This command shows what packages are globally installed on your machine. If you don't use npm or don't see it in the -g list, try `which mint` to locate the installation. If you have a package named `mint` and a package named `mintlify` installed, you should uninstall `mintlify`. 1. Uninstall the old package: ```bash theme={null} npm uninstall -g mintlify ``` 2. Clear your npm cache: ```bash theme={null} npm cache clean --force ``` 3. Reinstall the new package: ```bash theme={null} npm i -g mint ``` If you run `mint version` and the client version displays as `none`, the CLI may be unable to download the client application due to a corporate firewall or VPN blocking the download. **Solution:** Ask your IT administrator to add `releases.mintlify.com` to your network allowlist to enable local development with the CLI. # Introduction Source: https://mintlify-docs.mintlify.app/introduction Meet the next generation of documentation. AI-native, beautiful out-of-the-box, and built for developers.
Decorative background image. Decorative background image.

Documentation

Meet the next generation of documentation. AI-native, beautiful out-of-the-box, and built for developers and teams.
## Get started with Mintlify Explore the key features that make Mintlify the modern documentation platform for developers and teams. Deploy your first docs site in minutes with our step-by-step guide Install the CLI to preview and develop your docs locally Make quick updates and manage content with our browser-based editor Build rich, interactive documentation with our ready-to-use components ## Why Mintlify? Mintlify combines powerful features with an intuitive developer experience to help you create documentation that users love. Built-in AI assistant, agent, and workflows for reading, writing, and discovering content Modern, responsive design that looks great on any device - no configuration needed Git-based workflow, local development, and support for MDX and OpenAPI Automatic deployments from your repository with preview branches and instant updates # Migrate to Mintlify Source: https://mintlify-docs.mintlify.app/migration Learn how to migrate to Mintlify from Docusaurus, ReadMe, or another platform. This guide helps you move your existing documentation to Mintlify. Choose automated migration for supported platforms or manual migration for complete control over the process. ## Choose your migration path If you are migrating from Docusaurus or ReadMe, use our tools to automate your migration. If you are migrating from any other platform, follow our guide to migrate your content. Migrate your documentation using the [@mintlify/scraping package](https://www.npmjs.com/package/@mintlify/scraping). The package scrapes your content and converts it to use Mintlify components. ### Supported platforms Mintlify provides automated migration tools for the following platforms: Automatically convert your Docusaurus site to Mintlify format Import your ReadMe documentation with full component support If your documentation is hosted on another platform, see the manual migration steps. ### Installing the scraper Install the `@mintlify/scraping` package to get started. ```bash theme={null} npm install @mintlify/scraping@latest -g ``` ### Scraping pages and sections The migration tool automatically detects your documentation platform and converts your content. Prepared files are stored locally in `./docs` by default. For large documentation sites, migrate smaller sections one at a time rather than the entire site at once. **Migrate entire sections:** ```bash theme={null} mintlify-scrape section https://your-docs-site.com/docs ``` **Migrate single pages:** ```bash theme={null} mintlify-scrape page https://your-docs-site.com/docs/getting-started ``` **Filter specific paths:** Use the `--filter` (or `-f`) option to scrape only URLs matching a specific path prefix. ```bash theme={null} mintlify-scrape section https://your-docs-site.com --filter=/docs ``` The filter matches the specified path and all nested paths. For example, `--filter=/docs` matches `/docs`, `/docs/getting-started`, `/docs/api/reference`, and so on. You can also use the CLI command: ```bash theme={null} mint scrape site https://your-docs-site.com --filter=/docs ``` **Migrate OpenAPI specifications:** ```bash theme={null} mintlify-scrape openapi-file [openApiFilename] ``` ### Add prepared content to your Mintlify project After scraping your existing documentation platform, you are ready to build your docs on Mintlify. Confirm that all of your pages have been migrated successfully. Review the generated files in the `./docs` directory. Add these files to the documentation repository that you created during the onboarding process. This is usually a GitHub repository. Push your changes to deploy your migrated documentation to Mintlify. Migrate your documentation from any platform with full control over the process. ### Content migration To migrate your content to Mintlify, you need: * A valid `docs.json` for your site settings and navigation. See [Global settings](/organize/settings) and [Navigation](/organize/navigation) for more information. * A Markdown file (`.md` or `.mdx`) for each page of your documentation. MDX is the recommended format. See [Pages](/organize/pages) for more information. * (Optional) An OpenAPI specification for your API endpoint pages. See [OpenAPI setup](/api-playground/openapi-setup) for more information. If your content is already in Markdown format, copy the content to your Mintlify project. Otherwise, convert your content to MDX format. Create your `docs.json` referencing the paths to your Markdown pages. If you have OpenAPI specifications, add them to your `docs.json` and configure the API playground. If you migrate your content as `.md` files, convert them to `.mdx` to support interactive features like React components. ### Asset migration Copy assets to your repository's `images/` directory. Update references in your Markdown files: ```mdx theme={null} ![Alt text](/images/screenshot.png) ``` ## Post-migration checklist After completing your migration (automated or manual), we recommend checking: * All pages render correctly * Navigation works as intended * Internal links resolve properly * Images and assets load correctly * Code blocks display with proper syntax highlighting * Search works * Deployment is configured * Custom domain is set up (if applicable) Test your documentation thoroughly before directing users to your new Mintlify site. # Analytics Source: https://mintlify-docs.mintlify.app/optimize/analytics Track documentation analytics and understand content effectiveness with visitor data. The [analytics](https://dashboard.mintlify.com/products/analytics/v2/) page in your dashboard shows data about visitors to your docs, how they interact with the assistant, what they search for, and their feedback. Use this information to identify which pages are most valuable to your users and track trends over time. ## Filter by AI or human visitors Filter your analytics data by traffic source to analyze AI agent traffic separately from human visitors. The traffic source filter on the analytics page. The traffic source filter on the analytics page. When you change the traffic source, the analytics page only displays relevant metrics to that traffic source. For AI traffic, the analytics page only displays visitors and MCP searches. For human traffic, the analytics page displays visitors, assistant insights, searches, and feedback. ## Filter time period Use the range selector to adjust the time period for displayed data. The range selector expanded to show options for viewing different time periods of data. The range selector expanded to show options for viewing different time periods of data. ## Visitors The visitors tab displays a bar chart of visitors over time, a list of popular pages, and referral sources. Review your visitors analytics to: * **Monitor traffic trends**: Observe changes in traffic after updates or new content to understand the impact of your changes. * **Identify popular pages**: Use popular pages to understand what content is most important to your users so that you can make sure it is up to date and comprehensive. * **Track traffic sources**: Understand where your users are coming from to help you optimize your content for the right audience. ### Top agents When viewing AI traffic, top agents replaces referrals in the visitors tab. Top agents shows which AI agents are visiting your documentation. Use this information to help determine: * **AI agent distribution**: See which AI platforms are accessing your docs to learn which tools your users prefer. * **Integration opportunities**: Identify which AI platforms to prioritize for optimization and testing. * **AI traffic patterns**: Monitor which agents are most active and how their usage changes over time. ## Assistant The assistant tab displays a bar chart of assistant usage over time, a list of categories, and chat history. Review your assistant analytics to: * **Monitor assistant usage**: Observe changes in assistant usage to understand how your users engage with your content. * **Identify frequent categories**: Use high occurrence categories to understand what topics are most important to your users. Identify gaps in coverage and prioritize content updates. * **Review chat history**: Get detailed high intent data about how your users think about your product by reviewing their chat history with the assistant. See what terms they use, what they need help with, and what tasks they try to accomplish. ### Categories The categories tab uses LLMs to automatically group conversations by topic or theme. The categories tab in the assistant analytics page. The categories tab in the assistant analytics page. Use categories to identify common topics, patterns in user needs and behavior, and areas where documentation might need expansion or clarification. Click a category row to expand it and view related conversations grouped under that category. Click an individual conversation to view the complete chat thread, including the user's question, the assistant's response, and any sources cited. ### Chat history The chat history tab displays chronological records of all assistant conversations. Click any message to view the complete chat thread, including the user's question, the assistant's response, and any sources cited. ### Export queries For deeper analysis, export a CSV file of your queries, responses, and sources. Use your preferred tools to analyze the exported data. Sample analysis prompts: * List any queries that had no sources cited. * Find patterns in unsuccessful interactions. ## Searches The Searches metric is only available when viewing human traffic. The searches tab displays a bar chart of searches over time and specific queries. Review your searches analytics to: * **Monitor search trends**: Observe changes in search queries to understand how your users are finding your content and what topics they want information on. * **Identify frequent queries**: Use frequent queries to understand what topics are most important to your users. Identify gaps in coverage and prioritize content updates. * **Identify low click through rates**: Click through rates (CTR) show how many users click a search result after typing in a query. Low CTR can indicate that the search results are not relevant to users' queries. If you have frequent search terms with low CTR, consider improving the relevance of search results by adding keywords and updating your content. ## MCP searches The MCP Searches metric is only available when viewing AI traffic. The MCP searches tab displays AI agent search interactions through the Model Context Protocol (MCP). This metric shows how AI agents query and interact with your documentation. Review your MCP searches analytics to: * **Monitor AI search activity**: Track how frequently AI agents search your documentation and identify trends in AI-driven queries. * **Identify common AI queries**: Understand what information AI agents are looking for to optimize your content for AI consumption. * **Improve AI discoverability**: Use frequent MCP search queries to identify gaps in your documentation that AI agents struggle to find answers for. ## Feedback The feedback tab displays a bar chart of feedback over time and specific feedback items. See [Feedback](/optimize/feedback) for more information on using feedback data to improve your content. # Feedback Source: https://mintlify-docs.mintlify.app/optimize/feedback Monitor user satisfaction and feedback on your documentation. To collect and view feedback, you must enable feedback from the [Add-ons](https://dashboard.mintlify.com/products/addons) page in your dashboard. The [feedback](https://dashboard.mintlify.com/products/analytics/v2/feedback) tab displays quantitative thumbs up and thumbs down votes your docs have received and any qualitative feedback that users have provided. Use this information to gauge the quality of your docs and make improvements. View feedback on the analytics page in your dashboard. Feedback tab in the Analytics page. Feedback tab in the Analytics page. ## Feedback types Contextual and code snippet feedback are in beta. To enable them for your documentation site, [contact our sales team](mailto:hahnbee@mintlify.com). The feedback tab displays information according to the [feedback add-ons](https://dashboard.mintlify.com/products/addons) that you enable. Feedback toggles in the Add-ons page. Feedback toggles in the Add-ons page. * **Thumbs rating**: Simple thumbs up/down voting to gauge overall satisfaction with pages. * **Contextual feedback**: Free form feedback about the content of a page. * **Code snippet feedback**: Feedback specifically on code snippets. * **Edit suggestions**: Allow users to suggest edits to your documentation. Only available for public GitHub repositories. * **Raise issues**: Allow users to create GitHub issues directly from your documentation. Only available for public GitHub repositories. If you disable telemetry in your `docs.json` file, feedback features are not available on your documentation pages. ## Manage feedback For contextual and code snippet feedback, you can set the status of a piece of feedback and add internal notes to track your work resolving user feedback. ### Change feedback status Select the status beside a piece of feedback to mark it as **Pending**, **In Progress**, **Resolved**, or **Dismissed**. Best practices for setting feedback statuses: * **Pending**: Feedback is awaiting review. * **In Progress**: Feedback has been validated and is being worked on. * **Resolved**: Feedback has been resolved. * **Dismissed**: Feedback has been dismissed as not actionable, irrelevant, or inaccurate. ### Filter by status Use the status filter to control which feedback is displayed. Clear a status to hide all feedback with that status. By default, all feedback is displayed. ### Add internal notes Click a piece of feedback to add an internal note. These notes are only visible to people with access to your dashboard. Use notes to add information for collaboration, link relevant support or engineering tickets, or remember any other useful information. ## Use feedback data Review your feedback data to: * **Identify successful content**: Pages with the most positive feedback show what works well in your documentation. * **Prioritize improvements**: Pages with the most negative feedback indicate what content might need attention. * **Take action**: Make documentation updates based on direct user feedback. # PDF exports Source: https://mintlify-docs.mintlify.app/optimize/pdf-exports Export your documentation as a single PDF file. PDF exports are available on [Enterprise plans](https://mintlify.com/pricing). You can export your docs as a single PDF file for offline viewing. The PDF contains all the content in the docs, including images and links, and a navigable table of contents. ## Exporting a PDF Navigate to the [General](https://dashboard.mintlify.com/settings/deployment/general) page in the Project Settings section of your dashboard. Select the **Export all content** button. Optionally, customize the export options: * **Page format**: Choose the page size of the PDF. * **Scale percentage**: Adjust the scale of the PDF. * **Include footer**: Include a footer with the page number and total pages. Select **Export** to start the export process. Once the export is complete, you receive an email with a download link. Click the download link to download the PDF file. # SEO Source: https://mintlify-docs.mintlify.app/optimize/seo Optimize SEO with meta tag configuration for better search visibility. Mintlify automatically handles many SEO best practices, including: * Meta tag generation * Sitemap and `robots.txt` file generation * Semantic HTML structure * Mobile optimization You can fully customize your site's meta tags by adding the `metatags` field to your `docs.json` or a page's frontmatter. ## Automatically generated meta tags Mintlify generates the following meta tags for every page. You can override these meta tags by specifying them in your `docs.json` or a page's frontmatter. **Basic metadata:** * `charset: utf-8` - Character encoding * `og:type: website` - Open Graph type * `og:site_name` - Your documentation site name * `twitter:card: summary_large_image` - Twitter card type **Page-specific metadata:** * `title` - Page title, formatted as "Page Title - Site Name" * `og:title` - Open Graph title, same as page title * `twitter:title` - Twitter title, same as page title * `description` - Page description * `og:description` - Open Graph description, same as page description * `twitter:description` - Twitter description, same as page description **URL and canonical:** * `canonical` - Automatically built from page URL * `og:url` - Set to canonical URL **SEO and indexing:** * `robots` - Generated from page metadata * `noindex` - Generated from page metadata * `keywords` - Generated from page metadata **Images:** * `og:image` - Open Graph image, `og:image:width` set to 1200 and `og:image:height` 630 * `twitter:image` - Twitter image, `twitter:image:width` set to 1200 and `twitter:image:height` 630 **Browser and app metadata:** * `applicationName` - Your documentation site name * `generator: Mintlify` - Identifies the site generator as Mintlify * `apple-mobile-web-app-title` - iOS home screen app name * `msapplication-TileColor` - Windows tile color * Favicons and icons from your config * Sitemap reference link Any meta tags in your `docs.json` `seo.metatags` configuration are also automatically injected into every page, such as `google-site-verification` for search console validation. ## Global meta tags To set default meta tags for all pages, add the `metatags` field to your `docs.json`. ```json theme={null} "seo": { "metatags": { "og:image": "link to your default meta tag image" } } ``` ### Set a canonical URL If you're using a custom domain, set the `canonical` meta tag to ensure search engines index your preferred domain. A canonical URL tells search engines which version of your documentation is the primary one. This improves SEO when your documentation is accessible from multiple URLs and prevents issues with duplicate content. ```json theme={null} "seo": { "metatags": { "canonical": "https://www.your-custom-domain-here.com" } } ``` ## Page-specific meta tags To set page-specific meta tags, add them to a page's frontmatter. Page-specific meta tags include: * `title` - Page title * `description` - Page description appears below the title on the page and in some search engine results * `keywords` - Comma-separated keywords * `og:title` - Open Graph title for social sharing * `og:description` - Open Graph description * `og:image` - Open Graph image URL * `og:url` - Open Graph URL * `og:type` - Open Graph type like "article" or "website" * `og:image:width` - Open Graph image width * `og:image:height` - Open Graph image height * `twitter:title` - Twitter card title * `twitter:description` - Twitter card description * `twitter:image` - Twitter card image * `twitter:card` - Twitter card type like `summary` or `summary_large_image` * `twitter:site` - Twitter site handle * `twitter:image:width` - Twitter image width * `twitter:image:height` - Twitter image height * `noindex` - Set to `true` to prevent search engine indexing * `robots` - Robots meta tag value ```mdx theme={null} --- title: "Your example page title" description: "Page-specific description" "og:image": "link to your meta tag image" "og:title": "Social media title" keywords: ["keyword1", "keyword2"] --- ``` You must wrap meta tags with colons in quotes. For example, `og:title: "Social media title"`. You must format the `keywords` field as a YAML array. For example, `keywords: ["keyword1", "keyword2", "keyword3"]`. ## Common meta tags reference Below is a comprehensive list of meta tags you can add to your `docs.json`. These meta tags help improve your site's SEO, social sharing, and browser compatibility. The `og:image` adds a background image that Mintlify automatically overlays with your logo, page title, and description when generating social media previews. You can preview how your meta tags appear on different platforms using [metatags.io](https://metatags.io/). ```json expandable theme={null} "seo": { "metatags": { "robots": "noindex", "charset": "UTF-8", "viewport": "width=device-width, initial-scale=1.0", "description": "Page description", "keywords": "keyword1, keyword2, keyword3", "author": "Author Name", "robots": "index, follow", "googlebot": "index, follow", "google": "notranslate", "google-site-verification": "verification_token", "generator": "Mintlify", "theme-color": "#000000", "color-scheme": "light dark", "canonical": "https://your-custom-domain-here.com", "format-detection": "telephone=no", "referrer": "origin", "refresh": "30", "rating": "general", "revisit-after": "7 days", "language": "en", "copyright": "Copyright 2024", "reply-to": "email@example.com", "distribution": "global", "coverage": "Worldwide", "category": "Technology", "target": "all", "HandheldFriendly": "True", "MobileOptimized": "320", "apple-mobile-web-app-capable": "yes", "apple-mobile-web-app-status-bar-style": "black", "apple-mobile-web-app-title": "App Title", "application-name": "App Name", "msapplication-TileColor": "#000000", "msapplication-TileImage": "path/to/tile.png", "msapplication-config": "path/to/browserconfig.xml", "og:title": "Open Graph Title", "og:type": "website", "og:url": "https://example.com", "og:image": "https://example.com/image.jpg", "og:description": "Open Graph Description", "og:site_name": "Site Name", "og:locale": "en_US", "og:video": "https://example.com/video.mp4", "og:audio": "https://example.com/audio.mp3", "twitter:card": "summary", "twitter:site": "@username", "twitter:creator": "@username", "twitter:title": "Twitter Title", "twitter:description": "Twitter Description", "twitter:image": "https://example.com/image.jpg", "twitter:image:alt": "Image Description", "twitter:player": "https://example.com/player", "twitter:player:width": "480", "twitter:player:height": "480", "twitter:app:name:iphone": "App Name", "twitter:app:id:iphone": "12345", "twitter:app:url:iphone": "app://", "article:published_time": "2024-01-01T00:00:00+00:00", "article:modified_time": "2024-01-02T00:00:00+00:00", "article:expiration_time": "2024-12-31T00:00:00+00:00", "article:author": "Author Name", "article:section": "Technology", "article:tag": "tag1, tag2, tag3", "book:author": "Author Name", "book:isbn": "1234567890", "book:release_date": "2024-01-01", "book:tag": "tag1, tag2, tag3", "profile:first_name": "John", "profile:last_name": "Doe", "profile:username": "johndoe", "profile:gender": "male", "music:duration": "205", "music:album": "Album Name", "music:album:disc": "1", "music:album:track": "1", "music:musician": "Artist Name", "music:song": "Song Name", "music:song:disc": "1", "music:song:track": "1", "video:actor": "Actor Name", "video:actor:role": "Role Name", "video:director": "Director Name", "video:writer": "Writer Name", "video:duration": "120", "video:release_date": "2024-01-01", "video:tag": "tag1, tag2, tag3", "video:series": "Series Name" } } ``` ## Sitemaps and robots.txt files Mintlify automatically generates a `sitemap.xml` file and a `robots.txt` file. You can view your sitemap by appending `/sitemap.xml` to your documentation site's URL. Only pages included in your `docs.json` are included by default. To include hidden links, add `seo.indexing` to your `docs.json`: ```json theme={null} "seo": { "indexing": "all" } ``` ### Custom sitemaps and robots.txt files To add a custom `sitemap.xml` or `robots.txt` file, create a `sitemap.xml` or `robots.txt` file at the root of your project. Adding a custom file overrides the automatically generated file of the same name. If you delete a custom file, the default file automatically applies again. ## Disable indexing To prevent search engines from indexing a page, add `noindex: true` to the [frontmatter](/organize/pages) of the page. ```yaml theme={null} --- noindex: true --- ``` Pages with `hidden: true` in their frontmatter are automatically treated as `noindex: true`. See [Hidden pages](/organize/hidden-pages) for more details. You can also specify `noindex` for all pages in your docs by setting the `metatags.robots` field to `"noindex"` in your `docs.json`: ```json theme={null} "seo": { "metatags": { "robots": "noindex" } } ``` ## SEO best practices * Use clear, descriptive page titles (50-60 characters) * Write compelling descriptions (150-160 characters) * Include relevant keywords * Make each page title and description unique * Use proper heading hierarchy (H1 → H2 → H3) * Write for humans first, search engines second * Include relevant keywords in headings and content * Keep URLs short, descriptive, and organized hierarchically * Break up long content with subheadings and lists * Link to related pages within your documentation * Use descriptive anchor text instead of "click here" * Create topic clusters by linking related concepts * Use the automatic cross-referencing features * Use descriptive filenames for images * Always include alt text for accessibility and SEO * Optimize image file sizes for faster loading * Use relevant images that support your content # Hidden pages Source: https://mintlify-docs.mintlify.app/organize/hidden-pages Hide pages from your navigation while keeping them accessible. Hidden pages don't appear in your site's navigation, but anyone who knows the URL can still access them. Use hidden pages for content you want users to access or reference as context for AI tools, but don't want listed in the navigation. For example, if you create a hidden page like `guides/hidden-page.mdx`, visitors can reach it at `docs.yoursite.com/guides/hidden-page`. If your content requires strict access control, you must configure [authentication](/deploy/authentication-setup). To restrict pages to specific user groups, set up [group-based access control](/deploy/authentication-setup#control-access-with-groups). Some navigation elements like sidebars, dropdowns, and tabs may appear empty or shift layout on hidden pages. ## Hide a page To hide a page, set `hidden: true` in the page's frontmatter or remove it from your `docs.json` navigation. ### Set hidden: true in frontmatter Add `hidden: true` to a page's frontmatter to remove it from the rendered navigation while still including it in your `docs.json` configuration. ```yaml theme={null} --- title: "My hidden page" hidden: true --- ``` Search engines cannot index hidden pages. When you set `hidden: true`, the page is automatically excluded from search engine indexing, sitemaps, and AI context. However, setting `noindex: true` does **not** hide a page from navigation. See [Disable indexing](/optimize/seo#disable-indexing) for more information. ### Remove the page from navigation If you don't include a page in your `docs.json` navigation, you hide it. This method works well for pages that you don't want to appear in navigation at all. ## Hide a group of pages To hide a group of pages, set the `hidden` property to `true` for the group in your `docs.json` file: ```json theme={null} "groups": [ { "group": "Getting started", "hidden": true, "pages": [ "index", "quickstart" ] }, { "group": "Guides", "pages": [ "guides/hidden-page.mdx", "guides/hidden-groups.mdx" ] } ] ``` In this example, the `Getting started` group is hidden and the `Guides` group is visible. ### Hide a tab To hide a tab, add the `hidden` property for the tab in your `docs.json` file: ```json theme={null} "tabs": [ { "tab": "Home", "hidden": true, "pages": [ "index", "quickstart" ] } ] ``` ## Search, SEO, and AI indexing By default, hidden pages don't appear in indexing for search engines, documentation site search, or as AI assistant context. To include hidden pages in search results and assistant context, add the `seo` property to your `docs.json`: ```json theme={null} "seo": { "indexing": "all" } ``` ### Understanding hidden versus noindex The relationship between `hidden` and `noindex` is one-directional: ```text hidden: true → automatically applies noindex theme={null} Hidden pages are automatically excluded from search engines, sitemaps, and AI context. ``` ```text noindex: true → does NOT apply hidden theme={null} Pages with noindex: true remain visible in navigation. They only affect search engine indexing and AI context. ``` To exclude a specific page from search engines while keeping it visible in navigation, add `noindex: true` to its frontmatter. To hide a page from navigation and search engines, use `hidden: true`. # Navigation Source: https://mintlify-docs.mintlify.app/organize/navigation Design information architecture that aligns with user needs. The `navigation` property in `docs.json` controls the structure and information hierarchy of your documentation. With proper navigation configuration, you can organize your content so that users can find exactly what they're looking for. Choose one primary organizational pattern at the root level of your navigation. Once you've chosen your primary pattern, you can nest other navigation elements within it. ## Pages Pages are the most fundamental navigation component. Each page is an MDX file in your documentation repository. In the `navigation` object, `pages` is an array where each entry must reference the path to a page file. ```json theme={null} { "navigation": { "pages": [ "settings", "pages", "navigation", "themes", "custom-domain" ] } } ``` ## Groups Use groups to organize your sidebar navigation into sections. You can nest groups within each other, label them with tags, and style them with icons. In the `navigation` object, `groups` is an array where each entry is an object that requires a `group` field and a `pages` field. The `icon`, `tag`, `root`, and `expanded` fields are optional. ```json theme={null} { "navigation": { "groups": [ { "group": "Getting started", "icon": "play", "pages": [ "quickstart", { "group": "Editing", "expanded": false, "icon": "pencil", "pages": [ "installation", "editor" ] } ] }, { "group": "Writing content", "icon": "notebook-text", "tag": "NEW", "pages": [ "writing-content/page", "writing-content/text" ] } ] } } ``` ### Root page Use the `root` property to designate a main page for a group. When a group has a root page, clicking the group title in the sidebar navigation opens the root page. ```json theme={null} { "navigation": { "groups": [ { "group": "API pages", "root": "api-overview", "pages": [ "api-reference/get", "api-reference/post", "api-reference/delete" ] } ] } } ``` ### Default expanded state Use the `expanded` property to control the default state of a nested group in the navigation sidebar. The `expanded` property only affects nested groups--groups within groups. Top-level groups are always expanded and cannot be collapsed. ```json theme={null} { "group": "Getting started", "pages": [ "quickstart", { "group": "Advanced", "expanded": false, "pages": ["installation", "configuration"] } ] } ``` ## Tabs Tabs create distinct sections of your documentation with separate URL paths. Tabs create a horizontal navigation bar at the top of your documentation that lets users switch between sections. In the `navigation` object, `tabs` is an array where each entry is an object that requires a `tab` field and can contain other navigation fields such as groups, pages, icons, or links to external pages. ```json theme={null} { "navigation": { "tabs": [ { "tab": "API reference", "icon": "square-terminal", "pages": [ "api-reference/get", "api-reference/post", "api-reference/delete" ] }, { "tab": "SDKs", "icon": "code", "pages": [ "sdk/fetch", "sdk/create", "sdk/delete" ] }, { "tab": "Blog", "icon": "newspaper", "href": "https://external-link.com/blog" } ] } } ``` ### Menus Menus add dropdown navigation items to a tab. Use menus to help users go directly to specific pages within a tab. Menu items can only contain groups, pages, and external links. ```json theme={null} { "navigation": { "tabs": [ { "tab": "Developer tools", "icon": "square-terminal", "menu": [ { "item": "API reference", "icon": "rocket", "groups": [ { "group": "Core endpoints", "icon": "square-terminal", "pages": [ "api-reference/get", "api-reference/post", "api-reference/delete" ] } ] }, { "item": "SDKs", "icon": "code", "description": "SDKs are used to interact with the API.", "pages": [ "sdk/fetch", "sdk/create", "sdk/delete" ] } ] } ] } } ``` ## Anchors Anchors add persistent navigation items to the top of your sidebar. Use anchors to section your content, provide quick access to external resources, or create prominent calls to action. In the `navigation` object, `anchors` is an array where each entry is an object that requires an `anchor` field and can contain other navigation fields such as groups, pages, icons, or links to external pages. ```json theme={null} { "navigation": { "anchors": [ { "anchor": "Documentation", "icon": "book-open", "pages": [ "quickstart", "development", "navigation" ] }, { "anchor": "API reference", "icon": "square-terminal", "pages": [ "api-reference/get", "api-reference/post", "api-reference/delete" ] }, { "anchor": "Blog", "href": "https://external-link.com/blog" } ] } } ``` ### Global anchors Use global anchors for links that should appear on all pages, regardless of which section of your navigation the user is viewing. Global anchors are particularly useful for linking to resources outside your documentation (such as a blog, community forum, or support portal) or for providing consistent access to important internal pages (such as a changelog or status page). ```json theme={null} { "navigation": { "global": { "anchors": [ { "anchor": "Changelog", "icon": "list", "href": "/changelog" }, { "anchor": "Blog", "icon": "pencil", "href": "https://mintlify.com/blog" } ] }, "tabs": [] } } ``` ## Dropdowns Dropdowns are an expandable menu at the top of your sidebar navigation. Each item in a dropdown directs to a section of your documentation. In the `navigation` object, `dropdowns` is an array where each entry is an object that requires a `dropdown` field and can contain other navigation fields such as groups, pages, icons, or links to external pages. ```json theme={null} { "navigation": { "dropdowns": [ { "dropdown": "Documentation", "icon": "book-open", "pages": [ "quickstart", "development", "navigation" ] }, { "dropdown": "API reference", "icon": "square-terminal", "pages": [ "api-reference/get", "api-reference/post", "api-reference/delete" ] }, { "dropdown": "Blog", "href": "https://external-link.com/blog" } ] } } ``` ## Products Products create a dedicated navigation division for organizing product-specific documentation. Use products to separate different offerings, services, or major feature sets within your documentation. In the `navigation` object, `products` is an array where each entry is an object that requires a `product` field and can contain other navigation fields such as groups, pages, icons, or links to external pages. ```json theme={null} { "navigation": { "products": [ { "product": "Core API", "description": "Core API description", "icon": "api", "groups": [ { "group": "Getting started", "pages": [ "core-api/quickstart", "core-api/authentication" ] }, { "group": "Endpoints", "pages": [ "core-api/users", "core-api/orders" ] } ] }, { "product": "Analytics Platform", "description": "Analytics Platform description", "icon": "chart-bar", "pages": [ "analytics/overview", "analytics/dashboard", "analytics/reports" ] }, { "product": "Mobile SDK", "description": "Mobile SDK description", "icon": "smartphone", "href": "https://mobile-sdk-docs.example.com" } ] } } ``` ## OpenAPI Integrate OpenAPI specifications directly into your navigation structure to automatically generate API documentation. When you add the `openapi` property to a navigation element (such as an anchor, tab, or group) without specifying any pages, Mintlify automatically generates pages for **all endpoints** defined in your OpenAPI specification. To control which endpoints appear, explicitly list the desired endpoints in a `pages` array. For more information about referencing OpenAPI endpoints in your docs, see the [OpenAPI setup](/api-playground/openapi-setup). ```json theme={null} { "navigation": { "groups": [ { "group": "API reference", "openapi": "/path/to/openapi-v1.json", "pages": [ "overview", "authentication", "GET /users", "POST /users", { "group": "Products", "openapi": "/path/to/openapi-v2.json", "pages": [ "GET /products", "POST /products" ] } ] } ] } } ``` ## Versions Partition your navigation into different versions. Versions are selectable from a dropdown menu. In the `navigation` object, `versions` is an array where each entry is an object that requires a `version` field and can contain any other navigation fields. ```json theme={null} { "navigation": { "versions": [ { "version": "1.0.0", "groups": [ { "group": "Getting started", "pages": ["v1/overview", "v1/quickstart", "v1/development"] } ] }, { "version": "2.0.0", "groups": [ { "group": "Getting started", "pages": ["v2/overview", "v2/quickstart", "v2/development"] } ] } ] } } ``` ### Version tags Add a badge label to version entries in the version selector dropdown using the optional `tag` field. Use tags to highlight specific versions such as "Latest", "Recommended", or "Beta." ```json theme={null} { "navigation": { "versions": [ { "version": "2026_03", "tag": "Latest", "groups": [ { "group": "Getting started", "pages": ["getting-started", "quickstart"] } ] }, { "version": "2025_12", "tag": "Recommended", "groups": [ { "group": "Getting started", "pages": ["2025_12/getting-started", "2025_12/quickstart"] } ] } ] } } ``` ## Languages Partition your navigation into different languages. Languages are selectable from a dropdown menu. In the `navigation` object, `languages` is an array where each entry is an object that requires a `language` field and can contain any other navigation fields, including language-specific banner configurations. ```json theme={null} { "navigation": { "languages": [ { "language": "en", "banner": { "content": "🚀 Version 2.0 is now live! See our [changelog](/en/changelog) for details.", "dismissible": true }, "groups": [ { "group": "Getting started", "pages": ["en/overview", "en/quickstart", "en/development"] } ] }, { "language": "es", "banner": { "content": "🚀 ¡La versión 2.0 ya está disponible! Consulta nuestro [registro de cambios](/es/changelog).", "dismissible": true }, "groups": [ { "group": "Getting started", "pages": ["es/overview", "es/quickstart", "es/development"] } ] } ] } } ``` For automated translations, contact the Mintlify sales team to discuss solutions. ## Breadcrumbs Breadcrumbs display the full navigation path at the top of pages. Some themes have breadcrumbs enabled by default and others do not. ```json Display full breadcrumbs theme={null} "styling": { "eyebrows": "breadcrumbs" } ``` ```json Display parent section only theme={null} "styling": { "eyebrows": "section" } ``` ## Interaction configuration Control how users interact with navigation elements using the `interaction` property in your `docs.json`. ### Enable auto-navigation for groups When a user expands a navigation group, some themes automatically navigate to the first page in the group. You can override a theme's default behavior using the `drilldown` option. ```json Force navigation theme={null} "interaction": { "drilldown": true } ``` ```json Prevent navigation theme={null} "interaction": { "drilldown": false } ``` * Set to `true` to force automatic navigation to the first page when a user selects a navigation group. * Set to `false` to prevent navigation and only expand or collapse the group when a user selects a navigation group. * Leave unset to use the theme's default behavior. # Pages Source: https://mintlify-docs.mintlify.app/organize/pages Configure page metadata, titles, and frontmatter properties. Each page is a Markdown file. You can use either `.mdx` or `.md` file types for your pages. We recommend MDX, which combines Markdown with React components for rich, interactive documentation. Plain Markdown (`.md`) can expedite migration from other platforms, but switching to MDX enables more features. ## Page metadata Every page begins with frontmatter, the YAML metadata enclosed by `---` at the top of a file. This metadata controls how your page appears and behaves. Use frontmatter to control: * Page titles and descriptions * Sidebar titles, icons, and tags * Page layouts * SEO meta tags * Custom metadata ### Basic frontmatter ```yaml theme={null} --- title: "About frontmatter" description: "Frontmatter is the metadata that controls how your page appears and behaves" sidebarTitle: "Frontmatter" icon: "book" tag: "NEW" --- ``` ### Frontmatter fields **title** (required) The title of your page that appears in navigation and browser tabs. **description** A brief description of what this page covers. Displays under the title and improves SEO. **sidebarTitle** A short title that displays in the sidebar navigation. **icon** The icon to display. Options: * Font Awesome icon name * Lucide icon name * Tabler icon name * URL to an externally hosted icon * Path to an icon file in your project **iconType** For Font Awesome icons only. The style of the icon. Options: `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`. **tag** A tag that appears next to your page title in the sidebar. **hidden** Set to `true` to remove the page from the sidebar navigation. Users can still access the page via its URL, but search engines do not index it. See [Hidden pages](/organize/hidden-pages) for details. **noindex** Set to `true` to prevent search engines from indexing the page. See [Disable indexing](/optimize/seo#disable-indexing) for details. All pages with `hidden: true` in their frontmatter receive `noindex: true` automatically. ## Page mode Control your page's layout with the `mode` setting. ### Default If you do not define a mode, the page uses a standard layout with sidebar navigation and table of contents. ```yaml theme={null} --- title: "Default page title" --- ``` ### Wide Wide mode hides the table of contents. Use this mode for pages without headings or if you want extra horizontal space. ```yaml theme={null} --- title: "Wide page title" mode: "wide" --- ``` Every theme supports wide mode. ### Custom Custom mode provides a minimalist layout and removes all elements except for the top navbar. Treat custom mode as a blank canvas to build landing pages or unique layouts with minimal navigation. ```yaml theme={null} --- title: "Custom page title" mode: "custom" --- ``` The `style` property on custom mode pages may cause a layout shift on page load. Prefer Tailwind CSS or custom CSS to avoid this issue. ### Frame Frame mode provides a layout similar to custom mode but keeps the sidebar navigation. Use this mode to include custom HTML and components while preserving the default navigation experience. ```yaml theme={null} --- title: "Frame page title" mode: "frame" --- ``` Only Aspen, Almond, and Luma themes support frame mode. ### Center Center mode removes the sidebar and table of contents, and centers the content. Use center mode for changelogs or other pages where you want to place focus on the content. ```yaml theme={null} --- title: "Center page title" mode: "center" --- ``` Mint and Linden themes support center mode. ## API pages To create an interactive API playground, add an API specification to your frontmatter by setting `api` or `openapi`. ```yaml theme={null} --- openapi: "GET /endpoint" --- ``` Learn more about building [API documentation](/api-playground/overview). ## External links Link to external sites directly from your navigation with the `url` metadata. ```yaml theme={null} --- title: "npm Package" url: "https://www.npmjs.com/package/mint" --- ``` ## Search engine optimization Mintlify automatically generates most SEO meta tags. You can set SEO meta tags manually to customize your approach to SEO, social sharing, and browser compatibility. Always wrap meta tags with colons in quotes. ```yaml theme={null} --- "twitter:image": "/images/social-preview.jpg" --- ``` See [SEO](/optimize/seo) for the full list of SEO metadata options. ## Internal search keywords Help users discover a specific page in search results by providing `keywords` in your metadata. These keywords don't appear in page content. If users search for the keywords, the page appears in the search results. ```yaml theme={null} --- keywords: ['configuration', 'setup', 'getting started'] --- ``` ## Last modified timestamp Show a "Last modified on \[date]" timestamp on all pages by enabling `metadata.timestamp` in your global settings. ```json docs.json theme={null} "metadata": { "timestamp": true } ``` To override the global timestamp setting for an individual page, use the `timestamp` frontmatter field. ```yaml theme={null} --- title: "Page title" timestamp: false --- ``` If you set `timestamp: true`, the page always shows the timestamp even if the global setting is `false`. If you set `timestamp: false`, the page hides the timestamp even if the global setting is `true`. # Global settings Source: https://mintlify-docs.mintlify.app/organize/settings Configure site-wide settings in docs.json. The `docs.json` file lets you turn a collection of Markdown files into a navigable, customized documentation site. This required configuration file controls styling, navigation, integrations, and more. Think of it as the blueprint for your documentation. Settings in `docs.json` apply globally to all pages. ## Setting up your docs.json To get started, you only need to specify `theme`, `name`, `colors.primary`, and `navigation`. Other fields are optional and you can add them as your documentation needs grow. For the best editing experience, include the schema reference at the top of your `docs.json` file. This enables autocomplete, validation, and helpful tooltips in most code editors. ```json theme={null} { "$schema": "https://mintlify.com/docs.json", "theme": "mint", "name": "Your Docs", "colors": { "primary": "#ff0000" }, "navigation": { // Your navigation structure } // The rest of your configuration } ``` ## Customization ### Theme The layout theme of your site. Choose from: `mint`, `maple`, `palm`, `willow`, `linden`, `almond`, `aspen`, `sequoia`, `luma`. See the [Themes documentation](/customize/themes) for more information. ### Name The name of your project, organization, or product. ### Colors The colors used in your documentation. Colors are applied differently across themes. ```json Primary color only theme={null} "colors": { "primary": "#3B82F6" } ``` ```json Multiple colors theme={null} "colors": { "primary": "#3B82F6", "light": "#F8FAFC", "dark": "#0F172A" } ``` All color values must be hex codes beginning with `#`. ### Logo Set your logo for both light and dark mode. ```json theme={null} "logo": { "light": "/logo.png", "dark": "/logo-dark.png", "href": "https://mintlify.com" } ``` ### Favicon Path to your favicon file, including the file extension. Automatically resized to appropriate favicon sizes. ```json Single favicon theme={null} "favicon": "/favicon.png" ``` ```json Light and dark favicons theme={null} "favicon": { "light": "/favicon.png", "dark": "/favicon-dark.png" } ``` ### Fonts Set custom fonts for your documentation. The default font varies by theme. ```json theme={null} "fonts": { "family": "Open Sans", "weight": 400, "heading": { "family": "Playfair Display", "weight": 700 }, "body": { "family": "Open Sans", "weight": 400 } } ``` Supports [Google Fonts](https://fonts.google.com) family names. Google Fonts are loaded automatically when you specify a family name. ### Background Background color and decoration settings. ```json theme={null} "background": { "decoration": "gradient", "color": { "light": "#ffffff", "dark": "#000000" }, "image": { "light": "/background.png", "dark": "/background-dark.png" } } ``` ### Variables Global variables for use throughout your documentation. Variables are replaced at build time using `{{variableName}}` syntax. ```json theme={null} "variables": { "version": "2.0.0", "api-url": "https://api.example.com" } ``` All variables referenced in your content must be defined, or the build will fail. ## Navigation The navigation structure of your content. See [Navigation](/organize/navigation) for detailed information. ```json theme={null} "navigation": { "groups": [ { "group": "Getting started", "pages": [ "index", "quickstart" ] } ] } ``` ## Integrations Third-party integrations for analytics, chat, and more. ### Analytics integrations ```json Google Analytics 4 theme={null} "integrations": { "ga4": { "measurementId": "G-XXXXXXXXXX" } } ``` ```json Mixpanel theme={null} "integrations": { "mixpanel": { "projectToken": "your-project-token" } } ``` ```json PostHog theme={null} "integrations": { "posthog": { "apiKey": "phc_your-api-key", "apiHost": "https://app.posthog.com" } } ``` ### Chat integrations ```json Intercom theme={null} "integrations": { "intercom": { "appId": "your-app-id" } } ``` ```json Front Chat theme={null} "integrations": { "frontchat": { "snippetId": "your-snippet-id" } } ``` ### Telemetry ```json theme={null} "integrations": { "telemetry": { "enabled": true } } ``` When set to `false`, feedback features are also disabled and do not appear on your documentation pages. ## SEO and search ### SEO configuration ```json theme={null} "seo": { "indexing": "navigable", "metatags": { "og:image": "https://example.com/image.png" } } ``` Choose `navigable` to index only pages in your navigation or `all` to index every page. Defaults to `navigable`. ### Search settings ```json theme={null} "search": { "prompt": "Search documentation..." } ``` ## API configurations API documentation and interactive playground settings. ```json theme={null} "api": { "openapi": "openapi.json", "playground": { "display": "interactive" }, "examples": { "languages": ["javascript", "python", "curl"] } } ``` See [API Playground](/api-playground/overview) for more information. ## Footer Footer content and social media links. ```json theme={null} "footer": { "socials": { "x": "https://x.com/mintlify", "github": "https://github.com/mintlify", "linkedin": "https://linkedin.com/company/mintlify" }, "links": [ { "header": "Resources", "items": [ { "label": "Blog", "href": "https://mintlify.com/blog" } ] } ] } ``` ## Navbar Navigation bar items to external links. ```json theme={null} "navbar": { "links": [ { "type": "github", "href": "https://github.com/example/repo" }, { "label": "Community", "href": "https://example.com/community" } ], "primary": { "type": "button", "label": "Get Started", "href": "https://example.com/start" } } ``` ## Metadata Metadata configuration for documentation pages. ```json theme={null} "metadata": { "timestamp": true } ``` Enable the last modified date on all pages. You can override this setting on individual pages with the `timestamp` frontmatter field. ## Banner Site-wide banner displayed at the top of pages. ```json theme={null} "banner": { "content": "🚀 Banner is live! [Learn more](https://mintlify.com)", "dismissible": true } ``` ## Redirects Redirects for moved, renamed, or deleted pages. ```json theme={null} "redirects": [ { "source": "/old-page", "destination": "/new-page", "permanent": true } ] ``` ## Error handling 404 error page customization. ```json theme={null} "errors": { "404": { "redirect": false, "title": "Page not found", "description": "The page you're looking for doesn't exist." } } ``` # Quickstart Source: https://mintlify-docs.mintlify.app/quickstart Deploy your documentation site and make your first change. After you complete this guide, you'll have a live documentation site ready to customize and update. ## Before you begin Mintlify uses a docs-as-code approach to manage your documentation. Every page on your site has a corresponding file stored in your documentation repository. When you connect your documentation repository to your project, you can work on your documentation locally or in the web editor and sync any changes to your remote repository. Using an AI coding tool? Copy the prompt below to add the Mintlify [skill](/ai/skillmd) and [MCP server](/ai/model-context-protocol) for better results when updating your documentation. Install the Mintlify skill to get context on Mintlify project structure, components, and documentation best practices: npx skills add [https://mintlify.com/docs](https://mintlify.com/docs) Then add the Mintlify MCP server for access to documentation search. Follow the setup instructions at [https://www.mintlify.com/docs/ai/model-context-protocol.md](https://www.mintlify.com/docs/ai/model-context-protocol.md) ## Deploy your documentation site Go to [mintlify.com/start](https://mintlify.com/start) and complete the onboarding process. During onboarding, you'll connect your GitHub account, create or select a repository for your documentation, and install the GitHub App to enable automatic deployments. After onboarding, your documentation site is deployed and accessible at your `.mintlify.app` URL. If you want to get started quickly without connecting your own repository, you can skip the GitHub connection during onboarding. Mintlify creates a private repository in a private organization and automatically configures the GitHub App for you. This lets you use the web editor immediately and migrate to your own repository later. ## View your deployed site Your documentation site is now deployed at `https://.mintlify.app`. Find your exact URL on the **Overview** page of your [dashboard](https://dashboard.mintlify.com/). Overview page of the Mintlify dashboard. Overview page of the Mintlify dashboard. Your site is ready to view immediately. Use this URL for testing and sharing with your team. Before sharing with your users, you may want to add a [custom domain](/customize/custom-domain). ## Make your first change The CLI requires [Node.js](https://nodejs.org/en) v20.17.0 or higher. Use an LTS version for stability. ```bash npm theme={null} npm i -g mint ``` ```bash pnpm theme={null} pnpm add -g mint ``` See [Install the CLI](/installation) for full details and troubleshooting. If you haven't already cloned your repository locally, follow the instructions in [Clone your repository](/installation#clone-your-repository). Open `index.mdx` in your preferred editor and update the description in the frontmatter: ```mdx theme={null} --- title: "Introduction" description: "Your custom description here" --- ``` Run the following command from your documentation directory: ```bash theme={null} mint dev ``` View your preview at `http://localhost:3000`. Commit and push your changes to trigger a deployment: ```bash theme={null} git add . git commit -m "Update description" git push ``` Mintlify automatically deploys your changes. View your deployment status on the [Overview](https://dashboard.mintlify.com/) page of your dashboard. Navigate to the [web editor](https://dashboard.mintlify.com/editor) in your dashboard. Open the **Introduction** page and update the description. Introduction page open in the web editor with the description edited to say Hello world!. Introduction page open in the web editor with the description edited to say Hello world!. Click the **Publish** button in the top-right of the web editor toolbar. On the [Overview](https://dashboard.mintlify.com/) page of your dashboard, you can see your site's deployment status. When it finishes deploying, refresh your documentation site to see your changes live. ## Next steps Edit documentation in your browser and preview how your pages look when published. Find broken links, check accessibility, validate OpenAPI specs, and more. Use your own domain for your documentation site. # What is Mintlify? Source: https://mintlify-docs.mintlify.app/what-is-mintlify Mintlify is a knowledge platform for hosting information designed for people and AI. Mintlify hosts your content as a website. Your content lives in a Git repository as MDX files, and Mintlify builds and deploys your site automatically when you push a change. ## The three parts of a Mintlify project **Your repository** is the source of truth for your documentation. It contains an MDX file for every page and a `docs.json` file that configures your site's navigation, theme, and settings. You can use your own GitHub or GitLab repository, or let Mintlify create one for you during onboarding. **The Mintlify dashboard** connects to your repository and lets you manage your site. Use it to monitor deployments, configure settings, manage your team, and edit content directly in the browser. **Your site** powered by Mintlify. Mintlify builds your site from your repository and deploys it at a `.mintlify.app` URL by default. When you're ready, you can point a custom domain to your site. ```mermaid theme={null} flowchart LR WE["Web editor"] --> Repo[("Git repository")] Local["Local editor"] --> Repo Repo -- "Webhook" --> Build["Mintlify build"] Build --> Site["Live site"] ``` ## Editing content There are two ways to edit your content, and you can switch between them freely. Edit and publish pages in your browser. The editor commits changes back to your Git repository automatically. Clone your repository, run `mint dev` to preview your site locally, then push changes to deploy. Multiple team members can work in either workflow at the same time, using Git branches to manage parallel changes. Anyone who can push to your repository can update your content. ## AI features Built-in AI features help people and AI find and understand your content, and help you maintain your content. The **assistant** lets your users ask questions and get cited answers from your content. The **agent** helps your team create and maintain content by generating updates from scheduled workflows, pull requests merging in your feature repository, or Slack threads. See [AI-native documentation](/ai-native) for an overview of all AI features. ## Next steps Deploy your first documentation site in minutes.