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

> ## Agent Instructions
> Collabase documentation. Interface labels are quoted in English, as they appear in the product.
> Features marked Enterprise need the Collabase Enterprise Edition licence.

# List CRM records

> List the records of one type, filtered by a query and sorted, one page at a time with a cursor.

Returns a page of the records of one type that the token owner's roles let them read. Fields and
columns the roles hide are not searchable and answer like a name that does not exist.

> [!NOTE]
>
> Scope `crm:read`.

## Query parameters

**typeKey** `string` *required*

The type: `company`, `person`, `opportunity` or a custom key. A type the roles do not allow answers `404`.

**cql** `string`

A filter in the Collabase query language, for example `title ~ "AG"`. The query is confined to the type.

**sort** `string`

Up to three keys as `field:asc` or `field:desc`, separated by commas. Not allowed together with `ORDER BY` in `cql`.

**columns** `string`

Comma-separated field keys to return as cells. Hidden columns are dropped.

**cursor** `string`

The `nextCursor` of the previous page. A cursor of another query answers `422`.

**limit** `number` (default: 20)

1 to 100; more is cut down to 100.

## Response

**data** `object` *required*

**properties**

**items** `array` *required*

One entry per record with `id`, `href` and `cells`.

**nextCursor** `string | null` *required*

`null` on the last page.

```bash cURL theme={"dark"}
curl "https://your-collabase.ch/api/v1/crm/records?typeKey=company&sort=title:asc&limit=20" \
  -H "Authorization: Bearer cb_xYz123ABCD..."
```

```json 200 theme={"dark"}
{
  "data": {
    "items": [{ "id": "cm3rec0001", "href": "/crm/company/cm3rec0001", "cells": { "title": { "kind": "reference", "label": "Beispiel AG" } } }],
    "nextCursor": null
  }
}
```

```json 422 theme={"dark"}
{ "error": { "code": "UNKNOWN_FIELD", "message": "The query could not be run." } }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.