> ## Documentation Index
> Fetch the complete documentation index at: https://docs.docketqa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Modules

Retrieve modules in your account, with optional filtering and step inclusion.

## Query parameters

<ParamField query="ids" type="string">
  Comma-separated list of module IDs to fetch. Omit to retrieve all modules.
</ParamField>

<ParamField query="with_steps" type="boolean">
  Whether to include the full step details (flattened, with nested modules expanded) for each module. Defaults to `false`.
</ParamField>

<ParamField query="config_key" type="string">
  When `with_steps=true`, scopes each step's internal cache to a specific execution config. Typically you don't construct this yourself — the runtime resolves it for you when a run is triggered.
</ParamField>

<ParamField query="test_blueprint_category_id" type="string">
  Filter by test suite ID. Pass `"none"` to get modules with no suite.
</ParamField>

<ParamField query="folder_path" type="string">
  Filter by folder path. Defaults to `"/"` (root folder).
</ParamField>

<ParamField query="include_all_folders" type="boolean">
  If `true`, return modules from all folders. Defaults to `false`.
</ParamField>

<ParamField query="search" type="string">
  Search modules by title (case-insensitive partial match).
</ParamField>

<ParamField query="page" type="integer">
  Page number for pagination (1-indexed). Use with `per_page`.
</ParamField>

<ParamField query="per_page" type="integer">
  Number of results per page. Enables pagination when set.
</ParamField>

<ParamField query="offset" type="integer">
  Offset for pagination. Use with `limit` as an alternative to `page`/`per_page`.
</ParamField>

<ParamField query="limit" type="integer">
  Maximum number of results. Use with `offset`.
</ParamField>

### Example requests

Fetch all modules without steps:

```bash theme={null}
GET /modules/list
```

Fetch specific modules with steps:

```bash theme={null}
GET /modules/list?ids=962,964&with_steps=true
```

## Response

<ResponseField name="modules" type="object[]">
  An array of module objects.

  <Expandable title="Module properties">
    <ResponseField name="id" type="integer">
      The unique ID of the module.
    </ResponseField>

    <ResponseField name="title" type="string">
      The module name.
    </ResponseField>

    <ResponseField name="type" type="string">
      Always `"step_module"` for modules.
    </ResponseField>

    <ResponseField name="status" type="string">
      The module status (e.g. `"active"`).
    </ResponseField>

    <ResponseField name="step_count" type="integer">
      Number of steps in the module.
    </ResponseField>

    <ResponseField name="company_id" type="integer">
      Your company ID.
    </ResponseField>

    <ResponseField name="test_blueprint_category_id" type="integer">
      The test suite ID, if set.
    </ResponseField>

    <ResponseField name="test_blueprint_category_name" type="string">
      The name of the test suite, if set.
    </ResponseField>

    <ResponseField name="folder_path" type="string">
      The folder path of the module.
    </ResponseField>

    <ResponseField name="test_steps" type="object[]">
      The steps in the module. Only included when `with_steps=true`. When included, nested `step_module` steps are flattened into their individual steps.

      <Expandable title="Step properties">
        <ResponseField name="id" type="integer">
          The unique step ID.
        </ResponseField>

        <ResponseField name="step_number" type="integer">
          Position of this step in the sequence.
        </ResponseField>

        <ResponseField name="type" type="string">
          The step type (see [step types](/api-reference/introduction#step-types) for all values).
        </ResponseField>

        <ResponseField name="action" type="string">
          The step instruction.
        </ResponseField>

        <ResponseField name="use_vision" type="boolean">
          Whether vision is enabled for this step.
        </ResponseField>

        <ResponseField name="test_blueprint_module_id" type="integer">
          The referenced module ID (for `step_module` steps).
        </ResponseField>

        <ResponseField name="api_request" type="object">
          The API request configuration (for `api` steps).
        </ResponseField>

        <ResponseField name="trigger_run_config" type="object">
          The trigger run configuration (for `trigger_run` steps).
        </ResponseField>

        <ResponseField name="disable_self_healing" type="boolean">
          Whether self-healing is disabled.
        </ResponseField>

        <ResponseField name="click_count" type="integer">
          Number of clicks for this step.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="usage_count" type="integer">
      Number of tests using this module.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of when the module was created.
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp of the last update.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata. Only included when using `page`/`per_page` or `offset`/`limit` parameters.

  <Expandable title="Pagination properties">
    <ResponseField name="page" type="integer">
      The current page number.
    </ResponseField>

    <ResponseField name="per_page" type="integer">
      Results per page.
    </ResponseField>

    <ResponseField name="total" type="integer">
      Total number of matching results.
    </ResponseField>

    <ResponseField name="total_pages" type="integer">
      Total number of pages.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="subfolders" type="string[]">
  List of subfolder paths within the current folder. Not included when using `search`.
</ResponseField>

### Example response

```json theme={null}
{
  "modules": [
    {
      "id": 962,
      "title": "Login Setup",
      "type": "step_module",
      "status": "active",
      "step_count": 1,
      "company_id": 23,
      "test_blueprint_category_id": null,
      "folder_path": "/",
      "usage_count": 0,
      "test_steps": [
        {
          "id": 23101,
          "step_number": 1,
          "type": "act",
          "action": "Navigate to the login page",
          "use_vision": false,
          "test_blueprint_module_id": null,
          "api_request": null,
          "trigger_run_config": null,
          "disable_self_healing": false,
          "click_count": 1
        }
      ],
      "created_at": "2025-12-13T18:53:37.588258+00:00",
      "updated_at": "2025-12-13T18:53:37.588265+00:00"
    },
    {
      "id": 964,
      "title": "Auth Token Module",
      "type": "step_module",
      "status": "active",
      "step_count": 3,
      "company_id": 23,
      "test_blueprint_category_id": null,
      "folder_path": "/",
      "usage_count": 0,
      "test_steps": [
        {
          "id": 23103,
          "step_number": 1,
          "type": "act",
          "action": "First AI step instructions",
          "use_vision": false,
          "test_blueprint_module_id": null,
          "api_request": null,
          "disable_self_healing": false,
          "click_count": 1
        },
        {
          "id": 23104,
          "step_number": 2,
          "type": "api",
          "action": "",
          "use_vision": false,
          "test_blueprint_module_id": null,
          "api_request": {
            "url": "https://api.example.com/auth",
            "method": "POST",
            "timeout": 60,
            "retries": 1
          },
          "disable_self_healing": false,
          "click_count": 1
        },
        {
          "id": 23105,
          "step_number": 3,
          "type": "assert",
          "action": "Verify auth succeeded",
          "use_vision": false,
          "test_blueprint_module_id": null,
          "api_request": null,
          "disable_self_healing": false,
          "click_count": 1
        }
      ],
      "created_at": "2025-12-13T18:58:45.895773+00:00",
      "updated_at": "2025-12-13T18:58:45.895781+00:00"
    }
  ],
  "subfolders": ["/Auth Modules"]
}
```
