Skip to main content
PUT
/
dialogflow_connections
/
{connection_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 dialogflowConnection = await client.dialogflowConnections.update('connection_id', {
  service_account: {
    type: 'bar',
    project_id: 'bar',
    private_key_id: 'bar',
    private_key: 'bar',
    client_email: 'bar',
    client_id: 'bar',
    auth_uri: 'bar',
    token_uri: 'bar',
    auth_provider_x509_cert_url: 'bar',
    client_x509_cert_url: '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.

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