Mintlify helps you create beautiful API documentation using MDX (Markdown + JSX). This guide will show you how to set up your API endpoints step by step.

Basic Setup

Let’s start with the simplest configuration possible:

1

Create an API endpoint page

Create a new MDX file for your API endpoint. At the top, add these basic details:

---
title: 'List All Users'
api: 'GET /users'
---

That’s all you need to get started! This will create a basic API documentation page.

2

Add it to your navigation

Add your new page to the navigation section in your docs.json file:

{
  "navigation": [
    {
      "group": "API Reference",
      "pages": ["api-reference/list-users"]
    }
  ]
}

Advanced Configuration

Once you’re comfortable with the basics, you can add more features to your API documentation.

Setting Up Your API Configuration

In your docs.json file, you can define global settings for all your API endpoints:

{
  "api": {
    "mdx": {
      "server": "https://api.example.com"
    }
  }
}

Adding Authentication

Authentication settings let your users test API endpoints with their own API keys.

Add authentication settings to your docs.json:

{
  "api": {
    "mdx": {
      "server": "https://api.example.com",
      "auth": {
        "method": "key",
        "name": "x-api-key"
      }
    }
  }
}

Path Parameters

You can include path parameters in your API endpoints using curly braces:

---
title: 'Get User Details'
api: 'GET /users/{userId}'
---

When you have server configured in docs.json, you can use shorter paths like /users instead of full URLs.

Customizing the API Playground

The API playground lets users test your endpoints directly in the documentation. You can control its display:

{
  "api": {
    "playground": {
      "display": "none"
    }
  }
}

Next Steps