Create a session
Explicitly create a conversation session for a channel. Allows you to configure the agent, initial context, and metadata before sending the first message.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| channel_id | string | path | Yes | The unique identifier of the channel. |
Request Body
{
"agent_id": "string (optional — uses channel default if omitted)",
"metadata": "object (optional)",
"initial_context": "string (optional)"
}Response
{
"id": "ses_01hxyz",
"channel_id": "ch_01hxyz",
"agent_id": "agt_01hxyz",
"status": "active",
"message_count": 0,
"metadata": {},
"created_at": "2026-03-19T12:00:00Z",
"expires_at": "2026-03-20T12:00:00Z"
}