Skip to main content

Single chat

Use this when your CRM already knows which YoLead chat should be opened.
{
  "employeeId": "64f000000000000000000001",
  "chatId": "64f000000000000000000002",
  "capabilities": ["showChatPage"]
}
The iframe opens the chat page directly. Because showChatsList is not requested, chatId is required and the session is restricted to that chat.

Inbox

Use this when you want to show the YoLead chats list inside your product.
{
  "employeeId": "64f000000000000000000001",
  "capabilities": ["showChatsList", "showChatPage"]
}
The iframe opens the chats list and lets the user navigate to chat pages.

Inbox with actions

Use this with a read-write API key when users should be able to perform actions from the iframe.
{
  "employeeId": "64f000000000000000000001",
  "capabilities": [
    "showChatsList",
    "showChatPage",
    "showSendInput",
    "showStatusButton",
    "showAssigneeButton"
  ]
}
If the same request is made with a read API key, YoLead only grants showChatsList and showChatPage. Check the capabilities returned by POST /v1/embed/sessions to see the effective session permissions.

Single chat with actions

Use this when your product owns navigation and the iframe should only show one chat, but the user should be able to act inside that chat.
{
  "employeeId": "64f000000000000000000001",
  "chatId": "64f000000000000000000002",
  "capabilities": [
    "showChatPage",
    "showSendInput",
    "showStatusButton",
    "showAssigneeButton"
  ]
}