---
title: "Endpoint schema snippet"
subtitle: "<EndpointSchemaSnippet> embeds an endpoint's request or response schema 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 field table for one part of an endpoint:

```mdx
<EndpointSchemaSnippet endpoint="PUT /sites/{site}/access" selector="request.body" />
```

<EndpointSchemaSnippet endpoint="PUT /sites/{site}/access" selector="request.body" />

<ParamField path="endpoint" type="string" required>Same as above.</ParamField>
<ParamField path="selector" type="string">The part to show: `request`, `request.path`, `request.query`, `request.header`, `request.cookie`, `request.body`, `response`, `response.body`, `response.errors` (or `errors`). Defaults to `request`.</ParamField>

In the page's `.md` version it's a field table, with nested fields written as `a.b` and `list[].c`.
