---
title: "List all modules"
method: GET
path: "/modules"
tags: ["Modules"]
---

# List all modules

`GET /modules`

## Request

- Base URL: `https://enterprise.knak.io/api/published/v1`
- URL: `https://enterprise.knak.io/api/published/v1/modules`
- Auth: none declared
- TypeScript: <https://skmtc.dev/knak/apis/knak-enterprise-api/docs/modules/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve all [modules](#tag/module_model) in your organization that have at least one published version. Modules without a published version are not returned. Each module lists its variations: optional elements that can be shown or hidden.

## Query parameters

- `filter[name]` string
- `filter[type]` 'email' | 'landing'
- `filter[brand_id]` string
- `sort` string
- `page` integer
- `per_page` integer

## Response `200`

OK

- ModuleList
  - `data` Module[]
    - `type` string
    - `id` string
    - `attributes` object
      - `id` string
      - `name` string
      - `type` 'email' | 'landing'
      - `status` 'draft' | 'final'
      - `category` object, nullable
        - `id` string
        - `name` string
      - `brand_ids` string[]
      - `variations` object[]: Optional elements of the module's latest published version that can be shown or hidden, listed in the order they appear in the module. Empty when the module has no variations.
        - `id` string, required: Identifier of the variation within the module.
        - `name` string, required: The variation's label, or a name derived from the element type when the module author did not label it.
        - `enabled_by_default` boolean, required: Whether the variation is shown in the module by default.
      - `created_at` string, date-time
      - `updated_at` string, date-time
  - `links` object
    - `first` string
    - `last` string
    - `prev` string, nullable
    - `next` string, nullable
  - `meta` object
    - `current_page` integer
    - `from` integer
    - `last_page` integer
    - `links` object[]
      - `url` string, nullable
      - `label` string
      - `active` boolean
    - `path` string
    - `per_page` integer
    - `to` integer
    - `total` integer

## Other responses

- `401`: Unauthenticated
- `403`: Unauthorized
- `404`: Not Found

---

[API](https://skmtc.dev/knak/apis/knak-enterprise-api.md) - [All operations](https://skmtc.dev/knak/apis/knak-enterprise-api/llms.txt) - [OpenAPI document](https://skmtc.dev/knak/apis/knak-enterprise-api/revisions/31d2c94edfcc?raw)
