POST
/
agents
/
{agent_id}
/
interact
/
{user_id}
curl --request POST \
  --url https://eu-vg-edge.moeaymandev.workers.dev/agents/{agent_id}/interact/{user_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "action": {
    "type": "text",
    "payload": "<string>"
  },
  "appendMessages": [
    {
      "from": "human",
      "type": "launch",
      "item": {},
      "delay": 123,
      "ts": 123
    }
  ],
  "transcriptMetadata": {
    "ID": "<string>",
    "userID": "<string>",
    "userName": "<string>",
    "userEmail": "jsmith@example.com",
    "userImage": "<string>",
    "userPhone": "<string>",
    "userBrowser": "<string>",
    "userProfilePic": "<string>",
    "origin": "web-chat",
    "messagesNum": 123,
    "interactionsNum": 123,
    "ts": 123,
    "tags": [
      "<string>"
    ],
    "convoTimeSeconds": 123,
    "firstMessageTS": 123,
    "lastMessageTS": 123,
    "userPlatform": "<string>",
    "state": "requested_chat",
    "chatAssignedTo": "<string>",
    "lastModified": 123,
    "sessionsNum": 123
  },
  "variables": {},
  "origin": "web-chat"
}'
{
  "platformName": "vf",
  "chatState": {},
  "actionMessages": [
    "<any>"
  ],
  "turns": [
    {
      "from": "bot",
      "messages": {
        "from": "human",
        "type": "launch",
        "item": {},
        "delay": 123,
        "ts": 123
      },
      "ts": 123
    }
  ],
  "success": true,
  "appError": "<string>",
  "message": "<string>",
  "agentData": {
    "agentPlatform": "vf",
    "title": "<string>",
    "description": "<string>",
    "VF_DIALOGUE_API_KEY": "<string>",
    "VF_PROJECT_API_KEY": "<string>",
    "theme": "<string>",
    "customThemeJSONString": {
      "themeType": "dark",
      "primary": "<string>",
      "nineColorPallet": [
        [
          123
        ]
      ]
    },
    "roundedImageURL": "<string>",
    "avatarImageUrl": "<string>",
    "headerImageUrl": "<string>",
    "bannerImageUrl": "<string>",
    "chatBgURL": "<string>",
    "fontFamily": "<string>",
    "branding": "<string>",
    "lang": "<string>",
    "UIhandoffdescription": "<string>",
    "UIhandoffSubdescription": "<string>",
    "buttonsLayout": "horizontal",
    "ADVANCED_customCSS": "<string>",
    "whatsappToken": "<string>",
    "whatsappNumberId": "<string>",
    "whatsappBusniessId": "<string>",
    "webhookUrl": "<string>",
    "gcloudPrivateKey": "<string>",
    "gcloudClientEmail": "<string>",
    "vg_initMessages": [
      "<string>"
    ],
    "vg_systemPrompt": "<string>",
    "vg_temperature": 123,
    "vg_defaultModel": "gpt-3.5-turbo-0125",
    "vg_maxTokens": 123,
    "vg_kbDefaultDimension": 123,
    "vg_kbTopChunks": 123,
    "vg_enableUIEngine": true,
    "SECRET_API_KEY": "<string>",
    "messageDelayMS": 123,
    "proactiveMessage": "<string>",
    "recordChatHistory": true,
    "disableSmoothScroll": true,
    "autoStartWidget": true,
    "listenForUrlChanges": true,
    "chatForget": true,
    "enableAudioSupport": true,
    "enableAITranslate": true,
    "disableNoReplyListener": true,
    "alwaysShowHandoff": true,
    "fixedHandoffPopup": true,
    "smartInit": true,
    "showHandoffEvenIfOffline": true,
    "enableQuickFileUpload": true
  },
  "origin": "web-chat",
  "userID": "<string>",
  "agentID": "<string>",
  "oldTurns": [
    {
      "from": "bot",
      "messages": {
        "from": "human",
        "type": "launch",
        "item": {},
        "delay": 123,
        "ts": 123
      },
      "ts": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Agent/Workspace secret API key as bearer token.

Path Parameters

agent_id
string
required

The ID of the agent to interact with

user_id
string
required

The ID of the user to interact with

Body

application/json
Interaction data
action
object
appendMessages
object[]

Messages to append to the conversation.

transcriptMetadata
object

Metadata related to the conversation transcript.

variables
object

Variables to inject to VF.

origin
enum<string>

Channel to send message through.

Available options:
web-chat,
whatsapp,
discord,
gb-chat

Response

200
application/json
Interaction successful
platformName
enum<string>
required

Name of the platform (virtual flow or TIXAE Agents).

Available options:
vf,
vg
success
boolean
required

Indicates if the interaction was successful.

message
string
required

General message.

chatState
object

State of the chat.

actionMessages
any[]

Messages related to actions.

turns
object[]

Turns in the conversation.

appError
string

Error message related to the app.

agentData
object

Data related to the agent in the conversation.

origin
enum<string>

Origin of the message.

Available options:
web-chat,
whatsapp,
discord,
gb-chat
userID
string

User/Conversation ID.

agentID
string

Agent ID.

oldTurns
object[]

Previously recorded turns in the conversation.