Skip to main content
POST
Init Session
Call this endpoint before sending any messages to a Connectly AI agent. It creates a new conversation session scoped to a specific customer and returns a sessionId you must pass to every subsequent invoke and close request.

Endpoint

Request body

string
required
Your Connectly business identifier.
string
required
A unique identifier for the customer starting the conversation. Use a stable ID from your own system (e.g. a customer ID or phone number) so you can correlate sessions with users.

Response

string
The unique identifier for this conversation session. Save this value — you must include it in all subsequent invoke and close calls for this conversation. Sessions are isolated; events from one session never affect another.
Store the sessionId immediately after calling this endpoint. Without it you cannot send messages or close the session.

Example