Connect to the 7en chat WebSocket to enable real-time messaging with your agent. This endpoint provides a persistent connection for sending user messages and receiving agent responses, including streaming text and structured events.
Add your domain to the allowed domains list in the settings to allow connections from your domain. You can add multiple domains to the allowed domains list.
stringYour 7en API key. Example: 43NKLN3LKN4nlkn
stringUnique identifier of the agent. Example: "453"
stringType of the event or object. example `set_reaction`, `history`, `feedback`
objectoptionalPrimary content payload.sometimes we can pass string json {"rating":1,"text":"Accurate info"}`
objectoptionalSession id for conversation
stringoptionalSource of the event or message.
intoptionalMessage Id inside conversation
intoptionalFeedback message
stringoptionalIdentifier of the agent.
stringoptionalReaction associated with the message.
stringoptionalReason associated with a reaction or status.
| Type | Description |
|---|---|
feedback | Used to send feedback with stars and text. rating is stars from 1 to 5 and text is template text. Send as {\"rating\":1,\"text\":\"Accurate info\"} inside content property. See the examples below. |
set_reaction | Used to like or dislike message. See the examples below |
export | Used to export chat |
user | Message from user |
timeout | To end the chat session |
delete | To delete the chat |
session_init | To start a new chat session |
private | To start a private chat session |
Start building intelligent AI agents to engage with customers.