List scheduled events
Get scheduled events for an assistant with pagination and filtering
GET
/
ai
/
assistants
/
{assistant_id}
/
scheduled_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 scheduledEventListResponse of client.ai.assistants.scheduledEvents.list(
'assistant_id',
)) {
console.log(scheduledEventListResponse);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.ai.assistants.scheduled_events.list(
assistant_id="assistant_id",
)
page = page.data[0]
print(page)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.AI.Assistants.ScheduledEvents.List(
context.TODO(),
"assistant_id",
telnyx.AIAssistantScheduledEventListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.assistants.scheduledevents.ScheduledEventListPage;
import com.telnyx.sdk.models.ai.assistants.scheduledevents.ScheduledEventListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ScheduledEventListPage page = client.ai().assistants().scheduledEvents().list("assistant_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.ai.assistants.scheduled_events.list("assistant_id")
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\AI\Assistants\ScheduledEvents\ConversationChannelType;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$page = $client->ai->assistants->scheduledEvents->list(
'assistant_id',
conversationChannel: ConversationChannelType::PHONE_CALL,
fromDate: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
pageNumber: 0,
pageSize: 0,
toDate: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:assistants:scheduled-events list \
--api-key 'My API Key' \
--assistant-id assistant_idcurl --request GET \
--url https://api.telnyx.com/v2/ai/assistants/{assistant_id}/scheduled_events \
--header 'Authorization: Bearer <token>'{
"meta": {
"total_pages": 123,
"total_results": 123,
"page_number": 123,
"page_size": 123
},
"data": [
{
"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": {},
"dynamic_variables": {},
"errors": [
"<string>"
],
"call_status": "<string>",
"call_duration": 123,
"max_retries_client_errors": 0,
"retry_interval_secs": 123,
"call_attempts": [
{
"attempt_number": 123,
"attempted_at": "2023-11-07T05:31:56Z",
"call_status": "<string>",
"call_duration": 123,
"telnyx_call_control_id": "<string>"
}
],
"dispatched_at": "2023-11-07T05:31:56Z",
"call_settings": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the assistant.
Query Parameters
Start of the date range filter (inclusive, ISO 8601).
End of the date range filter (inclusive, ISO 8601).
Filter results by conversation channel.
Available options:
phone_call, sms_chat Consolidated page parameter (deepObject style). Originally: page[size], page[number]
Show child attributes
Show child attributes
Was this page helpful?
⌘I
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 scheduledEventListResponse of client.ai.assistants.scheduledEvents.list(
'assistant_id',
)) {
console.log(scheduledEventListResponse);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.ai.assistants.scheduled_events.list(
assistant_id="assistant_id",
)
page = page.data[0]
print(page)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.AI.Assistants.ScheduledEvents.List(
context.TODO(),
"assistant_id",
telnyx.AIAssistantScheduledEventListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.assistants.scheduledevents.ScheduledEventListPage;
import com.telnyx.sdk.models.ai.assistants.scheduledevents.ScheduledEventListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ScheduledEventListPage page = client.ai().assistants().scheduledEvents().list("assistant_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.ai.assistants.scheduled_events.list("assistant_id")
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\AI\Assistants\ScheduledEvents\ConversationChannelType;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$page = $client->ai->assistants->scheduledEvents->list(
'assistant_id',
conversationChannel: ConversationChannelType::PHONE_CALL,
fromDate: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
pageNumber: 0,
pageSize: 0,
toDate: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:assistants:scheduled-events list \
--api-key 'My API Key' \
--assistant-id assistant_idcurl --request GET \
--url https://api.telnyx.com/v2/ai/assistants/{assistant_id}/scheduled_events \
--header 'Authorization: Bearer <token>'{
"meta": {
"total_pages": 123,
"total_results": 123,
"page_number": 123,
"page_size": 123
},
"data": [
{
"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": {},
"dynamic_variables": {},
"errors": [
"<string>"
],
"call_status": "<string>",
"call_duration": 123,
"max_retries_client_errors": 0,
"retry_interval_secs": 123,
"call_attempts": [
{
"attempt_number": 123,
"attempted_at": "2023-11-07T05:31:56Z",
"call_status": "<string>",
"call_duration": 123,
"telnyx_call_control_id": "<string>"
}
],
"dispatched_at": "2023-11-07T05:31:56Z",
"call_settings": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}