listEvents

View as MarkdownOpen in Claude

List events for a specific voice call. Events include state transitions (ringing, answered, ended), media events, and other call lifecycle data.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the log. This is the segment_id you can find in Relay call details in your Dashboard UI or in return objects when using the SDK.

Response

datalist of objectsRequired
Array of event entries for the log

Response Example

Response
1{
2 "data": [
3 {
4 "event_at": "2024-05-06T12:20:00Z",
5 "level": "info",
6 "name": "calling_call_initiated",
7 "details": {},
8 "project_id": "b7182dc2-00f3-40e4-a5ce-20f164b329df",
9 "log_id": "b7182dc2-00f3-40e4-a5ce-20f164b329df"
10 }
11 ]
12}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const events = await client.logs.voice.listEvents("voice-log-id");
10for (const event of events.data ?? []) {
11 console.log(event.type, event.timestamp);
12}