Skip to content
Mintlify
Mintlify
Components

Response fields

Document API response fields using the ResponseField component with type annotations, descriptions, and required or optional indicators.

Use the <ResponseField> component to define the return values of an API. Many docs also use <ResponseField> on pages when you need to list the types of something.

responsestringrequired

A response field example

<ResponseField name="response" type="string" required>
  A response field example
</ResponseField>

Props

namestringrequired

The name of the response value.

typestringrequired

Expected type of the response value. This can be any arbitrary string.

defaultstring

The default value.

requiredboolean

Show “required” beside the field name.

deprecatedboolean

Whether you have deprecated a field or not.

prestring[]

Labels that appear before the name of the field.

poststring[]

Labels that appear after the name of the field.

Response Field Example
<ResponseField name="response" type="string" required>
  A response field example
</ResponseField>
Was this page helpful?Suggest editsRaise issue
Response Field Example
<ResponseField name="response" type="string" required>
  A response field example
</ResponseField>