---
title: API fields
description: Document parameters, responses and nested objects.
url: https://hexelstudio.com/docs/authoring/api-fields
---

These components describe an API endpoint. The examples below use a made-up `widgets` endpoint to show the components; they do not describe a real Hexel Studio API.

## Parameters

Name a parameter with `path`, `query`, `body` or `header`. The name of the prop becomes the location badge.

<ParamField path="widget_id" type="string" required>
  The widget to update.
</ParamField>

<ParamField query="dry_run" type="boolean" default="false">
  Validate the request without saving it.
</ParamField>

<ParamField header="X-Organization-Id" type="string" required>
  The organization that owns the widget.
</ParamField>

<ParamField body="labels" type="string[]" deprecated>
  Use `tags` instead.
</ParamField>

```mdx
<ParamField path="widget_id" type="string" required>
  The widget to update.
</ParamField>

<ParamField query="dry_run" type="boolean" default="false">
  Validate the request without saving it.
</ParamField>
```

## Responses

<ResponseField name="id" type="string" required>
  Unique identifier of the widget.
</ResponseField>

<ResponseField name="owner" type="object">
  Who created the widget.

  <Expandable title="owner properties">
    <ResponseField name="id" type="string">
      Identifier of the account.
    </ResponseField>
    <ResponseField name="kind" type="string">
      `user` or `service`.
    </ResponseField>
  </Expandable>
</ResponseField>

```mdx
<ResponseField name="owner" type="object">
  Who created the widget.

  <Expandable title="owner properties">
    <ResponseField name="id" type="string">Identifier of the account.</ResponseField>
  </Expandable>
</ResponseField>
```

## Request and response examples

`<RequestExample>` and `<ResponseExample>` take code blocks, like `<CodeGroup>`. Mintlify pins them beside the page; here they render where you place them.

<RequestExample>
```bash cURL
curl --request PATCH \
  --url 'https://api.example.com/v1/widgets/wid_123' \
  --header 'X-Organization-Id: org_123' \
  --data '{"tags": ["beta"]}'
```
</RequestExample>

<ResponseExample>
```json 200
{
  "id": "wid_123",
  "owner": { "id": "usr_456", "kind": "user" }
}
```
</ResponseExample>
