Ana içeriğe geç

Create the conversation for a deferred visitor (first write)

POST 

/api/widget/conversation

PUBLIC endpoint (anonymous visitors, NO staff auth). Deferred-conversation mode: a visitor who opened the widget was logged as a VISIT with no conversation; the moment they first write / tap a flow button the widget calls this to create their contact + chat conversation and obtain a write-capable session token. The active flow runs (persisting the same intro shown on open) and the already-logged visitor + visit are stitched to the new conversation by the widget visitor_token. The tenant is resolved from the PUBLIC widget_key; the raw tenant id is never accepted.

Request​

Responses​

The conversation was created; a full session is returned.