Skip to main content
POST
/
dialogflow_connections
/
{connection_id}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const dialogflowConnection = await client.dialogflowConnections.create('connection_id', {
  service_account: {
    '0': 'bar',
    '1': 'bar',
    '2': 'bar',
    '3': 'bar',
    '4': 'bar',
    '5': 'bar',
    '6': 'bar',
    '7': 'bar',
    '8': 'bar',
    '9': 'bar',
    '10': 'bar',
    '11': 'bar',
    '12': 'bar',
    '13': 'bar',
    '14': 'bar',
    '15': 'bar',
    '16': 'bar',
    '17': 'bar',
    '18': 'bar',
    '19': 'bar',
    '20': 'bar',
    '21': 'bar',
    '22': 'bar',
    '23': 'bar',
    '24': 'bar',
    '25': 'bar',
    '26': 'bar',
    '27': 'bar',
    '28': 'bar',
    '29': 'bar',
    '30': 'bar',
    '31': 'bar',
    '32': 'bar',
    '33': 'bar',
    '34': 'bar',
    '35': 'bar',
    '36': 'bar',
    '37': 'bar',
    '38': 'bar',
    '39': 'bar',
    '40': 'bar',
    '41': 'bar',
    '42': 'bar',
    '43': 'bar',
    '44': 'bar',
    '45': 'bar',
    '46': 'bar',
    '47': 'bar',
    '48': 'bar',
    '49': 'bar',
    '50': 'bar',
    '51': 'bar',
    '52': 'bar',
    '53': 'bar',
    '54': 'bar',
    '55': 'bar',
    '56': 'bar',
    '57': 'bar',
    '58': 'bar',
    '59': 'bar',
    '60': 'bar',
    '61': 'bar',
    '62': 'bar',
    '63': 'bar',
    '64': 'bar',
    '65': 'bar',
    '66': 'bar',
    '67': 'bar',
    '68': 'bar',
    '69': 'bar',
    '70': 'bar',
    '71': 'bar',
    '72': 'bar',
    '73': 'bar',
    '74': 'bar',
    '75': 'bar',
    '76': 'bar',
    '77': 'bar',
    '78': 'bar',
    '79': 'bar',
    '80': 'bar',
    '81': 'bar',
    '82': 'bar',
    '83': 'bar',
    '84': 'bar',
    '85': 'bar',
    '86': 'bar',
    '87': 'bar',
    '88': 'bar',
    '89': 'bar',
    '90': 'bar',
    '91': 'bar',
    '92': 'bar',
    '93': 'bar',
    '94': 'bar',
    '95': 'bar',
    '96': 'bar',
    '97': 'bar',
    '98': 'bar',
    '99': 'bar',
    '100': 'bar',
    '101': 'bar',
    '102': 'bar',
    '103': 'bar',
    '104': 'bar',
    '105': 'bar',
    '106': 'bar',
    '107': 'bar',
    '108': 'bar',
    '109': 'bar',
    '110': 'bar',
    '111': 'bar',
    '112': 'bar',
    '113': 'bar',
    '114': 'bar',
    '115': 'bar',
    '116': 'bar',
    '117': 'bar',
    '118': 'bar',
    '119': 'bar',
    '120': 'bar',
    '121': 'bar',
    '122': 'bar',
    '123': 'bar',
    '124': 'bar',
    '125': 'bar',
    '126': 'bar',
    '127': 'bar',
    '128': 'bar',
    '129': 'bar',
    '130': 'bar',
    '131': 'bar',
    '132': 'bar',
    '133': 'bar',
    '134': 'bar',
    '135': 'bar',
    '136': 'bar',
    '137': 'bar',
    '138': 'bar',
    '139': 'bar',
    '140': 'bar',
    '141': 'bar',
    '142': 'bar',
    '143': 'bar',
    '144': 'bar',
    '145': 'bar',
    '146': 'bar',
    '147': 'bar',
    '148': 'bar',
    '149': 'bar',
    '150': 'bar',
    '151': 'bar',
    '152': 'bar',
    '153': 'bar',
    '154': 'bar',
    '155': 'bar',
    '156': 'bar',
    '157': 'bar',
    '158': 'bar',
    '159': 'bar',
    '160': 'bar',
    '161': 'bar',
    '162': 'bar',
    '163': 'bar',
    '164': 'bar',
    '165': 'bar',
    '166': 'bar',
    '167': 'bar',
    '168': 'bar',
    '169': 'bar',
    '170': 'bar',
    '171': 'bar',
    '172': 'bar',
    '173': 'bar',
    '174': 'bar',
    '175': 'bar',
    '176': 'bar',
    '177': 'bar',
    '178': 'bar',
    '179': 'bar',
    '180': 'bar',
    '181': 'bar',
    '182': 'bar',
    '183': 'bar',
    '184': 'bar',
    '185': 'bar',
    '186': 'bar',
    '187': 'bar',
    '188': 'bar',
    '189': 'bar',
    '190': 'bar',
    '191': 'bar',
    '192': 'bar',
    '193': 'bar',
    '194': 'bar',
    '195': 'bar',
    '196': 'bar',
    '197': 'bar',
    '198': 'bar',
    '199': 'bar',
    '200': 'bar',
    '201': 'bar',
    '202': 'bar',
    '203': 'bar',
    '204': 'bar',
    '205': 'bar',
    '206': 'bar',
    '207': 'bar',
    '208': 'bar',
    '209': 'bar',
    '210': 'bar',
    '211': 'bar',
    '212': 'bar',
    '213': 'bar',
    '214': 'bar',
    '215': 'bar',
    '216': 'bar',
    '217': 'bar',
    '218': 'bar',
    '219': 'bar',
    '220': 'bar',
    '221': 'bar',
    '222': 'bar',
    '223': 'bar',
    '224': 'bar',
    '225': 'bar',
    '226': 'bar',
    '227': 'bar',
    '228': 'bar',
    '229': 'bar',
    '230': 'bar',
    '231': 'bar',
    '232': 'bar',
    '233': 'bar',
    '234': 'bar',
    '235': 'bar',
    '236': 'bar',
    '237': 'bar',
    '238': 'bar',
    '239': 'bar',
    '240': 'bar',
    '241': 'bar',
    '242': 'bar',
    '243': 'bar',
    '244': 'bar',
    '245': 'bar',
    '246': 'bar',
    '247': 'bar',
    '248': 'bar',
    '249': 'bar',
    '250': 'bar',
    '251': 'bar',
    '252': 'bar',
    '253': 'bar',
    '254': 'bar',
    '255': 'bar',
    '256': 'bar',
    '257': 'bar',
    '258': 'bar',
    '259': 'bar',
    '260': 'bar',
    '261': 'bar',
    '262': 'bar',
    '263': 'bar',
    '264': 'bar',
    '265': 'bar',
    '266': 'bar',
    '267': 'bar',
    '268': 'bar',
    '269': 'bar',
    '270': 'bar',
    '271': 'bar',
    '272': 'bar',
    '273': 'bar',
    '274': 'bar',
    '275': 'bar',
    '276': 'bar',
    '277': 'bar',
    '278': 'bar',
    '279': 'bar',
    '280': 'bar',
    '281': 'bar',
    '282': 'bar',
    '283': 'bar',
    '284': 'bar',
    '285': 'bar',
    '286': 'bar',
    '287': 'bar',
    '288': 'bar',
    '289': 'bar',
    '290': 'bar',
    '291': 'bar',
    '292': 'bar',
    '293': 'bar',
    '294': 'bar',
    '295': 'bar',
    '296': 'bar',
    '297': 'bar',
    '298': 'bar',
    '299': 'bar',
    '300': 'bar',
    '301': 'bar',
    '302': 'bar',
    '303': 'bar',
    '304': 'bar',
    '305': 'bar',
    '306': 'bar',
    '307': 'bar',
    '308': 'bar',
    '309': 'bar',
    '310': 'bar',
    '311': 'bar',
    '312': 'bar',
    '313': 'bar',
    '314': 'bar',
    '315': 'bar',
    '316': 'bar',
    '317': 'bar',
    '318': 'bar',
    '319': 'bar',
    '320': 'bar',
    '321': 'bar',
    '322': 'bar',
    '323': 'bar',
    '324': 'bar',
    '325': 'bar',
    '326': 'bar',
    '327': 'bar',
    '328': 'bar',
    '329': 'bar',
    '330': 'bar',
    '331': 'bar',
    '332': 'bar',
    '333': 'bar',
    '334': 'bar',
    '335': 'bar',
    '336': 'bar',
    '337': 'bar',
    '338': 'bar',
    '339': 'bar',
    '340': 'bar',
    '341': 'bar',
    '342': 'bar',
    '343': 'bar',
    '344': 'bar',
    '345': 'bar',
    '346': 'bar',
    '347': 'bar',
    '348': 'bar',
    '349': 'bar',
    '350': 'bar',
    '351': 'bar',
    '352': 'bar',
    '353': 'bar',
    '354': 'bar',
    '355': 'bar',
    '356': 'bar',
    '357': 'bar',
    '358': 'bar',
    '359': 'bar',
    '360': 'bar',
    '361': 'bar',
    '362': 'bar',
    '363': 'bar',
    '364': 'bar',
    '365': 'bar',
    '366': 'bar',
    '367': 'bar',
    '368': 'bar',
    '369': 'bar',
    '370': 'bar',
    '371': 'bar',
    '372': 'bar',
    '373': 'bar',
    '374': 'bar',
    '375': 'bar',
    '376': 'bar',
    '377': 'bar',
    '378': 'bar',
    '379': 'bar',
    '380': 'bar',
    '381': 'bar',
    '382': 'bar',
    '383': 'bar',
    '384': 'bar',
    '385': 'bar',
    '386': 'bar',
    '387': 'bar',
    '388': 'bar',
    '389': 'bar',
    '390': 'bar',
    '391': 'bar',
    '392': 'bar',
    '393': 'bar',
    '394': 'bar',
    '395': 'bar',
    '396': 'bar',
    '397': 'bar',
    '398': 'bar',
    '399': 'bar',
  },
});

