Check out our upcoming events and meetups! View events →
Create a scheduled event for an assistant
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.create('assistant_id', {
scheduled_at_fixed_datetime: '2025-04-15T13:07:28.764Z',
telnyx_agent_target: 'telnyx_agent_target',
telnyx_conversation_channel: 'phone_call',
telnyx_end_user_target: 'telnyx_end_user_target',
});
console.log(scheduledEventResponse);{
"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": {},
"dynamic_variables": {},
"errors": [
"<string>"
]
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
phone_call, sms_chat The phone number, SIP URI, to schedule the call or text to.
The phone number, SIP URI, to schedule the call or text from.
The datetime at which the event should be scheduled. Formatted as ISO 8601.
"2025-04-15T13:07:28.764Z"
Required for sms scheduled events. The text to be sent to the end user.
Metadata associated with the conversation. Telnyx provides several pieces of metadata, but customers can also add their own.
Show child attributes
A map of dynamic variable names to values. These variables can be referenced in the assistant's instructions and messages using {{variable_name}} syntax.
Show child attributes
Successful Response
Union type for different scheduled event response types
phone_call, sms_chat pending, in_progress, completed, failed Show child attributes
A map of dynamic variable names to values. These variables can be referenced in the assistant's instructions and messages using {{variable_name}} syntax.
Show child attributes
Was this page helpful?
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.create('assistant_id', {
scheduled_at_fixed_datetime: '2025-04-15T13:07:28.764Z',
telnyx_agent_target: 'telnyx_agent_target',
telnyx_conversation_channel: 'phone_call',
telnyx_end_user_target: 'telnyx_end_user_target',
});
console.log(scheduledEventResponse);{
"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": {},
"dynamic_variables": {},
"errors": [
"<string>"
]
}