<ParamField path="param" type="string">
  An example of a parameter field
</ParamField>
There are two types of fields: Parameter Fields and Response Fields.

Parameter Field

A ParamField component is used to define the parameters for your APIs or SDKs. Adding a ParamField will automatically add an API Playground.
param
string
required
An example of a parameter field
<ParamField path="param" type="string">
  An example of a parameter field
</ParamField>

Props

query, path, body, or header
string
Whether it is a query, path, body, or header parameter followed by the name
type
string
Expected type of the parameter’s valueSupports number, string, bool, object.Arrays can be defined using the [] suffix. For example string[].
required
boolean
Indicate whether the parameter is required
deprecated
boolean
Indicate whether the parameter is deprecated
default
string
Default value used by the server if the request does not provide a value
initialValue
any
Value that will be used to initialize the playground
placeholder
string
Placeholder text for the input in the playground
children
string
Description of the parameter (markdown enabled)

Response Field

The <ResponseField> component is designed to define the return values of an API. Many docs also use <ResponseField> on pages when you need to list the types of something.
response
string
required
A response field example
<ResponseField name="response" type="string" required>
  A response field example
</ResponseField>

Props

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
Show “required” beside the field name.
deprecated
boolean
Whether a field is deprecated or not.
pre
string[]
Labels that are shown before the name of the field
post
string[]
Labels that are shown after the name of the field