Skip to main content
POST
/
sessions
{
  "user_id": "user-123",
  "agent_session_id": "new-session-id",
  "session_id": "new-session-id",
  "session_name": "New Session",
  "session_state": {
    "key": "value"
  },
  "metadata": {
    "key": "value"
  },
  "agent_id": "agent-1",
  "created_at": "2025-10-21T12:00:00Z",
  "updated_at": "2025-10-21T12:00:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

type
enum<string>

Type of session to create (agent, team, or workflow)

Available options:
agent,
team,
workflow
db_id
string | null

Database ID to create session in

Body

application/json

Session configuration data

session_id
string | null

Optional session ID (generated if not provided)

session_name
string | null

Name for the session

session_state
object | null

Initial session state

metadata
object | null

Additional metadata

user_id
string | null

User ID associated with the session

agent_id
string | null

Agent ID if this is an agent session

team_id
string | null

Team ID if this is a team session

workflow_id
string | null

Workflow ID if this is a workflow session

Response

Session created successfully

  • AgentSessionDetailSchema
  • TeamSessionDetailSchema
  • WorkflowSessionDetailSchema
agent_session_id
string
required

Unique agent session identifier

session_id
string
required

Session identifier

session_name
string
required

Human-readable session name

user_id
string | null

User ID associated with the session

session_summary
object | null

Summary of session interactions

session_state
object | null

Current state of the session

agent_id
string | null

Agent ID used in this session

total_tokens
integer | null

Total tokens used in this session

agent_data
object | null

Agent-specific data

metrics
object | null

Session metrics

metadata
object | null

Additional metadata

chat_history
Chat History · object[] | null

Complete chat history

created_at
string<date-time> | null

Session creation timestamp

updated_at
string<date-time> | null

Last update timestamp