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

# List components

> Retrieve a paginated list of email components.

<Warning>
  Content API endpoints are currently in an open alpha and are subject to
  change.
</Warning>

## Request

### Query parameters

<ParamField query="perPage" type="string" default={20}>
  How many results to return in each request. Must be between 10 and 50.
</ParamField>

<ParamField query="cursor" type="string">
  A cursor to return a specific page of results. Cursors can be found from the
  `pagination.nextCursor` value in each response.
</ParamField>

## Response

### Success

<ResponseField name="success" type="boolean" required />

<ResponseField name="pagination" type="object">
  <Expandable title="metadata" defaultOpen={false}>
    <ResponseField name="totalResults" type="number">
      Total results found.
    </ResponseField>

    <ResponseField name="returnedResults" type="number">
      The number of results returned in this response.
    </ResponseField>

    <ResponseField name="perPage" type="number">
      The maximum number of results requested.
    </ResponseField>

    <ResponseField name="totalPages" type="number">
      Total number of pages.
    </ResponseField>

    <ResponseField name="nextCursor" type="nullable string">
      The next cursor (for retrieving the next page of results using the `cursor`
      parameter), or `null` if there are no further pages.
    </ResponseField>

    <ResponseField name="nextPage" type="nullable string">
      The URL of the next page of results, or `null` if there are no further
      pages.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="data" type="array" required>
  <Expandable title="component" defaultOpen={true}>
    <ResponseField name="componentId" type="string" required />

    <ResponseField name="name" type="string" required />

    <ResponseField name="lmx" type="string" required />
  </Expandable>
</ResponseField>

### Error

A `400 Bad Request` is returned if `perPage` is invalid.

If the API key is invalid (or content API is not enabled for your team), a
`401 Unauthorized` is returned.

<ResponseField name="success" type="boolean" required />

<ResponseField name="message" type="string" required />

<ResponseExample>
  ```json Response theme={"dark"}
  {
    "success": true,
    "pagination": {
      "totalResults": 1,
      "returnedResults": 1,
      "perPage": 20,
      "totalPages": 1,
      "nextCursor": null,
      "nextPage": null
    },
    "data": [
      {
        "componentId": "cmpn_01hxyz",
        "name": "Hero header",
        "lmx": "<Section><Heading>Welcome</Heading></Section>"
      }
    ]
  }
  ```
</ResponseExample>
