Skip to main content
GET
/
ai
/
missions
/
events
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const missionListEventsResponse of client.ai.missions.listEvents()) {
  console.log(missionListEventsResponse.event_id);
}
{
  "data": [
    {
      "event_id": "<string>",
      "run_id": "<string>",
      "type": "status_change",
      "summary": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "step_id": "<string>",
      "agent_id": "<string>",
      "payload": {},
      "idempotency_key": "<string>"
    }
  ],
  "meta": {
    "total_pages": 123,
    "total_results": 123,
    "page_number": 123,
    "page_size": 123
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

type
string
page[number]
integer
default:1

Page number (1-based)

Required range: x >= 1
page[size]
integer
default:50

Number of items per page

Required range: 0 < x <= 1000

Response

Successful Response

data
EventData · object[]
required
meta
Meta · object
required