Dialogflow Integration API

Dialogflow Connection Operations API

Delete stored Dialogflow Connection

Deletes a stored Dialogflow Connection.

SecuritybearerAuth
Request
path Parameters
connection_id
required
string

Uniquely identifies a Telnyx application (Call Control)

Responses
204

The Dialogflow Connection for connection_id was deleted successfully.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
delete/dialogflow_connections/{connection_id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

res = telnyx.DialogflowConnection.retrieve('connection_id')
res.delete()
Response samples
application/json
{
  • "errors": [
    • {
      • "code": "string",
      • "detail": "string",
      • "meta": { },
      • "source": {
        • "parameter": "string",
        • "pointer": "/json/pointer"
        },
      • "title": "string"
      }
    ]
}

Retrieve stored Dialogflow Connection

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

SecuritybearerAuth
Request
path Parameters
connection_id
required
string

Uniquely identifies a Telnyx application (Call Control)

Responses
200

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

Response Schema: application/json
required
object (Dialogflow Connection)
connection_id
string

Uniquely identifies a Telnyx application (Call Control).

conversation_profile_id
string

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

environment
string

Which Dialogflow environment will be used.

record_type
string
service_account
string

The JSON map to connect your Dialoglow account.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/dialogflow_connections/{connection_id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.DialogflowConnection.retrieve("connection_id")
Response samples
application/json
{
  • "data": {
    • "connection_id": "1234541231",
    • "conversation_profile_id": "a-VMHLWzTmKjiJw5S6O0-w",
    • "environment": "development",
    • "record_type": "dialogflow_connections",
    • "service_account": "****"
    }
}

Create a Dialogflow Connection

Save Dialogflow Credentiails to Telnyx, so it can be used with other Telnyx services.

SecuritybearerAuth
Request
path Parameters
connection_id
required
string

Uniquely identifies a Telnyx application (Call Control)

Request Body schema: application/json
required

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

conversation_profile_id
string

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

dialogflow_api
string
Default: "es"

Determin which Dialogflow will be used.

Enum: "cx" "es"
environment
string

Which Dialogflow environment will be used.

location
string

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

service_account
required
object

The JSON map to connect your Dialoglow account.

Responses
201

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

Response Schema: application/json
required
object (Dialogflow Connection)
connection_id
string

Uniquely identifies a Telnyx application (Call Control).

conversation_profile_id
string

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

environment
string

Which Dialogflow environment will be used.

record_type
string
service_account
string

The JSON map to connect your Dialoglow account.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
post/dialogflow_connections/{connection_id}
Request samples
application/json
{
  • "conversation_profile_id": "a-VMHLWzTmKjiJw5S6O0-w",
  • "dialogflow_api": "cx",
  • "environment": "development",
  • "location": "global",
  • "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\"}"
}
Response samples
application/json
{
  • "data": {
    • "connection_id": "1234541231",
    • "conversation_profile_id": "a-VMHLWzTmKjiJw5S6O0-w",
    • "environment": "development",
    • "record_type": "dialogflow_connections",
    • "service_account": "****"
    }
}

Update stored Dialogflow Connection

Updates a stored Dialogflow Connection.

SecuritybearerAuth
Request
path Parameters
connection_id
required
string

Uniquely identifies a Telnyx application (Call Control)

Request Body schema: application/json
required

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

conversation_profile_id
string

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

dialogflow_api
string
Default: "es"

Determin which Dialogflow will be used.

Enum: "cx" "es"
environment
string

Which Dialogflow environment will be used.

location
string

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

service_account
required
object

The JSON map to connect your Dialoglow account.

Responses
200

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

Response Schema: application/json
required
object (Dialogflow Connection)
connection_id
string

Uniquely identifies a Telnyx application (Call Control).

conversation_profile_id
string

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

environment
string

Which Dialogflow environment will be used.

record_type
string
service_account
string

The JSON map to connect your Dialoglow account.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
put/dialogflow_connections/{connection_id}
Request samples
application/json
{
  • "conversation_profile_id": "a-VMHLWzTmKjiJw5S6O0-w",
  • "dialogflow_api": "cx",
  • "environment": "development",
  • "location": "global",
  • "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\"}"
}
Response samples
application/json
{
  • "data": {
    • "connection_id": "1234541231",
    • "conversation_profile_id": "a-VMHLWzTmKjiJw5S6O0-w",
    • "environment": "development",
    • "record_type": "dialogflow_connections",
    • "service_account": "****"
    }
}