console.log(dialogflowConnection.data);
{
  "data": {
    "record_type": "dialogflow_connections",
    "connection_id": "1234541231",
    "conversation_profile_id": "a-VMHLWzTmKjiJw5S6O0-w",
    "environment": "development",
    "service_account": "****"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

connection_id
string
required

Uniquely identifies a Telnyx application (Call Control).

Body

application/json

The params expected to create/update a Dialogflow Connection for given connection_id.

service_account
object
required

The JSON map to connect your Dialoglow account.

Example:

"{\"service_account\":{\"type\":\"service_account\",\"project_id\":\"your-project-id\",\"private_key_id\":\"your-private-key\",\"private_key\":\"-----BEGIN PRIVATE KEY-----n-----END PRIVATE\",\"client_email\":\"example@example.com\",\"client_id\":\"your-client-id\",\"auth_uri\":\"http://example.com\",\"token_uri\":\"http://example.com\",\"auth_provider_x509_cert_url\":\"http://example.com\",\"client_x509_cert_url\":\"http://example.com\"}}"

dialogflow_api
enum<string>
default:es

Determine which Dialogflow will be used.

Available options:
cx,
es
Example:

"cx"

conversation_profile_id
string

The id of a configured conversation profile on your Dialogflow account. (If you use Dialogflow CX, this param is required)

Example:

"a-VMHLWzTmKjiJw5S6O0-w"

location
string

The region of your agent is. (If you use Dialogflow CX, this param is required)

Example:

"global"

environment
string

Which Dialogflow environment will be used.

Example:

"development"

Response

Return details of the Dialogflow connection associated with the given CallControl connection.

data
Dialogflow Connection · object
required