# Endpoint schema snippet

> Reference an endpoint schema from your API Reference

The `<EndpointSchemaSnippet>` component displays endpoint schemas from your API Reference. By default, it renders the complete schema, or you can use the `selector` prop to display specific parts like request body, response, path parameters, or query parameters.

To display any type definition by name (not limited to endpoint schemas), use the [`<Schema>`](/learn/docs/writing-content/components/schema) component.

<Note>
  Markdown-rich field descriptions aren't yet supported and will display as plain text. See the [Request path](#request-path) example below.
</Note>

## Usage

<div>
  <div>
    <EndpointSchemaSnippet endpoint="POST /chat/{domain}" />
  </div>
</div>

```jsx Markdown
<EndpointSchemaSnippet endpoint="POST /chat/{domain}" />

```

## Variants

### Full request

Passing `request` as the selector will only render the request schema.

<div>
  <div>
    <EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request" />
  </div>
</div>

```jsx Markdown
<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request" />
```

### Request path

<div>
  <div>
    <EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request.path" />
  </div>
</div>

```jsx Markdown
<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request.path" />
```

### Request query

<div>
  <div>
    <EndpointSchemaSnippet endpoint="POST /discord/install" selector="request.query" />
  </div>
</div>

```jsx Markdown
<EndpointSchemaSnippet endpoint="POST /discord/install" selector="request.query" />
```

### Request body

<div>
  <div>
    <EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request.body" />
  </div>
</div>

```jsx Markdown
<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request.body" />
```

### Full response

Passing `response` as the selector will only render the response schema.

<div>
  <div>
    <EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="response" />
  </div>
</div>

```jsx Markdown
<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="response" />
```

### Response body

<div>
  <div>
    <EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="response.body" />
  </div>
</div>

```jsx Markdown
<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="response.body" />
```