# Fields

> Use ParamField and ResponseField components to document API request and response parameters with types, defaults, and validation rules.

Use fields to document API parameters and responses. There are two types of fields: parameter fields and response fields.

## Parameter field

Use the `<ParamField>` component to define parameters for your APIs or SDKs. Adding a `ParamField` automatically adds an [API Playground](/guides/document-apis-overview).

- `param` (string, required) — An example of a parameter field

```mdx theme={null}
<ParamField path="param" type="string" required>
  An example of a parameter field
</ParamField>
```

### Properties

- `query, path, body, or header` (string) — Whether the parameter is a query, path, body, or header. Followed by the parameter name.

- `type` (string) — Expected type of the parameter's value.

Supports `number`, `string`, `boolean`, `object`.

Define arrays using the `[]` suffix. For example `string[]`.

- `required` (boolean) — Indicate whether you require the parameter.

- `deprecated` (boolean) — Indicate whether you have deprecated the parameter.

- `default` (any) — Default value populated when the request value is empty.

- `placeholder` (string) — Placeholder text for the input in the playground.

- `children` (string) — Description of the parameter (Markdown-enabled).

- `className` (string) — Additional CSS classes to apply to the field.

## Response field

The `<ResponseField>` component defines the return values of an API.

- `response` (string, required) — An example of a response field

```mdx theme={null}
<ResponseField name="response" type="string" required>
  A response field example
</ResponseField>
```

### Properties

- `name` (string, required) — The name of the response value.

- `type` (string, required) — Expected type of the response value. This can be any arbitrary string.

- `default` (string) — The default value.

- `required` (boolean) — Indicate whether you require the response.

- `deprecated` (boolean) — Whether you have deprecated a field.

- `pre` (string\[]) — Labels that appear before the name of the field.

- `post` (string\[]) — Labels that appear after the name of the field.

- `className` (string) — Additional CSS classes to apply to the field.

## Related topics

- [Response fields](/guides/create-content-components-responses)
- [skill.md](/guides/agent-ready-content-ai-skillmd)
- [Troubleshooting](/guides/document-apis-troubleshooting)

## Related pages

- [Accordions](./create-content-components-accordions.md)
- [Badge](./create-content-components-badge.md)
- [Banner](./create-content-components-banner.md)
- [Callouts](./create-content-components-callouts.md)
- [Cards](./create-content-components-cards.md)
- [Code groups](./create-content-components-code-groups.md)
- [Color](./create-content-components-color.md)
- [Columns](./create-content-components-columns.md)
- [Examples](./create-content-components-examples.md)
- [Expandables](./create-content-components-expandables.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
