Public
Find messages
Find messages for the active team
curl --request GET \
--url https://web-api.clerk.chat/public/messages \
--header 'apiKey: <api-key>'
{
"data": [
{
"id": 1,
"body": "Hello, world!",
"conversationId": "1",
"userId": "1",
"campaignMessageId": 1,
"campaignId": 1,
"channelId": "00000000-0000-0000-0000-000000000000",
"inboxId": "00000000-0000-0000-0000-000000000000",
"inbound": true,
"members": [
"+1415456789"
],
"sender": "+1415456789",
"senderType": "user",
"status": "delivered",
"error": "<string>",
"sentByName": "Clerk",
"errorCode": 123,
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-01T00:00:00.000Z",
"seen": true,
"externalId": "external-id",
"segments": 1,
"timestamp": "2021-01-01T00:00:00.000Z"
}
],
"links": {
"next": "<string>",
"prev": "<string>",
"self": "<string>"
},
"total": 1
}
Authorizations
Query Parameters
The IDs of the inboxes to filter messages by. If not provided, all inboxes will be included.
Only messages after this date until the end date or now
Only messages up to this date
Number of items to return (max 50)
Page number
Response
Represents a message resource
The ID of the resource
1
The message text
"Hello, world!"
The associated Conversation ID
"1"
Whether the message was received (true) or sent (false)
true
The phone numbers or identifiers of message participants
["+1415456789"]
The phone number or identifier of the message sender
"+1415456789"
The type of sender
ai_pipeline
, assistant
, user
, campaign
, campaign_message
, workflow
"user"
The status of the message
sending
, scheduled
, sent
, delivered
, failed
, read
"delivered"
The date and time the resource was created
"2021-01-01T00:00:00.000Z"
The date and time the resource was last updated
"2021-01-01T00:00:00.000Z"
Whether the message has been seen
true
Number of SMS message segments used by the message
1
The timestamp associated with the message
"2021-01-01T00:00:00.000Z"
The ID of the user who created the resource
"1"
The ID of the campaign message
1
The associated Campaign ID
1
The associated Channel ID
"00000000-0000-0000-0000-000000000000"
The associated Inbox ID
"00000000-0000-0000-0000-000000000000"
The error message if the message failed to send
The name of the sender displayed in the UI
"Clerk"
The error code if the message failed to send
123
The external ID of the resource
"external-id"
The total number of messages
1
curl --request GET \
--url https://web-api.clerk.chat/public/messages \
--header 'apiKey: <api-key>'
{
"data": [
{
"id": 1,
"body": "Hello, world!",
"conversationId": "1",
"userId": "1",
"campaignMessageId": 1,
"campaignId": 1,
"channelId": "00000000-0000-0000-0000-000000000000",
"inboxId": "00000000-0000-0000-0000-000000000000",
"inbound": true,
"members": [
"+1415456789"
],
"sender": "+1415456789",
"senderType": "user",
"status": "delivered",
"error": "<string>",
"sentByName": "Clerk",
"errorCode": 123,
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-01T00:00:00.000Z",
"seen": true,
"externalId": "external-id",
"segments": 1,
"timestamp": "2021-01-01T00:00:00.000Z"
}
],
"links": {
"next": "<string>",
"prev": "<string>",
"self": "<string>"
},
"total": 1
}