Skip to main content
Reference for all WebSocket message types. Use this when building integrations to understand the exact JSON format for every message you send and receive. What you’ll learn: Base message structure, client-to-server messages, server-to-client messages, and event payloads.
Testing requires a valid API key. All examples in this section require authentication with either a web integration token or API key for Dasha BlackBox.
All WebSocket messages share these common fields:

Client to server messages

Messages you send to the Dasha BlackBox server.
Start a new conversation with an agent. Send immediately after WebSocket connection opens.

WebCallStartMessage schema

*Either request (production) or devRequest (development) is required, depending on which endpoint you’re using.
Send a text message to the agent during chat conversations.

IncomingChatMessage schema


Respond to WebRTC SDP offer for voice calls. Send in response to sdpInvite message.

SdpAnswerMessage schema


Return the result of a tool execution requested via WebSocket. Send in response to websocketToolRequest message.

WebsocketToolResponseMessage schema


End the conversation gracefully. Wait for conversationResult before closing the WebSocket.

TerminateMessage schema


Server to client messages

Messages you receive from the Dasha BlackBox server.
System events indicating connection state and lifecycle changes.

EventHistoryMessage schema

Event names


text

Text messages from agent or user speech transcription.

TextHistoryMessage schema

Additional fields for assistant messages: Additional fields for user messages:

Recognition types


WebRTC SDP offer for voice call setup. Respond with sdpAnswer.

SdpInviteMessage schema


Notification that the agent is calling a tool/function.

ToolCallHistoryMessage schema


Result of a tool execution.

ToolCallResultHistoryMessage schema


Request to execute a tool via WebSocket (for tools configured with WebSocket execution). Respond with websocketToolResponse.

WebsocketToolRequestHistoryMessage schema


Final conversation summary and metadata. Sent after terminate or when conversation ends.

ConversationResultHistoryMessage schema

The result object structure depends on your agent configuration.
Error notification from the server.

ErrorHistoryMessage schema

Common error messages


Message flow diagrams

Use these types for type-safe message handling:

Next steps

Chat Implementation

Build a complete chat interface with these messages

Tool Execution

Handle tool calls via WebSocket

Error Handling

Handle errors and edge cases

Voice Implementation

WebRTC voice call message flow