Messages

Create chat message

Create a new message for a specific chat.

post/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

Request body

Example request

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

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.