MDX Setup
Learn how to create API documentation using MDX
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:
Create an API endpoint page
Create a new MDX file for your API endpoint. At the top, add these basic details:
That’s all you need to get started! This will create a basic API documentation page.
Add it to your navigation
Add your new page to the navigation
section in your docs.json
file:
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:
Adding Authentication
Authentication settings let your users test API endpoints with their own API keys.
Add authentication settings to your docs.json
:
Path Parameters
You can include path parameters in your API endpoints using curly braces:
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:
Next Steps
- Learn more about authentication options
- Explore advanced API configurations
- See how to structure your documentation