Skip to main content
POST
/
v1
/
chatting
/
{chatbotId}
/
thread
/
{threadId}
/
message
Send Agent Message
curl --request POST \
  --url https://interhemispheric-unwet-paulene.ngrok-free.dev/api/v1/chatting/{chatbotId}/thread/{threadId}/message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "agentName": "<string>"
}
'
{
  "success": true,
  "message": "Agent message sent successfully",
  "data": {
    "message": {
      "id": "<string>",
      "threadId": "<string>",
      "chatbotId": "<string>",
      "messageType": "AGENT_MESSAGE",
      "systemMessageType": "<string>",
      "content": "<string>",
      "contentTimestamp": "2023-11-07T05:31:56Z",
      "agentName": "<string>",
      "parentMessageId": "<string>",
      "llmModelId": "<string>",
      "reaction": "<string>",
      "source": [
        {}
      ],
      "isEdited": true,
      "editedBy": "<string>",
      "editedAt": "2023-11-07T05:31:56Z",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  }
}
Kindly first make sure, chatMode is set to Agent, if not, then please do.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chatbotId
string
required
Example:

"361628903185318481"

threadId
string
required
Example:

"abc-thread-uuid"

Body

application/json
content
string
required

The message text to send

agentName
string

Display name for the agent. Defaults to the authenticated user's name.

Response

Agent message sent successfully

success
boolean
Example:

true

message
string
Example:

"Agent message sent successfully"

data
object