Skip to main content
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.
string
required
An example of a parameter field

Properties

string
Whether the parameter is a query, path, body, or header. Followed by the parameter name.
string
Expected type of the parameter’s value.Supports number, string, boolean, object.Define arrays using the [] suffix. For example string[].
boolean
Indicate whether you require the parameter.
boolean
Indicate whether you have deprecated the parameter.
any
Default value populated when the request value is empty
string
Placeholder text for the input in the playground.
string
Description of the parameter (Markdown-enabled).

Response field

The <ResponseField> component defines the return values of an API.
string
required
An example of a response field

Properties

string
required
The name of the response value.
string
required
Expected type of the response value. This can be any arbitrary string.
string
The default value.
boolean
Indicate whether you require the response.
boolean
Whether you have deprecated a field.
string[]
Labels that appear before the name of the field.
string[]
Labels that appear after the name of the field.