Learn how to set up API endpoints documentation using MDX and the API playground feature.

1

Configure your API

Add API configuration to your mint.json:

{
  "api": {
    "baseUrl": "https://mintlify.com/api",
    "auth": {
      "method": "bearer"
    }
  }
}

To hide the API playground, use:

{
  "api": {
    "playground": {
      "mode": "hide"
    }
  }
}
2

Create endpoint pages

Create MDX files for each endpoint with the following metadata:

---
title: 'Create new user'
api: 'POST https://api.mintlify.com/user'
---

For paths with parameters, use {parameterName}:

/v1/endpoint/{userId}
3

Add to navigation

Add your endpoint pages to the navigation field in mint.json to display them in your sidebar.

Was this page helpful?