> ## 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/loyalty/memberships/{id}/passes/notifications

> List the wallet messages already sent to a membership, newest first, with how many devices each reached.

Returns the wallet messages already sent to a membership, newest first. Check it before notifying again — it is the only record of what this customer has already been told.

## Endpoint

```
GET https://api.keebai.com/v1/loyalty/memberships/{id}/passes/notifications
```

## Required scope

`loyalty:read`

## Headers

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

## Path parameters

| Parameter | Type     | Description                |
| --------- | -------- | -------------------------- |
| `id`      | `string` | The membership `ObjectId`. |

## Example request

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.keebai.com/v1/loyalty/memberships/6650aaaa1111bbbb2222cccc/passes/notifications \
    -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  ```

  ```js JavaScript theme={null}
  const response = await fetch(
    "https://api.keebai.com/v1/loyalty/memberships/6650aaaa1111bbbb2222cccc/passes/notifications",
    { headers: { Authorization: `Bearer ${process.env.KEEBAI_API_TOKEN}` } },
  );
  const { data } = await response.json();
  const lastSentAt = data[0]?.created_at;
  ```

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

  resp = requests.get(
      "https://api.keebai.com/v1/loyalty/memberships/6650aaaa1111bbbb2222cccc/passes/notifications",
      headers={"Authorization": f"Bearer {os.environ['KEEBAI_API_TOKEN']}"},
      timeout=10,
  )
  resp.raise_for_status()
  history = resp.json()["data"]
  ```
</CodeGroup>

## Response

### 200 OK

```json theme={null}
{
  "data": [
    {
      "_id": "6650eeee5555ffff6666aaaa",
      "header": "Three stamps to go",
      "body": "Collect three more and your next coffee is on us.",
      "link_url": "https://yourstore.example/rewards",
      "link_label": "See rewards",
      "channels": ["google", "apple"],
      "delivered": 2,
      "created_at": "2026-07-20T15:04:11.900Z"
    }
  ],
  "total": 1
}
```

### 401 Unauthorized

Missing, invalid, revoked, or expired token.

### 403 Forbidden

The token does not have the `loyalty:read` scope.

### 404 Not Found

No membership with that id in your company.

### 502 Bad Gateway

The loyalty service is unreachable.

## Operational notes

* **This response is not paginated and is capped.** It returns the most recent messages with a `total` for convenience; it is a recency view, not a full archive.
* **`delivered` is the device count at send time**, matching the `notified` figure the notify call returned. A `0` means nobody had the card registered then.
* **A message is recorded even when it reaches nobody.** The history tells you what you tried to say, not only what landed.
* **Use it as a frequency guard.** Nothing in the API rate-limits wallet notifications per customer beyond the global [request limits](/dev/rate-limits), so if you are running an automated nudge, check `created_at` here before sending another.


## OpenAPI

````yaml GET /v1/loyalty/memberships/{id}/passes/notifications
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/loyalty/memberships/{id}/passes/notifications:
    get:
      tags:
        - loyalty
      summary: Listar las notificaciones enviadas a una membresía
      description: >-
        Historial de los mensajes mandados a la wallet, del más nuevo al más
        viejo, con a cuántos dispositivos llegó cada uno.
      operationId: PublicLoyaltyController_listPassNotifications
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicPassNotificationListResponseDto'
      security:
        - PAT: []
components:
  schemas:
    PublicPassNotificationListResponseDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PublicPassNotificationDto'
        total:
          type: number
      required:
        - data
        - total
    PublicPassNotificationDto:
      type: object
      properties:
        _id:
          type: string
        header:
          type: string
        body:
          type: string
        link_url:
          type: string
        link_label:
          type: string
        channels:
          example:
            - google
            - apple
          type: array
          items:
            type: string
        delivered:
          type: number
          example: 2
        created_at:
          type: string
      required:
        - _id
        - header
        - body
        - link_url
        - link_label
        - channels
        - delivered
        - created_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`.

````