---
title: "Get messages"
method: GET
path: "/botMetric/messages"
tags: ["BotMetric"]
---

# Get messages

`GET /botMetric/messages`

## Query parameters

- `sourceId` string
- `leadId` string
- `start` string, date-time
- `end` string, date-time
- `maxCount` integer

## Response `200`

Success

- BotMetricMessage[]
  - `messageId` string, nullable — The unique ID of the message
  - `sourceId` string, nullable — The ID of the source
  - `leadId` string, nullable — The ID of the lead
  - `botId` string, nullable — The optional ID of the bot
  - `personaId` string, nullable — The optional ID of the persona
  - `channel` string, nullable — The optional channel of the message
  - `fromBot` boolean — Whether the message was sent from the bot
  - `direction` string, nullable — The direction of the message (inbound or outbound)
  - `message` string, nullable — The content of the message
  - `attachments` BotMetricAttachment[], nullable — The list of attachments associated with the message
    - `url` string, nullable — The URL of the attachment
  - `timestamp` string, date-time — The timestamp when the message was sent
  - `activities` BotMetricActivity[], nullable — The list of activities associated with the message
    - `activity` string, nullable
    - `data` string, nullable
    - `timeData` string, date-time, nullable
    - `faviconUrl` string, nullable

---

[API](https://skmtc.dev/closebot/apis/closebot-api.md) · [All operations](https://skmtc.dev/closebot/apis/closebot-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/closebot/closebot-api/revisions/da5f5fb58534/schema)
