Skip to main content
POST
/
v1
/
embed
/
sessions
Create embed session
curl --request POST \
  --url https://api.yo-lead.com/v1/embed/sessions \
  --header 'Content-Type: application/json' \
  --header 'X-YoLead-Key: <api-key>' \
  --header 'X-YoLead-Signature: <api-key>' \
  --header 'X-YoLead-Timestamp: <api-key>' \
  --data '
{
  "employeeId": "64f000000000000000000001",
  "chatId": "64f000000000000000000002",
  "capabilities": [
    "showChatPage",
    "showSendInput",
    "showStatusButton",
    "showAssigneeButton"
  ]
}
'
{
  "data": {
    "iframeUrl": "https://app.yo-lead.com/embed/chats/64f000000000000000000002#token=eyJ...",
    "embedToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "expiresAt": "2026-05-08T12:15:00.000Z",
    "capabilities": [
      "showChatPage",
      "showSendInput",
      "showStatusButton",
      "showAssigneeButton"
    ],
    "allowedChatId": "64f000000000000000000002"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.yo-lead.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-YoLead-Key
string
header
required

Public API key generated in the YoLead UI.

X-YoLead-Timestamp
string
header
required

Unix timestamp in milliseconds. Requests must be signed within a 5-minute window.

X-YoLead-Signature
string
header
required

Hex HMAC-SHA256 signature over <timestamp>.<raw_body> using the API secret.

Body

application/json

Embed session settings.

employeeId
string
required

MongoDB ObjectId represented as a 24-character hexadecimal string.

Pattern: ^[0-9a-fA-F]{24}$
Example:

"64f000000000000000000001"

capabilities
enum<string>[]
required
Minimum array length: 1

UI/runtime capability granted to the generated iframe session.

Available options:
showChatsList,
showChatPage,
showSendInput,
showStatusButton,
showAssigneeButton
chatId
string

MongoDB ObjectId represented as a 24-character hexadecimal string.

Pattern: ^[0-9a-fA-F]{24}$
Example:

"64f000000000000000000001"

Response

Embed session created.

data
object
required