---
title: "Retrieve messages by AI contact with pagination"
method: GET
path: "/api/public/contact/v2/{aiContactId}/messages"
tags: ["Contact"]
---

# Retrieve messages by AI contact with pagination

`GET /api/public/contact/v2/{aiContactId}/messages`

## Request

- Base URL: `https://api.vambe.me`
- URL: `https://api.vambe.me/api/public/contact/v2/{aiContactId}/messages`
- Auth: none required
- TypeScript: <https://skmtc.dev/vambe/apis/vambe-ai-api/docs/api/public/contact/v2/:aiContactId/messages/get.ts> (a function with typed inputs; its response is checked against the schema)

Replaces the old endpoint /public/ai-message/:aiContactId

## Path parameters

- `aiContactId` string, required

## Query parameters

- `page` number, required

## Headers

- `x-api-key` string, required

## Response `200`

Messages retrieved successfully.

## Other responses

- `404`: AI contact not found.

---

[API](https://skmtc.dev/vambe/apis/vambe-ai-api.md) - [All operations](https://skmtc.dev/vambe/apis/vambe-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vambe/apis/vambe-ai-api/revisions/e206709d4be5?raw)
