Skip to main content
GET
/
botMetric
/
messages
Get messages
curl --request GET \
  --url https://api.closebot.com/botMetric/messages \
  --header 'X-CB-KEY: <api-key>'
[
  {
    "messageId": "<string>",
    "sourceId": "<string>",
    "leadId": "<string>",
    "botId": "<string>",
    "personaId": "<string>",
    "channel": "<string>",
    "fromBot": true,
    "direction": "<string>",
    "message": "<string>",
    "attachments": [
      {
        "url": "<string>"
      }
    ],
    "timestamp": "2023-11-07T05:31:56Z",
    "activities": [
      {
        "activity": "<string>",
        "data": "<string>",
        "timeData": "2023-11-07T05:31:56Z"
      }
    ]
  }
]

Authorizations

X-CB-KEY
string
header
required

CloseBot API Key Authorization

Query Parameters

sourceId
string

Optional source ID.

leadId
string

Optional lead ID.

start
string<date-time>

Optional start date.

end
string<date-time>

Optional end date.

maxCount
integer<int32>

Optional maximum number of messages to return.

Response

Success

messageId
string | null

The unique ID of the message

sourceId
string | null

The ID of the source

leadId
string | null

The ID of the lead

botId
string | null

The optional ID of the bot

personaId
string | null

The optional ID of the persona

channel
string | null

The optional channel of the message

fromBot
boolean

Whether the message was sent from the bot

direction
string | null

The direction of the message (inbound or outbound)

message
string | null

The content of the message

attachments
object[] | null

The list of attachments associated with the message

timestamp
string<date-time>

The timestamp when the message was sent

activities
object[] | null

The list of activities associated with the message