Skip to main content
GET
/
ai
/
assistants
/
{assistant_id}
/
scheduled_events
/
{event_id}
JavaScript
import Telnyx from 'telnyx';

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

const scheduledEventResponse = await client.ai.assistants.scheduledEvents.retrieve('event_id', {
  assistant_id: 'assistant_id',
});

console.log(scheduledEventResponse);
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
scheduled_event_response = client.ai.assistants.scheduled_events.retrieve(
event_id="event_id",
assistant_id="assistant_id",
)
print(scheduled_event_response)
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"),
)
scheduledEventResponse, err := client.AI.Assistants.ScheduledEvents.Get(
context.TODO(),
"event_id",
telnyx.AIAssistantScheduledEventGetParams{
AssistantID: "assistant_id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", scheduledEventResponse)
}
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.ScheduledEventResponse;
import com.telnyx.sdk.models.ai.assistants.scheduledevents.ScheduledEventRetrieveParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

ScheduledEventRetrieveParams params = ScheduledEventRetrieveParams.builder()
.assistantId("assistant_id")
.eventId("event_id")
.build();
ScheduledEventResponse scheduledEventResponse = client.ai().assistants().scheduledEvents().retrieve(params);
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

scheduled_event_response = telnyx.ai.assistants.scheduled_events.retrieve("event_id", assistant_id: "assistant_id")

puts(scheduled_event_response)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
$scheduledEventResponse = $client->ai->assistants->scheduledEvents->retrieve(
'event_id', assistantID: 'assistant_id'
);

var_dump($scheduledEventResponse);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx ai:assistants:scheduled-events retrieve \
--api-key 'My API Key' \
--assistant-id assistant_id \
--event-id event_id
curl --request GET \
--url https://api.telnyx.com/v2/ai/assistants/{assistant_id}/scheduled_events/{event_id} \
--header 'Authorization: Bearer <token>'
{
  "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

Authorization
string
header
required

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

Path Parameters

assistant_id
string
required

Unique identifier of the assistant.

event_id
string
required

Unique identifier of the event.

Response

Successful Response

Union type for different scheduled event response types

telnyx_conversation_channel
enum<string>
required
Available options:
phone_call,
sms_chat
telnyx_end_user_target
string
required
telnyx_agent_target
string
required
scheduled_at_fixed_datetime
string<date-time>
required
assistant_id
string
required
retry_count
integer
default:0
retry_attempts
integer
scheduled_event_id
string
conversation_id
string
created_at
string<date-time>
status
enum<string>
default:pending
Available options:
pending,
in_progress,
completed,
failed
conversation_metadata
Conversation Metadata · object
dynamic_variables
Dynamic Variables · object

A map of dynamic variable names to values. These variables can be referenced in the assistant's instructions and messages using {{variable_name}} syntax.

errors
string[]
call_status
string

Values: busy, canceled, no-answer, ringing, completed, failed, in-progress

call_duration
integer

Duration of the call in seconds

max_retries_client_errors
integer
default:0

Configure number of retries on client errors: busy, no-answer, failed, canceled (caller hung up before the callee answered)

retry_interval_secs
integer
call_attempts
AssistantScheduledCallAttempt · object[]
dispatched_at
string<date-time>

Date time at which call was sent

call_settings
ScheduledCallSettings · object

Per-call telephony overrides applied when a scheduled phone-call event dispatches. Phone-call events only. New per-call dispatch options should be added here rather than as top-level event fields.