Usage
Drop <ApiMethod> next to a URL to give the method a color-coded label. Readers can scan a list of endpoints and immediately spot which is GET, POST, PUT, etc.
<ApiMethod method="POST" /> `/v1/projects`POST /v1/projects
All methods
The standard HTTP method colors follow the Mintlify / Stripe / Postman convention so readers don't need to learn a new palette.
<ApiMethod method="GET" /> `/v1/projects`
<ApiMethod method="POST" /> `/v1/projects`
<ApiMethod method="PUT" /> `/v1/projects/{id}`
<ApiMethod method="PATCH" /> `/v1/projects/{id}`
<ApiMethod method="DELETE" /> `/v1/projects/{id}`
<ApiMethod method="OPTIONS" /> `/v1/projects`
<ApiMethod method="HEAD" /> `/v1/projects/{id}`GET /v1/projects
POST /v1/projects
PUT /v1/projects/{id}
PATCH /v1/projects/{id}
DELETE /v1/projects/{id}
OPTIONS /v1/projects
HEAD /v1/projects/{id}
Color reference
| Method | Color | Theme token |
GET | green | --docs-success |
POST | blue | --docs-info |
PUT | yellow | --docs-warning |
PATCH | primary (purple-ish) | --docs-primary |
DELETE | red | --docs-danger |
OPTIONS | gray | --docs-fg-muted |
HEAD | gray | --docs-fg-muted |
The colors are not hardcoded — they're driven by your theme tokens. If you change --docs-success to teal in your custom theme, GET badges turn teal.
Endpoint headings
Pair with a code-formatted URL inside an h2 to get a clean endpoint header:
## <ApiMethod method="POST" /> `/v1/projects`Case insensitive
Lowercase works too — common when authors copy from JavaScript fetch calls:
<ApiMethod method="get" />
<ApiMethod method="post" />Auto-generation
In Phase 4, the OpenAPI parser automatically renders an <ApiMethod> next to each endpoint title in the auto-generated reference pages. You don't need to add it manually for endpoints that come from a spec — only for endpoints documented by hand.
Props
| Prop | Type | Required | Description |
method | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD" (case insensitive) | Yes | The HTTP method to display |