Skip to content
Merged
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 now supports linking to the root of an API Reference section. Use `api:apiName` to create a link that resolves to the landing page of a specific API Reference at build time. This is useful when your project has multiple APIs.
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 🐶
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated


```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
24 changes: 15 additions & 9 deletions fern/snippets/api-link-syntax.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
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 `api:` link syntax to link to API endpoints or API Reference sections in any Markdown content. Fern resolves these links at build time, so you don't need 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`.
<AccordionGroup>
<Accordion title="Link to an endpoint">

For example:
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. Path parameters use curly braces, such as `api:GET/v2/payments/{paymentId}`.

For projects with [multiple APIs](/learn/docs/api-references/generate-api-ref#include-more-than-one-api-reference), prefix with the API name: `api:API-NAME:METHOD/path`.

```mdx Markdown
View the [Current user information](api:mcp-tools:GET/api/fern-docs/whoami) endpoint.
```
</Accordion>
<Accordion title="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 root landing page of a specific API Reference.

<div className="highlight-frame">
<div className="highlight-frame-content">
View the [Current user information](api:mcp-tools:GET/api/fern-docs/whoami) endpoint.
</div>
</div>

Path parameters are also supported. Include them in the endpoint path with curly braces, such as `api:GET/v2/payments/{paymentId}`.
```mdx Markdown
Explore the [Plant Store API](api:plant-store) reference.
```
</Accordion>
</AccordionGroup>
Loading