@datafire/telnyx v3.0.0
@datafire/telnyx
Client library for Telnyx API
Installation and Usage
npm install --save @datafire/telnyx
let telnyx = require('@datafire/telnyx').create({
BearerAuth: "",
bearerAuth: ""
});
.then(data => {
console.log(data);
});
Description
SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
Actions
DeleteBulkTelephonyCredential
Delete several credentials in bulk.
telnyx.DeleteBulkTelephonyCredential({
"filter[tag]": ""
}, context)
Input
- input
object
- filtertag required
string
: Filter by tag, required by bulk operations.
- filtertag required
Output
- output
object
- data
object
- credentials
integer
: Amount of credentials affected
- credentials
- data
UpdateBulkTelephonyCredential
Update several credentials in bulk.
telnyx.UpdateBulkTelephonyCredential({
"filter[tag]": "",
"body": {
"tag": "",
"connection_id": ""
}
}, context)
Input
- input
object
- filtertag required
string
: Filter by tag, required by bulk operations. - body required BulkCredentialRequest
- filtertag required
Output
- output
object
- data
object
- credentials
integer
: Amount of credentials affected
- credentials
- data
CreateBulkTelephonyCredential
Creates several credentials in bulk.
telnyx.CreateBulkTelephonyCredential({
"body": {
"tag": "",
"connection_id": ""
}
}, context)
Input
- input
object
- body required BulkCredentialRequest
Output
- output
object
- data
object
- credentials
integer
: Amount of credentials affected
- credentials
- data
BulkSIMCardNetworkPreferences
This API allows dispatching the same operation described for the PUT sim_cards/:sim_card_id/network_preferences API for multiple SIM cards at once. Although, a SIM card network preference may fail individually under any validation triggered as a consequence of its state. For example, a SIM can't have an in-progress OTA update for applying a Network Preference, so they'll fail when requested in this API. In that scenario, the specific error will be present in the response along with the successful definitions in the "errors" response node.
telnyx.BulkSIMCardNetworkPreferences({}, context)
Input
- input
object
- body
object
- mobile_operator_networks_preferences MobileOperatorNetworksPreferencesRequest
- sim_card_ids
array
- items
string
- items
- body
Output
- output
object
- data
array
: Multi requested SIM cards network preferences. - errors
array
- items Error
- data
SimCardRegister
Register the SIM cards associated with the provided registration codes to the current user's account. If sim_card_group_id is provided, the SIM cards will be associated with that group. Otherwise, the default group for the current user, which is already data-enabled, will be used.
telnyx.SimCardRegister({
"body": {}
}, context)
Input
- input
object
- body required SIMCardRegistration
Output
- output
object
- data
array
: Successfully registered SIM cards.- items SimpleSIMCard
- errors
array
- items Error
- data
BulkCredentialAction
Perform activate or deactivate action on all credentials filtered by the provided tag. Activate action will change the status to active, making it possible to connect calls with the credential. Deactivate action will change the status to inactive, making it impossible to connect calls with the credential.
telnyx.BulkCredentialAction({
"action": "",
"filter[tag]": ""
}, context)
Input
- input
object
- action required
string
(values: activate, deactivate): Identifies the action to be taken. Activate will change the status to active. Deactivate will change the status to inactive. - filtertag required
string
: Filter by tag, required by bulk operations.
- action required
Output
- output
object
- data
object
- credentials
integer
: Amount of credentials affected
- credentials
- data
findAddresss
Returns a list of your addresses.
telnyx.findAddresss({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filtercustomer_reference
string
: Filter addresses via the customer reference set. Matching is not case-sensitive. - filtercustomer_reference
string
: If present, addresses with customer_reference containing the given value will be returned. Matching is not case-sensitive. - filterstreet_address
string
: If present, addresses with street_address containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. - filteraddress_book
string
: If present, only returns results with the address_book flag set to the given value. - sort
string
(values: created_at, first_name, last_name, business_name, street_address): Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.
- pagenumber
Output
- output
object
- data
array
- items Address
- meta PaginationMeta
- data
CreateAddress
Creates an address.
telnyx.CreateAddress({
"body": {
"first_name": "",
"last_name": "",
"business_name": "",
"street_address": "",
"locality": "",
"country_code": ""
}
}, context)
Input
- input
object
- body required AddressCreate
Output
- output
object
- data Address
validateAddress
Validates an address for emergency services.
telnyx.validateAddress({
"body": {
"country_code": "",
"street_address": "",
"locality": "",
"postal_code": "",
"administrative_area": ""
}
}, context)
Input
- input
object
- body required ValidateAddressRequest
Output
- output
object
DeleteAddress
Deletes an existing address.
telnyx.DeleteAddress({
"id": ""
}, context)
Input
- input
object
- id required
string
: address ID
- id required
Output
- output
object
- data Address
getAddress
Retrieves the details of an existing address.
telnyx.getAddress({
"id": ""
}, context)
Input
- input
object
- id required
string
: address ID
- id required
Output
- output
object
- data Address
listAvailablePhoneNumbers
List available phone numbers
telnyx.listAvailablePhoneNumbers({}, context)
Input
- input
object
- filterphone_number
string
: Filter numbers starting with a pattern (meant to be used afternational_destination_code
filter has been set). - filterphone_number
string
: Filter numbers ending with a pattern. - filterphone_number
string
: Filter numbers containing a pattern. - filterlocality
string
: Filter phone numbers by city. - filteradministrative_area
string
: Filter phone numbers by US state/CA province. - filtercountry_code
string
: Filter phone numbers by ISO alpha-2 country code. - filternational_destination_code
string
: Filter by the national destination code of the number. This filter is only applicable to North American numbers. - filterrate_center
string
: Filter phone numbers by NANP rate center. This filter is only applicable to North American numbers. - filternumber_type
string
(values: toll-free, national, mobile, local): Filter phone numbers by number type. - filterfeatures
array
: Filter if the phone number should be used for voice, fax, mms, sms, emergency. - filterlimit
integer
: Limits the number of results. - filterbest_effort
boolean
: Filter to determine if best effort results should be included. - filterquickship
boolean
: Filter to exclude phone numbers that need additional time after to purchase to receive phone calls. - filterreservable
boolean
: Filter to exclude phone numbers that cannot be reserved before purchase.
- filterphone_number
Output
- output
object
- data
array
- items AvailablePhoneNumber
- meta AvailablePhoneNumbersMetadata
- data
getUserBalance
Retrieve user balance details
telnyx.getUserBalance(null, context)
Input
This action has no parameters
Output
- output
object
- data UserBalance
listBillingGroups
List all billing groups
telnyx.listBillingGroups({}, context)
Input
Output
- output
object
- data
array
- items BillingGroup
- meta PaginationMeta
- data
createBillingGroup
Create a billing group
telnyx.createBillingGroup({
"body": null
}, context)
Input
- input
object
- body required NewBillingGroup
Output
- output
object
- data BillingGroup
deleteBillingGroup
Delete a billing group
telnyx.deleteBillingGroup({
"id": ""
}, context)
Input
- input
object
- id required
string
: The id of the billing group
- id required
Output
- output
object
- data BillingGroup
retrieveBillingGroup
Retrieve a billing group
telnyx.retrieveBillingGroup({
"id": ""
}, context)
Input
- input
object
- id required
string
: The id of the billing group
- id required
Output
- output
object
- data BillingGroup
updateBillingGroup
Update a billing group
telnyx.updateBillingGroup({
"id": "",
"body": null
}, context)
Input
- input
object
- id required
string
: The id of the billing group - body required UpdateBillingGroup
- id required
Output
- output
object
- data BillingGroup
listCallControlApplications
Return a list of call control applications.
telnyx.listCallControlApplications({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filterapplication_name
string
: If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. - filteroutbound.outbound_voice_profile_id
string
: Identifies the associated outbound voice profile. - sort
string
(values: created_at, connection_name, active): Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.
- pagenumber
Output
- output
object
- data
array
- items CallControlApplication
- meta PaginationMeta
- data
createCallControlApplication
Create a call control application.
telnyx.createCallControlApplication({
"body": {
"application_name": "",
"webhook_event_url": ""
}
}, context)
Input
- input
object
- body required CreateCallControlApplicationRequest
Output
- output
object
deleteCallControlApplication
Deletes a call control application.
telnyx.deleteCallControlApplication({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the resource.
- id required
Output
- output
object
retrieveCallControlApplication
Retrieves the details of an existing call control application.
telnyx.retrieveCallControlApplication({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the resource.
- id required
Output
- output
object
updateCallControlApplication
Updates settings of an existing call control application.
telnyx.updateCallControlApplication({
"id": "",
"body": {
"application_name": "",
"webhook_event_url": ""
}
}, context)
Input
- input
object
- id required
string
: Identifies the resource. - body required UpdateCallControlApplicationRequest
- id required
Output
- output
object
listCallEvents
Filters call events by given filter parameters. Events are ordered by event_timestamp
. If filter for call_leg_id
or call_session_id
is not present, it only filters events from the last 24 hours.
Note: Only one filter[event_timestamp]
can be passed.
telnyx.listCallEvents({}, context)
Input
- input
object
- filtercall_leg_id
string
: The unique identifier of an individual call leg. - filtercall_session_id
string
: The unique identifier of the call control session. A session may include multiple call leg events. - filterstatus
string
(values: delivered, failed): Event status - filtertype
string
(values: command, webhook): Event type - filterevent_timestamp
string
: Event timestamp: greater than - filterevent_timestamp
string
: Event timestamp: greater than or equal - filterevent_timestamp
string
: Event timestamp: lower than - filterevent_timestamp
string
: Event timestamp: lower than or equal - filterevent_timestamp
string
: Event timestamp: equal - pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page
- filtercall_leg_id
Output
- output
object
- data
array
- items CallEvent
- meta PaginationMeta
- data
callDial
Dial a number or SIP URI from a given connection. A successful response will include a call_leg_id
which can be used to correlate the command with subsequent webhooks.
Expected Webhooks:
call.initiated
call.answered
orcall.hangup
call.machine.detection.ended
ifanswering_machine_detection
was requestedcall.machine.greeting.ended
ifanswering_machine_detection
was set todetect_beep
,greeting_end
ordetect_words
telnyx.callDial({
"body": {
"connection_id": "",
"to": "",
"from": ""
}
}, context)
Input
- input
object
- body required CallRequest
Output
- output
object
- data Call
retrieveCallStatus
Returns the status of a call (data is available 10 minutes after call ended).
telnyx.retrieveCallStatus({
"call_control_id": ""
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call
- call_control_id required
Output
- output
object
- data Call
callAnswer
Answer an incoming call. You must issue this command before executing subsequent commands on an incoming call.
Expected Webhooks:
call.answered
telnyx.callAnswer({
"call_control_id": "",
"body": {}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required AnswerRequest
- call_control_id required
Output
- output
object
callBridge
Bridge two call control calls.
Expected Webhooks:
call.bridged
for Leg Acall.bridged
for Leg B
telnyx.callBridge({
"call_control_id": "",
"body": {
"call_control_id": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required BridgeRequest
- call_control_id required
Output
- output
object
callForkStart
Call forking allows you to stream the media from a call to a specific target in realtime.
This stream can be used to enable realtime audio analysis to support a
variety of use cases, including fraud detection, or the creation of AI-generated audio responses.
Requests must specify either the target
attribute or the rx
and tx
attributes.
Expected Webhooks:
call.fork.started
call.fork.stopped
Simple Telnyx RTP Encapsulation Protocol (STREP)
Note: This header/encapsulation is not used when the rx
and tx
parameters have been specified; it only applies when media is forked
using the target
attribute.
If the destination for forked media is specified using the "target"
attribute, the RTP will be encapsulated in an extra Telnyx protocol,
which adds a 24 byte header to the RTP payload in each packet. The STREP
header includes the Call Control call_leg_id
for stream
identification, along with bits that represent the direction (inbound or
outbound) of the media. This 24-byte header sits between the UDP header
and the RTP header.
The STREP header makes it possible to fork RTP for multiple calls (or two RTP streams for the same call) to the same IP:port, where the streams can be demultiplexed by your application using the information in the header. Of course, it's still possible to ignore this header completely, for example, if sending forked media for different calls to different ports or IP addresses. In this case, simply strip 24 bytes (or use the second byte to find the header length) from the received UDP payload to get the RTP (RTP header and payload).
STREP Specification
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1|Version|L|D| HeaderLen | reserved (2 bytes) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| reserved (4 bytes, for UDP ports or anything else) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| The call_leg_id |
| from Call Control |
| (128 bits / 16 bytes) |
| (this is binary data) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11
Static bits 11, always set to 11 to easily distinguish forked media
from RTP (10) and T.38 media (usually 00) and SIP (which begins
with a capital letter, so begins with bits 01). This is a magic number.
Version
Four bits to indicate the version number of the protocol, starting at 0001.
L
One bit to represent the leg of the call (A or B).
0 represents the A (first) leg of the call.
1 represents the B (second) leg of the call.
D
One bit to represent the direction of this RTP stream.
0 represents media received by Telnyx.
1 represents media transmitted by Telnyx.
HeaderLen (1 byte)
The length of the header in bytes.
Note that this value does not include the length of the payload. The total
size of the RTP can be calculated by subtracting the HeaderLen from the UDP
length (minus 8 for the UDP header).
In version 1, this value will always be 24.
Reserved (6 bytes)
Reserved for future use and to make sure that the header is a multiple of 32 bits
Call Leg ID
A 128-bit identifier for the call leg.
This is the call_leg_id from Call Control.
telnyx.callForkStart({
"call_control_id": "",
"body": {}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required StartForkingRequest
- call_control_id required
Output
- output
object
callForkStop
Stop forking a call.
Expected Webhooks:
call.fork.stopped
telnyx.callForkStop({
"call_control_id": "",
"body": {}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required StopForkingRequest
- call_control_id required
Output
- output
object
callGatherStop
Stop current gather.
Expected Webhooks:
call.gather.ended
telnyx.callGatherStop({
"call_control_id": "",
"body": {}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required StopGatherRequest
- call_control_id required
Output
- output
object
callGatherUsingAudio
Play an audio file on the call until the required DTMF signals are gathered to build interactive menus.
You can pass a list of valid digits along with an 'invalid_audio_url', which will be played back at the beginning of each prompt. Playback will be interrupted when a DTMF signal is received. The Answer command must be issued before the gather_using_audio
command.
Expected Webhooks:
call.playback.started
call.playback.ended
call.dtmf.received
(you may receive many of these webhooks)call.gather.ended
telnyx.callGatherUsingAudio({
"call_control_id": "",
"body": {
"audio_url": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required GatherUsingAudioRequest
- call_control_id required
Output
- output
object
callGatherUsingSpeak
Convert text to speech and play it on the call until the required DTMF signals are gathered to build interactive menus.
You can pass a list of valid digits along with an 'invalid_payload', which will be played back at the beginning of each prompt. Speech will be interrupted when a DTMF signal is received. The Answer command must be issued before the gather_using_speak
command.
Expected Webhooks:
call.dtmf.received
(you may receive many of these webhooks)call.gather.ended
telnyx.callGatherUsingSpeak({
"call_control_id": "",
"body": {
"voice": "",
"language": "",
"payload": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required GatherUsingSpeakRequest
- call_control_id required
Output
- output
object
callHangup
Hang up the call.
Expected Webhooks:
call.hangup
call.recording.saved
telnyx.callHangup({
"call_control_id": "",
"body": {}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required HangupRequest
- call_control_id required
Output
- output
object
callPlaybackStart
Play an audio file on the call. If multiple play audio commands are issued consecutively, the audio files will be placed in a queue awaiting playback.
Notes:
- When
overlay
is enabled,loop
is limited to 1, andtarget_legs
is limited toself
. - A customer cannot Play Audio with
overlay=true
unless there is a Play Audio withoverlay=false
actively playing.
Expected Webhooks:
call.playback.started
call.playback.ended
telnyx.callPlaybackStart({
"call_control_id": "",
"body": {
"audio_url": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required PlayAudioUrlRequest
- call_control_id required
Output
- output
object
callPlaybackStop
Stop audio being played on the call.
Expected Webhooks:
call.playback.ended
orcall.speak.ended
telnyx.callPlaybackStop({
"call_control_id": "",
"body": {}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required PlaybackStopRequest
- call_control_id required
Output
- output
object
callRecordPause
Pause recording the call. Recording can be resumed via Resume recording command.
Expected Webhooks:
There are no webhooks associated with this command.
telnyx.callRecordPause({
"call_control_id": "",
"body": {}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required PauseRecordingRequest
- call_control_id required
Output
- output
object
callRecordResume
Resume recording the call.
Expected Webhooks:
There are no webhooks associated with this command.
telnyx.callRecordResume({
"call_control_id": "",
"body": {}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required ResumeRecordingRequest
- call_control_id required
Output
- output
object
callRecordStart
Start recording the call. Recording will stop on call hang-up, or can be initiated via the Stop Recording command.
Expected Webhooks:
call.recording.saved
telnyx.callRecordStart({
"call_control_id": "",
"body": {
"format": "",
"channels": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required StartRecordingRequest
- call_control_id required
Output
- output
object
callRecordStop
Stop recording the call.
Expected Webhooks:
call.recording.saved
telnyx.callRecordStop({
"call_control_id": "",
"body": {}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required StopRecordingRequest
- call_control_id required
Output
- output
object
callRefer
Initiate a SIP Refer on a Call Control call. You can initiate a SIP Refer at any point in the duration of a call.
Expected Webhooks:
call.refer.started
call.refer.completed
call.refer.failed
telnyx.callRefer({
"call_control_id": "",
"body": {
"sip_address": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required ReferRequest
- call_control_id required
Output
- output
object
callReject
Reject an incoming call.
Expected Webhooks:
call.hangup
telnyx.callReject({
"call_control_id": "",
"body": {
"cause": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required RejectRequest
- call_control_id required
Output
- output
object
callSendDTMF
Sends DTMF tones from this leg. DTMF tones will be heard by the other end of the call.
Expected Webhooks:
There are no webhooks associated with this command.
telnyx.callSendDTMF({
"call_control_id": "",
"body": {
"digits": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required SendDTMFRequest
- call_control_id required
Output
- output
object
callSpeak
Convert text to speech and play it back on the call. If multiple speak text commands are issued consecutively, the audio files will be placed in a queue awaiting playback.
Expected Webhooks:
call.speak.started
call.speak.ended
telnyx.callSpeak({
"call_control_id": "",
"body": {
"payload": "",
"voice": "",
"language": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required SpeakRequest
- call_control_id required
Output
- output
object
callTransfer
Transfer a call to a new destination. If the transfer is unsuccessful, a call.hangup
webhook for the other call (Leg B) will be sent indicating that the transfer could not be completed. The original call will remain active and may be issued additional commands, potentially transfering the call to an alternate destination.
Expected Webhooks:
call.initiated
call.bridged
to Leg Bcall.answered
orcall.hangup
call.machine.detection.ended
ifanswering_machine_detection
was requestedcall.machine.greeting.ended
ifanswering_machine_detection
was set todetect_beep
,greeting_end
ordetect_words
telnyx.callTransfer({
"call_control_id": "",
"body": {
"to": ""
}
}, context)
Input
- input
object
- call_control_id required
string
: Unique identifier and token for controlling the call - body required TransferCallRequest
- call_control_id required
Output
- output
object
listConferences
Lists conferences. Conferences are created on demand, and will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. Conferences are listed in descending order by expires_at
.
telnyx.listConferences({}, context)
Input
- input
object
Output
- output
object
- data
array
- items Conference
- meta PaginationMeta
- data
createConference
Create a conference from an existing call leg using a call_control_id
and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants.
Expected Webhooks:
conference.created
conference.participant.joined
conference.participant.left
conference.ended
conference.recording.saved
telnyx.createConference({
"body": {
"call_control_id": "",
"name": ""
}
}, context)
Input
- input
object
- body required CreateConferenceRequest
Output
- output
object
- data Conference
listConferenceParticipants
Lists conference participants
telnyx.listConferenceParticipants({
"conference_id": ""
}, context)
Input
- input
object
- conference_id required
string
: Uniquely identifies the conference by id or name - filtermuted
boolean
: If present, participants will be filtered to those who are/are not muted - filteron_hold
boolean
: If present, participants will be filtered to those who are/are not put on hold - filterwhispering
boolean
: If present, participants will be filtered to those who are whispering or are not - pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page
- conference_id required
Output
- output
object
- data
array
- items Participant
- meta PaginationMeta
- data
retrieveConference
Retrieve an existing conference
telnyx.retrieveConference({
"id": ""
}, context)
Input
- input
object
- id required
string
: Uniquely identifies the conference by id or name
- id required
Output
- output
object
- data Conference
conferenceDialParticipantIn
Dials a phone number and, when the call is answered, automatically joins them into the specified conference.
Expected Webhooks:
call.hangup
call.answered
conference.participant.joined
conference.participant.left
telnyx.conferenceDialParticipantIn({
"id": "",
"body": {
"call_control_id": "",
"from": "",
"to": ""
}
}, context)
Input
- input
object
- id required
string
: Uniquely identifies the conference by id or name - body required ConferenceCallRequest
- id required
Output
- output
object
conferenceHoldParticipants
Hold a list of participants in a conference call
telnyx.conferenceHoldParticipants({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: Uniquely identifies the conference by id or name - body required ConferenceHoldRequest
- id required
Output
- output
object
conferenceJoin
Join an existing call leg to a conference. Issue the Join Conference command with the conference ID in the path and the call_control_id
of the leg you wish to join to the conference as an attribute.
Expected Webhooks:
conference.participant.joined
conference.participant.left
telnyx.conferenceJoin({
"id": "",
"body": {
"call_control_id": ""
}
}, context)
Input
- input
object
- id required
string
: Uniquely identifies the conference by id or name - body required JoinConferenceRequest
- id required
Output
- output
object
conferenceMuteParticipants
Mute a list of participants in a conference call
telnyx.conferenceMuteParticipants({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: Uniquely identifies the conference by id or name - body required ConferenceMuteRequest
- id required
Output
- output
object
conferencePlayAudio
Play audio to all or some participants on a conference call.
telnyx.conferencePlayAudio({
"id": "",
"body": {
"audio_url": ""
}
}, context)
Input
- input
object
- id required
string
: Uniquely identifies the conference by id or name - body required ConferencePlayRequest
- id required
Output
- output
object
conferenceStartRecording
Start recording the conference. Recording will stop on conference end, or via the Stop Recording command.
Expected Webhooks:
conference.recording.saved
telnyx.conferenceStartRecording({
"id": "",
"body": {
"format": "",
"channels": ""
}
}, context)
Input
- input
object
- id required
string
: Specifies the conference to record by id or name - body required StartRecordingRequest
- id required
Output
- output
object
conferenceStopRecording
Stop recording the conference.
Expected Webhooks:
conference.recording.saved
telnyx.conferenceStopRecording({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: Specifies the conference to stop the recording for by id or name - body required StopRecordingRequest
- id required
Output
- output
object
conferenceSpeakText
Convert text to speech and play it to all or some participants.
telnyx.conferenceSpeakText({
"id": "",
"body": {
"payload": "",
"voice": "",
"language": ""
}
}, context)
Input
- input
object
- id required
string
: Specifies the conference by id or name - body required ConferenceSpeakRequest
- id required
Output
- output
object
conferenceUnholdParticipants
Unhold a list of participants in a conference call
telnyx.conferenceUnholdParticipants({
"id": "",
"body": {
"call_control_ids": []
}
}, context)
Input
- input
object
- id required
string
: Uniquely identifies the conference by id or name - body required ConferenceUnholdRequest
- id required
Output
- output
object
conferenceUnmuteParticipants
Unmute a list of participants in a conference call
telnyx.conferenceUnmuteParticipants({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: Uniquely identifies the conference by id or name - body required ConferenceUnmuteRequest
- id required
Output
- output
object
listConnections
Returns a list of your connections irrespective of type.
telnyx.listConnections({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filterconnection_name
string
: If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. - filteroutbound_voice_profile_id
string
: Identifies the associated outbound voice profile. - sort
string
(values: created_at, connection_name, active): Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.
- pagenumber
Output
- output
object
- data
array
- items Connection
- meta PaginationMeta
- data
retrieveConnection
Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type.
telnyx.retrieveConnection({
"id": ""
}, context)
Input
- input
object
- id required
string
: IP Connection ID
- id required
Output
- output
object
- data Connection
listCredentialConnections
Returns a list of your credential connections.
telnyx.listCredentialConnections({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filterconnection_name
string
: If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. - filteroutbound.outbound_voice_profile_id
string
: Identifies the associated outbound voice profile. - sort
string
(values: created_at, connection_name, active): Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.
- pagenumber
Output
- output
object
- data
array
- items CredentialConnection
- meta PaginationMeta
- data
createCredentialConnection
Creates a credential connection.
telnyx.createCredentialConnection({
"body": {}
}, context)
Input
- input
object
- body required CreateCredentialConnectionRequest
Output
- output
object
- data CredentialConnection
deleteCredentialConnection
Deletes an existing credential connection.
telnyx.deleteCredentialConnection({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the resource.
- id required
Output
- output
object
- data CredentialConnection
retrieveCredentialConnection
Retrieves the details of an existing credential connection.
telnyx.retrieveCredentialConnection({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the resource.
- id required
Output
- output
object
- data CredentialConnection
updateCredentialConnection
Updates settings of an existing credential connection.
telnyx.updateCredentialConnection({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: Identifies the resource. - body required UpdateCredentialConnectionRequest
- id required
Output
- output
object
- data CredentialConnection
listFaxApplications
This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx.
telnyx.listFaxApplications({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filterapplication_name
string
: If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. - filteroutbound.outbound_voice_profile_id
string
: Identifies the associated outbound voice profile. - sort
string
(values: created_at, connection_name, active): Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.
- pagenumber
Output
- output
object
- data
array
- items FaxApplication
- meta PaginationMeta
- data
CreateFaxApplication
Creates a new Fax Application based on the parameters sent in the request. The application name and webhook URL are required. Once created, you can assign phone numbers to your application using the /phone_numbers
endpoint.
telnyx.CreateFaxApplication({
"body": {
"application_name": "",
"webhook_event_url": ""
}
}, context)
Input
- input
object
- body required CreateFaxApplicationRequest
Output
- output
object
- data FaxApplication
DeleteFaxApplication
Permanently deletes a Fax Application. Deletion may be prevented if the application is in use by phone numbers.
telnyx.DeleteFaxApplication({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the resource.
- id required
Output
- output
object
- data FaxApplication
getFaxApplication
Return the details of an existing Fax Application inside the 'data' attribute of the response.
telnyx.getFaxApplication({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the resource.
- id required
Output
- output
object
- data FaxApplication
UpdateFaxApplication
Updates settings of an existing Fax Application based on the parameters of the request.
telnyx.UpdateFaxApplication({
"id": "",
"body": {
"application_name": "",
"webhook_event_url": ""
}
}, context)
Input
- input
object
- id required
string
: Identifies the resource. - body required UpdateFaxApplicationRequest
- id required
Output
- output
object
- data FaxApplication
ListFaxes
View a list of faxes
telnyx.ListFaxes({}, context)
Input
- input
object
- filtercreated_at
string
: ISO 8601 date time for filtering faxes created after or on that date - filtercreated_at
string
: ISO 8601 date time for filtering faxes created after that date - filtercreated_at
string
: ISO 8601 formatted date time for filtering faxes created on or before that date - filtercreated_at
string
: ISO 8601 formatted date time for filtering faxes created before that date - filterdirection
string
: The direction, inbound or outbound, for filtering faxes sent from this account - filterfrom
string
: The phone number, in E.164 format for filtering faxes sent from this number - pagesize
integer
: Number of fax resourcxes for the single page returned - pagenumber
integer
: Number of the page to be retrieved
- filtercreated_at
Output
- output
object
- data
array
- items Fax
- meta
object
- data
SendFax
Send a fax
telnyx.SendFax({
"body": {
"connection_id": "",
"media_url": "",
"to": ""
}
}, context)
Input
- input
object
- body required SendFaxRequest
Output
- output
object
- data Fax
DeleteFax
Delete a fax
telnyx.DeleteFax({
"id": ""
}, context)
Input
- input
object
- id required
string
: The unique identifier of a fax.
- id required
Output
Output schema unknown
ViewFax
View a fax
telnyx.ViewFax({
"id": ""
}, context)
Input
- input
object
- id required
string
: The unique identifier of a fax.
- id required
Output
- output
object
- data Fax
listFqdnConnections
Returns a list of your FQDN connections.
telnyx.listFqdnConnections({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filterconnection_name
string
: If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. - sort
string
(values: created_at, connection_name, active): Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.
- pagenumber
Output
- output
object
- data
array
- items FqdnConnection
- meta PaginationMeta
- data
createFqdnConnection
Creates a FQDN connection.
telnyx.createFqdnConnection({
"body": null
}, context)
Input
- input
object
- body required CreateFqdnConnectionRequest
Output
- output
object
- data FqdnConnection
deleteFqdnConnection
Deletes an FQDN connection.
telnyx.deleteFqdnConnection({
"id": ""
}, context)
Input
- input
object
- id required
string
: FQDN Connection ID
- id required
Output
- output
object
- data FqdnConnection
retrieveFqdnConnection
Retrieves the details of an existing FQDN connection.
telnyx.retrieveFqdnConnection({
"id": ""
}, context)
Input
- input
object
- id required
string
: FQDN Connection ID
- id required
Output
- output
object
- data FqdnConnection
updateFqdnConnection
Updates settings of an existing FQDN connection.
telnyx.updateFqdnConnection({
"id": "",
"body": null
}, context)
Input
- input
object
- id required
string
: FQDN Connection ID - body required UpdateFqdnConnectionRequest
- id required
Output
- output
object
- data FqdnConnection
listFqdns
Get all FQDNs belonging to the user that match the given filters.
telnyx.listFqdns({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filterconnection_id
string
: ID of the FQDN connection to which the FQDN belongs. - filterfqdn
string
: FQDN represented by the resource. - filterport
integer
: Port to use when connecting to the FQDN. - filterdns_record_type
string
: DNS record type used by the FQDN.
- pagenumber
Output
- output
object
- data
array
- items Fqdn
- data
createFqdn
Create a new FQDN object.
telnyx.createFqdn({}, context)
Input
- input
object
- body CreateFqdnRequest
Output
- output
object
- data Fqdn
deleteFqdn
Delete an FQDN.
telnyx.deleteFqdn({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the resource.
- id required
Output
- output
object
- data Fqdn
retrieveFqdn
Return the details regarding a specific FQDN.
telnyx.retrieveFqdn({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the resource.
- id required
Output
- output
object
- data Fqdn
updateFqdn
Update the details of a specific FQDN.
telnyx.updateFqdn({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the resource. - body UpdateFqdnRequest
- id required
Output
- output
object
- data Fqdn
listIpConnections
Returns a list of your IP connections.
telnyx.listIpConnections({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filterconnection_name
string
: If present, connections with connection_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters. - filteroutbound.outbound_voice_profile_id
string
: Identifies the associated outbound voice profile. - sort
string
(values: created_at, connection_name, active): Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.
- pagenumber
Output
- output
object
- data
array
- items IpConnection
- meta PaginationMeta
- data
createIpConnection
Creates an IP connection.
telnyx.createIpConnection({
"body": null
}, context)
Input
- input
object
- body required CreateIpConnectionRequest
Output
- output
object
- data IpConnection
deleteIpConnection
Deletes an existing IP connection.
telnyx.deleteIpConnection({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the type of resource.
- id required
Output
- output
object
- data IpConnection
retrieveIpConnection
Retrieves the details of an existing ip connection.
telnyx.retrieveIpConnection({
"id": ""
}, context)
Input
- input
object
- id required
string
: IP Connection ID
- id required
Output
- output
object
- data IpConnection
updateIpConnection
Updates settings of an existing IP connection.
telnyx.updateIpConnection({
"id": "",
"body": null
}, context)
Input
- input
object
- id required
string
: Identifies the type of resource. - body required UpdateIpConnectionRequest
- id required
Output
- output
object
- data IpConnection
listIps
Get all IPs belonging to the user that match the given filters.
telnyx.listIps({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filterconnection_id
string
: ID of the IP Connection to which this IP should be attached. - filterip_address
string
: IP adddress represented by this resource. - filterport
integer
: Port to use when connecting to this IP.
- pagenumber
Output
- output
object
- data
array
- items Ip
- data
createIp
Create a new IP object.
telnyx.createIp({}, context)
Input
- input
object
- body CreateIpRequest
Output
- output
object
- data Ip
deleteIp
Delete an IP.
telnyx.deleteIp({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the type of resource.
- id required
Output
- output
object
- data Ip
retrieveIp
Return the details regarding a specific IP.
telnyx.retrieveIp({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the type of resource.
- id required
Output
- output
object
- data Ip
updateIp
Update the details of a specific IP.
telnyx.updateIp({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the type of resource. - body UpdateIpRequest
- id required
Output
- output
object
- data Ip
createLedgerBillingGroupReport
Create a ledger billing group report
telnyx.createLedgerBillingGroupReport({
"body": null
}, context)
Input
- input
object
- body required NewLedgerBillingGroupReport
Output
- output
object
retrieveLedgerBillingGroupReport
Retrieve a ledger billing group report
telnyx.retrieveLedgerBillingGroupReport({
"id": ""
}, context)
Input
- input
object
- id required
string
: The id of the ledger billing group report
- id required
Output
- output
object
createMessage
Send a message with a Phone Number, Alphanumeric Sender ID, Short Code or Number Pool.
This endpoint allows you to send a message with any messaging resource. Current messaging resources include: long-code, short-code, number-pool, and alphanumeric-sender-id.
telnyx.createMessage({}, context)
Input
- input
object
- body CreateMessageRequest
Output
- output
object
createLongCodeMessage
Send a long code message
telnyx.createLongCodeMessage({}, context)
Input
- input
object
Output
- output
object
createNumberPoolMessage
Send a message using number pool
telnyx.createNumberPoolMessage({}, context)
Input
- input
object
Output
- output
object
createShortCodeMessage
Send a short code message
telnyx.createShortCodeMessage({}, context)
Input
- input
object
Output
- output
object
retrieveMessage
Note: This API endpoint can only retrieve messages that are no older than 10 days since their creation. If you require messages older than this, please generate an MDR report.
telnyx.retrieveMessage({
"id": ""
}, context)
Input
- input
object
- id required
string
: The id of the message
- id required
Output
- output
object
listMessagingHostedNumberOrder
List messaging hosted number orders
telnyx.listMessagingHostedNumberOrder({}, context)
Input
Output
- output
object
- data
array
- meta PaginationMeta
- data
createMessagingHostedNumberOrder
Create a messaging hosted number order
telnyx.createMessagingHostedNumberOrder({}, context)
Input
- input
object
Output
- output
object
retrieveMessagingHostedNumberOrder
Retrieve a messaging hosted number order
telnyx.retrieveMessagingHostedNumberOrder({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the type of resource.
- id required
Output
- output
object
uploadFileMessagingHostedNumberOrder
Upload file required for a messaging hosted number order
telnyx.uploadFileMessagingHostedNumberOrder({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the type of resource. - bill
string
: Must be the last month's bill with proof of ownership of all of the numbers in the order in PDF format. - loa
string
: Must be a signed LOA for the numbers in the order in PDF format.
- id required
Output
- output
object
deleteMessagingHostedNumber
Delete a messaging hosted number
telnyx.deleteMessagingHostedNumber({
"id": ""
}, context)
Input
- input
object
- id required
string
: Identifies the type of resource.
- id required
Output
- output
object
- data HostedNumber
listMessagingProfileMetrics
List messaging profile metrics
telnyx.listMessagingProfileMetrics({}, context)
Input
- input
object
Output
- output
object
- data
array
- meta PaginationMeta
- data
listMessagingProfiles
List messaging profiles
telnyx.listMessagingProfiles({}, context)
Input
Output
- output
object
- data
array
- items MessagingProfile
- meta PaginationMeta
- data
createMessagingProfile
Create a messaging profile
telnyx.createMessagingProfile({
"body": {
"name": ""
}
}, context)
Input
- input
object
- body required CreateMessagingProfileRequest
Output
- output
object
- data MessagingProfile
deleteMessagingProfile
Delete a messaging profile
telnyx.deleteMessagingProfile({
"id": ""
}, context)
Input
- input
object
- id required
string
: The id of the messaging profile to retrieve
- id required
Output
- output
object
- data MessagingProfile
retrieveMessagingProfile
Retrieve a messaging profile
telnyx.retrieveMessagingProfile({
"id": ""
}, context)
Input
- input
object
- id required
string
: The id of the messaging profile to retrieve
- id required
Output
- output
object
- data MessagingProfile
updateMessagingProfile
Update a messaging profile
telnyx.updateMessagingProfile({
"id": "",
"body": {}
}, context)
Input
- input
object
- id required
string
: The id of the messaging profile to retrieve - body required UpdateMessagingProfileRequest
- id required
Output
- output
object
- data MessagingProfile
retrieveMessagingProfileDetailedMetrics
Retrieve messaging profile metrics
telnyx.retrieveMessagingProfileDetailedMetrics({
"id": ""
}, context)
Input
- input
object
- id required
string
: The id of the messaging profile to retrieve - time_frame
string
(values: 1h, 3h, 24h, 3d, 7d, 30d): The timeframe for which you'd like to retrieve metrics.
- id required
Output
- output
object
listMessagingProfilePhoneNumbers
List phone numbers associated with a messaging profile
telnyx.listMessagingProfilePhoneNumbers({
"id": ""
}, context)
Input
- input
object
Output
- output
object
- data
array
- meta PaginationMeta
- data
listMessagingProfileShortCodes
List short codes associated with a messaging profile
telnyx.listMessagingProfileShortCodes({
"id": ""
}, context)
Input
- input
object
Output
- output
object
- data
array
- items ShortCode
- meta PaginationMeta
- data
listMessagingUrlDomains
List messaging URL domains
telnyx.listMessagingUrlDomains({}, context)
Input
Output
- output
object
- data
array
- items MessagingUrlDomain
- meta PaginationMeta
- data
MobileOperatorNetworksGet
Telnyx has a set of GSM mobile operators partners that are available through our mobile network roaming. This resource is entirely managed by Telnyx and may change over time. That means that this resource won't allow any write operations for it. Still, it's available so it can be used as a support resource that can be related to other resources or become a configuration option.
telnyx.MobileOperatorNetworksGet({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filtername
string
: Filter by name starting with. - filtername
string
: Filter by name containing match. - filtername
string
: Filter by name ending with. - filtercountry_code
string
: Filter by exact country_code. - filtermcc
string
: Filter by exact MCC. - filtermnc
string
: Filter by exact MNC. - filtertadig
string
: Filter by exact TADIG.
- pagenumber
Output
- output
object
- data
array
- items MobileOperatorNetwork
- meta PaginationMeta
- data
listNotificationChannels
List notification channels.
telnyx.listNotificationChannels({}, context)
Input
- input
object
- pagenumber
integer
: The page number to load - pagesize
integer
: The size of the page - filterchannel_type_id
string
(values: webhook, sms, email, voice): Filter by the id of a channel type
- pagenumber
Output
- output
object
- data
array
- items NotificationChannel
- meta PaginationMeta
- data
createNotificationChannels
Create a notification channel.
telnyx.createNotificationChannels({}, context)
Input
- input
object
- body NotificationChannel
Output
- output
object
- data NotificationChannel
deleteNotificationChannel
Delete a notification channel.
telnyx.deleteNotificationChannel({
"id": ""
}, context)
Input
- input
object
- id required
string
: The id of the resource.
- id required
Output
- output
object
- data NotificationChannel
retrieveNotificationChannel
Retrieve a notification channel.
telnyx.retrieveNotificationChannel({
"id": ""
}, context)
Input
- input
object
- id required
string
: The id of the resource.
- id required
Output
- output
object
5 years ago