import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const scheduledEvents = await client.ai.assistants.scheduledEvents.list('assistant_id');
console.log(scheduledEvents.data);{
"meta": {
"total_pages": 123,
"total_results": 123,
"page_number": 123,
"page_size": 123
},
"data": [
{
"telnyx_conversation_channel": "phone_call",
"telnyx_end_user_target": "<string>",
"telnyx_agent_target": "<string>",
"scheduled_at_fixed_datetime": "2023-11-07T05:31:56Z",
"assistant_id": "<string>",
"retry_count": 0,
"retry_attempts": 123,
"scheduled_event_id": "<string>",
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"status": "pending",
"conversation_metadata": {},
"errors": [
"<string>"
]
}
]
}Get scheduled events for an assistant with pagination and filtering
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const scheduledEvents = await client.ai.assistants.scheduledEvents.list('assistant_id');
console.log(scheduledEvents.data);{
"meta": {
"total_pages": 123,
"total_results": 123,
"page_number": 123,
"page_size": 123
},
"data": [
{
"telnyx_conversation_channel": "phone_call",
"telnyx_end_user_target": "<string>",
"telnyx_agent_target": "<string>",
"scheduled_at_fixed_datetime": "2023-11-07T05:31:56Z",
"assistant_id": "<string>",
"retry_count": 0,
"retry_attempts": 123,
"scheduled_event_id": "<string>",
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"status": "pending",
"conversation_metadata": {},
"errors": [
"<string>"
]
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
phone_call, sms_chat Successful Response
Show child attributes
phone_call, sms_chat pending, in_progress, completed, failed Was this page helpful?