Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ service:
</CodeBlock>
</CodeBlocks>
## Linking to API endpoints
## API link syntax
<Markdown src="/snippets/api-link-syntax.mdx" />
Expand Down
12 changes: 11 additions & 1 deletion fern/products/docs/pages/changelog/2026-04-14.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
---
tags: ["ai-features"]
tags: ["ai-features", "api-reference", "mdx"]
---

## AI search model update

Ask Fern now uses [Claude 4.6 Sonnet](https://www.anthropic.com/news/claude-sonnet-4-6) and [Claude 4.5 Haiku](https://www.anthropic.com/news/claude-haiku-4-5).

<Button intent="none" outlined rightIcon="arrow-right" href="/learn/docs/ai-features/ask-fern/overview">Read the docs</Button>

## Link to API Reference sections with `api:` syntax

The `api:` link syntax supports linking to the root of an API Reference section in addition to individual endpoints. Use `api:apiName` to create a link that resolves to the landing page of a specific API Reference at build time.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Microsoft.Wordiness] Consider using 'also' instead of 'in addition'.


```mdx Markdown
Explore the [Plant Store API](api:plant-store) reference.
```

<Button intent="none" outlined rightIcon="arrow-right" href="/learn/docs/writing-content/markdown-basics#api-link-syntax">Read the docs</Button>
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Read the [Introduction](/learn/sdks/overview/introduction).
```
</CodeBlock>

### Link to an API endpoint
### API link syntax

<Markdown src="/snippets/api-link-syntax.mdx" />

Expand Down
18 changes: 15 additions & 3 deletions fern/snippets/api-link-syntax.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Use the `api:` link syntax to link to an API endpoint in any Markdown content rendered by Fern. Fern resolves the link to the correct URL at build time, so you don't have to hardcode slugs.
Use the `api:` link syntax to link to an API endpoint or API Reference section in any Markdown content rendered by Fern. Fern resolves the link to the correct URL at build time, so you don't have to hardcode slugs.

The format is `api:METHOD/path`, where `METHOD` is an HTTP method (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) and `/path` is the endpoint path from your API definition. If your project has [multiple APIs](/learn/docs/api-references/generate-api-ref#include-more-than-one-api-reference), prefix the link with the API name: `api:API-NAME:METHOD/path`.
To link to a specific endpoint, use `api:METHOD/path`, where `METHOD` is an HTTP method (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) and `/path` is the endpoint path from your API definition. If your project has [multiple APIs](/learn/docs/api-references/generate-api-ref#include-more-than-one-api-reference), prefix the link with the API name: `api:API-NAME:METHOD/path`.

For example:

Expand All @@ -14,4 +14,16 @@ View the [Current user information](api:mcp-tools:GET/api/fern-docs/whoami) endp
</div>
</div>

Path parameters are also supported. Include them in the endpoint path with curly braces, such as `api:GET/v2/payments/{paymentId}`.
Path parameters are also supported. Include them in the endpoint path with curly braces, such as `api:GET/v2/payments/{paymentId}`.

To link to the root of an API Reference section, use `api:apiName`, where `apiName` matches the API name in your `generators.yml` file. This is useful when your project has multiple APIs and you want to link to the landing page of a specific API Reference.

```mdx Markdown
Explore the [Plant Store API](api:plant-store) reference.
```

<div className="highlight-frame">
<div className="highlight-frame-content">
Explore the [Plant Store API](api:plant-store) reference.
</div>
</div>
Loading