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

# GET /v1/crm/notes

> List notes, filtered by contact, ticket, or interaction type.

Returns a paginated list of notes. Results cover the whole **company**, not just the project your token belongs to — see [Tenancy is implicit](/dev/crm/overview#tenancy-is-implicit).

The usual pattern is to filter by `ticket_id` to build a ticket's activity timeline, or by `chat_user` to build a contact's.

## Endpoint

```
GET https://api.keebai.com/v1/crm/notes
```

## Required scope

`crm:notes:read`

## Headers

| Header          | Required | Value                    |
| --------------- | -------- | ------------------------ |
| `Authorization` | Yes      | `Bearer kbai_pk_<token>` |

## Query parameters

| Field       | Type      | Required | Description                                |
| ----------- | --------- | -------- | ------------------------------------------ |
| `chat_user` | `string`  | No       | `ObjectId` of the contact.                 |
| `ticket_id` | `string`  | No       | `ObjectId` of the ticket.                  |
| `type`      | `string`  | No       | One of `note`, `call`, `email`, `meeting`. |
| `limit`     | `integer` | No       | Page size, `1`–`200`. Defaults to 100.     |
| `offset`    | `integer` | No       | Records to skip. Defaults to 0.            |

## Example request

<CodeGroup>
  ```bash curl theme={null}
  curl -G https://api.keebai.com/v1/crm/notes \
    -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    --data-urlencode "ticket_id=65f4b5c6d7e8f9a0b1c2d3e4" \
    --data-urlencode "limit=50"
  ```

  ```js JavaScript theme={null}
  const params = new URLSearchParams({ ticket_id: ticketId, limit: "50" });

  const response = await fetch(`https://api.keebai.com/v1/crm/notes?${params}`, {
    headers: { Authorization: `Bearer ${process.env.KEEBAI_API_TOKEN}` },
  });
  const { data, total } = await response.json();
  ```

  ```python Python theme={null}
  import os, requests

  resp = requests.get(
      "https://api.keebai.com/v1/crm/notes",
      headers={"Authorization": f"Bearer {os.environ['KEEBAI_API_TOKEN']}"},
      params={"ticket_id": ticket_id, "limit": 50},
      timeout=10,
  )
  resp.raise_for_status()
  notes = resp.json()["data"]
  ```
</CodeGroup>

## Response

### 200 OK

```json theme={null}
{
  "data": [
    {
      "_id": "65a1f2b3c4d5e6f7a8b9c0d1",
      "chat_user": "66c1d2e3f4a5b6c7d8e9f0a1",
      "ticket_id": "65f4b5c6d7e8f9a0b1c2d3e4",
      "content": "Llamé al cliente, quedó de confirmar el lunes.",
      "type": "call",
      "created_by": "68e1f2a3b4c5d6e7f8a9b0c1",
      "created_at": "2026-05-02T14:31:07.221Z",
      "updated_at": "2026-05-02T14:31:07.221Z"
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}
```

### 400 Bad Request

A `chat_user` or `ticket_id` that is not a valid `ObjectId`, a `type` outside the allowed set, `limit` above 200, or an unknown query parameter.

### 401 Unauthorized

Missing, invalid, revoked, or expired token.

### 403 Forbidden

The token does not have the `crm:notes:read` scope.

## Operational notes

* **`created_by` is a user id**, not the note author's name. There is no public endpoint for resolving users to names yet — cache the mapping from the portal if you need to display it.


## OpenAPI

````yaml GET /v1/crm/notes
openapi: 3.0.0
info:
  title: Keebai Public API
  description: Superficie pública REST autenticada con Personal Access Tokens (PAT).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.keebai.com
    description: Production
security: []
tags: []
paths:
  /v1/crm/notes:
    get:
      tags:
        - crm-notes
      summary: Listar notas
      description: Devuelve las notas de la company del token.
      operationId: PublicNotesController_list
      parameters:
        - name: chat_user
          required: false
          in: query
          description: Filtrar por chat user (contacto)
          schema:
            type: string
        - name: ticket_id
          required: false
          in: query
          description: Filtrar por ticket
          schema:
            type: string
        - name: type
          required: false
          in: query
          schema:
            type: string
            enum:
              - note
              - call
              - email
              - meeting
        - name: limit
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 200
            default: 50
            type: number
        - name: offset
          required: false
          in: query
          schema:
            minimum: 0
            default: 0
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicNoteListResponseDto'
      security:
        - PAT: []
components:
  schemas:
    PublicNoteListResponseDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PublicNoteResponseDto'
        total:
          type: number
        limit:
          type: number
        offset:
          type: number
      required:
        - data
        - total
        - limit
        - offset
    PublicNoteResponseDto:
      type: object
      properties:
        _id:
          type: string
          description: ObjectId de la nota
        content:
          type: string
        type:
          type: string
          enum:
            - note
            - call
            - email
            - meeting
        chat_user:
          type: string
          description: ObjectId del chat user (contacto)
        ticket_id:
          type: string
          description: ObjectId del ticket asociado
        created_by:
          type: string
          description: ObjectId del usuario que creó la nota
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - _id
        - content
        - type
        - created_by
        - created_at
        - updated_at
  securitySchemes:
    PAT:
      scheme: bearer
      bearerFormat: kbai_pk_<hex>
      type: http
      description: >-
        Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal
        con permiso `developer.manage_tokens`.

````