diff --git a/fern/products/docs/pages/api-references/api-ref-content.mdx b/fern/products/docs/pages/api-references/api-ref-content.mdx index bd15c5264..1292a3d6f 100644 --- a/fern/products/docs/pages/api-references/api-ref-content.mdx +++ b/fern/products/docs/pages/api-references/api-ref-content.mdx @@ -53,7 +53,7 @@ service: -## Linking to API endpoints +## API link syntax diff --git a/fern/products/docs/pages/changelog/2026-04-14.mdx b/fern/products/docs/pages/changelog/2026-04-14.mdx index a582d63a4..fa17fa381 100644 --- a/fern/products/docs/pages/changelog/2026-04-14.mdx +++ b/fern/products/docs/pages/changelog/2026-04-14.mdx @@ -1,5 +1,5 @@ --- -tags: ["ai-features"] +tags: ["ai-features", "api-reference", "mdx"] --- ## AI search model update @@ -7,3 +7,13 @@ tags: ["ai-features"] 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). + +## 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. + +```mdx Markdown +Explore the [Plant Store API](api:plant-store) reference. +``` + + diff --git a/fern/products/docs/pages/component-library/writing-content/markdown-basics.mdx b/fern/products/docs/pages/component-library/writing-content/markdown-basics.mdx index 9034c9886..c7c42e998 100644 --- a/fern/products/docs/pages/component-library/writing-content/markdown-basics.mdx +++ b/fern/products/docs/pages/component-library/writing-content/markdown-basics.mdx @@ -63,7 +63,7 @@ Read the [Introduction](/learn/sdks/overview/introduction). ``` -### Link to an API endpoint +### API link syntax diff --git a/fern/snippets/api-link-syntax.mdx b/fern/snippets/api-link-syntax.mdx index 8311e994b..1e818c71e 100644 --- a/fern/snippets/api-link-syntax.mdx +++ b/fern/snippets/api-link-syntax.mdx @@ -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`. + + -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. ``` + + + +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. -
-
- View the [Current user information](api:mcp-tools:GET/api/fern-docs/whoami) endpoint. -
-
-Path parameters are also supported. Include them in the endpoint path with curly braces, such as `api:GET/v2/payments/{paymentId}`. \ No newline at end of file +```mdx Markdown +Explore the [Plant Store API](api:plant-store) reference. +``` +
+
\ No newline at end of file