Skip to main content
POST
Create embed session

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

Requested iframe capabilities. startOutboundChat requires a read-write API key.

Minimum array length: 1

UI/runtime capability granted to the generated iframe session.

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

Chat to open and optionally restrict the session to. Required when showChatPage is requested without showChatsList, unless startOutboundChat is also requested.

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

"64f000000000000000000001"

Response

Embed session created.

data
object
required