---
title: "Endpoint request snippet"
subtitle: "<EndpointRequestSnippet> embeds an endpoint's request example from the API reference."
---

This component pulls data from the API reference, so it updates automatically with the OpenAPI spec. The examples below reference this site's [platform API](/api-reference).

A request example card for an endpoint, with multi-language code and a "Try it" button (alias `<RequestSnippet>`):

```mdx
<EndpointRequestSnippet endpoint="POST /orgs/{org}/api-keys" languages={["curl", "python", "javascript"]} />
```

<EndpointRequestSnippet endpoint="POST /orgs/{org}/api-keys" languages={["curl", "python", "javascript"]} />

<ParamField path="endpoint" type="string" required>`METHOD /path`, e.g. `"POST /orgs/{org}/api-keys"`; with multiple APIs, write `api-name::METHOD /path`.</ParamField>
<ParamField path="example" type="string">Pick a named example from the spec (by name or `summary`).</ParamField>
<ParamField path="languages" type="string[]">Languages to show, in order; may include `"payload"` (request body only). Aliases such as `typescript`, `ts`, and `shell` work too.</ParamField>
<ParamField path="highlight" type="string | array">Lines to highlight, e.g. `"1-3"`.</ParamField>
<ParamField path="hideTryItButton" type="boolean">Hide the "Try it" button.</ParamField>

In the page's `.md` version it's the request example as code blocks: one per language when `languages` is set, otherwise only the site's first language.
