Skip to main content
POST
Create a new session
The Sessions API provides a simplified way to manage conversations without dealing with servers and channels. Sessions automatically handle timeout management, renewal, and expiration.

Request Body

string
required
UUID of the agent to create a session with
string
required
UUID of the user initiating the session
object
Optional metadata to attach to the session
object
Optional timeout configuration for the session

Response

string
Unique identifier for the created session
string
UUID of the agent
string
UUID of the user
string
ISO timestamp of session creation
string
ISO timestamp when the session will expire
object
The active timeout configuration for this session
object
Any metadata attached to the session

Body

application/json
agentId
string<uuid>
required

ID of the agent to start a session with

userId
string<uuid>
required

ID of the user creating the session

metadata
object

Additional metadata for the session

timeoutConfig
object

Optional timeout configuration for the session

Response

Session created successfully

sessionId
string

Unique identifier for the created session

agentId
string<uuid>
userId
string<uuid>
createdAt
string<date-time>
metadata
object
expiresAt
string<date-time>

When the session will expire

timeoutConfig
object

Active timeout configuration for the session