adventurous-potato-31716
12/19/2025, 2:32 AMtall-airline-16756
12/19/2025, 2:32 AMtall-airline-16756
12/19/2025, 2:32 AMadventurous-potato-31716
12/19/2025, 2:34 AMtall-airline-16756
12/19/2025, 2:34 AMstartTime and endTime (use those to compute session duration).
◦ connectionMinutes gives billable connection time.
◦ Each participant entry includes joinedAt and leftAt for per-participant duration.
• Call participants:
◦ Session details include a participants array with participantIdentity, participantName, joinedAt, leftAt, device/OS/browser, publishedSources, location/network info, and SIP metadata when applicable.
◦ The List sessions endpoint also returns numParticipants and numActiveParticipants.
• SIP-specific info (call status, phone number, trunk ID) is available in participant attributes and SIP fields, and SIP lifecycle events (ringing → active → hangup) are tracked.
If you’d like, I can:
• Show the exact Analytics API endpoints and the minimal example queries to fetch call history for a date range, or
• Help you confirm your project has Analytics enabled and show how to pull participant join/leave timestamps.
Which would you prefer?
Sources: Analytics API | LiveKit docs | Quotas and limits | LiveKit docs | SIP participant | LiveKit docs | SIP Lifecycle Management Agent | LiveKit docsadventurous-potato-31716
12/19/2025, 2:35 AMtall-airline-16756
12/19/2025, 2:35 AMroomList grant (example Node.js):
const at = new AccessToken(apiKey, apiSecret, { ttl: 60*60*24 });
at.addGrant({ roomList: true });
const token = at.toJwt();
Or use the CLI:
lk token create --api-key $LIVEKIT_API_KEY --api-secret $LIVEKIT_SECRET_KEY --list --valid-for 24h
List sessions (call history) for a date range
• Endpoint:
GET https://cloud-api.livekit.io/api/project/{projectId}/sessions
• Required query params:
◦ start (YYYY-MM-DD)
◦ end (YYYY-MM-DD)
◦ limit (page size)
◦ page (0-based)
• Minimal curl example:
curl -H "Authorization: Bearer $TOKEN" \
"<https://cloud-api.livekit.io/api/project/p_abc123/sessions?start=2024-01-12&end=2024-01-13&page=0&limit=100>"
Response items include sessionId, roomName, `createdAt`/`endedAt`, numParticipants, `bandwidthIn`/`bandwidthOut`, etc.
Get detailed session info (durations & participants)
• Endpoint:
GET https://cloud-api.livekit.io/api/project/{projectId}/sessions/{sessionId}
• Minimal curl example:
curl -H "Authorization: Bearer $TOKEN" \
"<https://cloud-api.livekit.io/api/project/p_abc123/sessions/sess_xyz789>"
Important fields in the response:
• startTime, endTime → compute session duration
• connectionMinutes → billable connection time
• participants[] entries with participantIdentity, participantName, joinedAt, leftAt, device/os/browser, publishedSources, location/network, and SIP metadata when present
Notes & tips
• The Analytics API is available only on the Scale plan or higher.
• Query results are paged with limit and page.
• For per-participant duration, use each participant’s `joinedAt`/`leftAt`.
• SIP-specific fields (call status, phoneNumber, trunkID) appear in participant attributes for SIP sessions.
Would you like a ready-to-run script (curl or Node.js) that lists sessions for a date range and then fetches details for each session?
Sources: Analytics API | LiveKit docs