Messages

List chat messages

Get a list of messages for a specific chat.

get/chats/{chat_id}/messages

Request

  • Base URL: https://api.useinvent.com
  • URL: https://api.useinvent.com/chats/{chat_id}/messages
  • Auth: HTTP bearer

Path parameters

chat_idstring required

Chat ID

Query parameters

from_datestring date-time nullable

The date to start fetching messages from

pagenumber

Page number

takenumber

Number of items to take

nextstring

Next page token (Only used on special endpoints)

progressiveboolean

Skip the total count: pagination-count is exact on the last page, and one more than the items so far while more pages exist (Only used on special endpoints)

Response

idstring required
role'user' | 'assistant' | 'system' | 'tool' | 'event' | 'note' required

The role of the message

modelstring required

The model used for the message

status'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED' required

The chat status

errorstring

Error message if the message failed

broadcast_idstring

ID of the broadcast this message originates from

is_broadcast_messageboolean

Whether this message was sent via a broadcast template

channel_type'internal' | 'org' | 'agent' | 'custom' | 'whatsapp_bot' | 'messenger_bot' | 'instagram_dm' | 'tiktok_dm' | 'telegram_bot' | 'slack_bot' | 'teams_bot' | 'gmail' | 'outlook' | 'twilio' | 'telnyx' | 'email' | 'smpp'

The channel the message arrived through, if any

delivered_atstring date-time nullable

When the message was delivered to the recipient

created_atstring date-time nullable required
updated_atstring date-time nullable required

Example response

[
  {
    "messages": [
      {
        "parts": [
          {
            "audio": {
              "file_filename": "document.pdf",
              "file_size": 1024,
              "file_mimetype": "application/pdf"
            }
          }
        ]
      }
    ]
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.