Jamdesk Documentation logo

Fields

Document API parameters and response fields with ParamField and ResponseField components. Supports types, defaults, and nested objects.

Fields help you document API parameters and response fields in a clear, consistent format.

Usage

<ParamField query="limit" type="number" default={10}>
  Maximum number of results to return.
</ParamField>

ParamField

Use ParamField to document API request parameters. Specify the parameter location using one of body, query, path, or header.

user_idstringrequired

The unique identifier for the user.

limitnumberdefault: 10

Maximum number of results to return.

Authorizationstringrequired

Bearer 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

idstringrequired

Resource identifier in the URL path.

<ParamField path="id" type="string" required>
  Resource identifier in the URL path.
</ParamField>

ParamField Props

string

Parameter name for body parameters.

string

Parameter name for query string parameters.

string

Parameter name for URL path parameters.

string

Parameter name for header parameters.

string

Data type (string, number, boolean, array, object).

boolean

Shows a "required" badge.

string | number | boolean

Default value when not provided.

ResponseField

Use ResponseField to document API response properties.

idstringrequired

Unique identifier for the resource.

created_atstring

ISO 8601 timestamp of when the resource was created.

statusstringdefault: pending

Current 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_idnumberdeprecated

Use 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:

optionalwebhook_urlv2.1+string

URL 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:

userobject

The 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 Props

stringrequired

Field name.

string

Data type.

boolean

Shows a "required" badge.

boolean

Shows field as deprecated with strikethrough.

string | number | boolean

Default value.

string[]

Labels displayed before the field name.

string[]

Labels displayed after the field name.

What's Next?

Components Overview

Browse all available components

MDX Basics

Learn how to use components in MDX