cURL
curl --request POST \ --url https://api.example.com/sessions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'
{ "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" }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Type of session to create (agent, team, or workflow)
agent
team
workflow
Database ID to create session in
Session configuration data
Session created successfully