Messages

Decide action approvals

Decide several pending action approvals of a message in one request. The assistant resumes only when no pending approval remains, and exactly once.

post/chats/{chat_id}/messages/{message_id}/approvals

Request

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

Path parameters

chat_idstring required

Chat ID

message_idstring required

Message ID

Request body

backgroundboolean

When true, decisions are recorded immediately and any execution runs in the background. Defaults to false, which blocks until the step finishes when these were the last pending approvals.

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.