Fields
Document API parameters and response fields
Field components help you document API request parameters and response structures in a clear, consistent format.
ParamField
Use ParamField to document API request parameters. Specify the parameter location using one of body, query, path, or header.
user_idstringrequiredThe unique identifier for the user.
limitnumberdefault: 10Maximum number of results to return.
AuthorizationstringrequiredBearer token for authentication.
<ParamField body="user_id" type="string" required>
The unique identifier for the user.
</ParamField>
<ParamField query="limit" type="number" default={10}>
Maximum number of results to return.
</ParamField>
<ParamField header="Authorization" type="string" required>
Bearer token for authentication.
</ParamField>
Path Parameters
idstringrequiredResource identifier in the URL path.
<ParamField path="id" type="string" required>
Resource identifier in the URL path.
</ParamField>
ParamField Properties
stringParameter name for body parameters.
stringParameter name for query string parameters.
stringParameter name for URL path parameters.
stringParameter name for header parameters.
stringData type (string, number, boolean, array, object).
booleanShows a "required" badge.
string | number | booleanDefault value when not provided.
ResponseField
Use ResponseField to document API response properties.
idstringrequiredUnique identifier for the resource.
created_atstringISO 8601 timestamp of when the resource was created.
statusstringdefault: pendingCurrent status of the request.
<ResponseField name="id" type="string" required>
Unique identifier for the resource.
</ResponseField>
<ResponseField name="created_at" type="string">
ISO 8601 timestamp of when the resource was created.
</ResponseField>
<ResponseField name="status" type="string" default="pending">
Current status of the request.
</ResponseField>
Deprecated Fields
Mark fields as deprecated to indicate they'll be removed in a future version:
legacy_idnumberdeprecatedUse id instead. This field will be removed in v2.
<ResponseField name="legacy_id" type="number" deprecated>
Use `id` instead. This field will be removed in v2.
</ResponseField>
Labels
Add context with pre and post labels:
webhook_urlv2.1+stringURL to receive webhook notifications.
<ResponseField name="webhook_url" type="string" pre={["optional"]} post={["v2.1+"]}>
URL to receive webhook notifications.
</ResponseField>
Nested Objects
Combine with Expandable to document nested object properties:
userobjectThe user who created the resource.
<ResponseField name="user" type="object">
The user who created the resource.
<Expandable title="user properties">
<ResponseField name="id" type="string" required>
User's unique identifier.
</ResponseField>
<ResponseField name="email" type="string" required>
User's email address.
</ResponseField>
<ResponseField name="name" type="string">
User's display name.
</ResponseField>
</Expandable>
</ResponseField>
ResponseField Properties
stringrequiredField name.
stringData type.
booleanShows a "required" badge.
booleanShows field as deprecated with strikethrough.
string | number | booleanDefault value.
string[]Labels displayed before the field name.
string[]Labels displayed after the field name.
