Create a Dialogflow Connection
POST/dialogflow_connections/:connection_id
Save Dialogflow Credentiails to Telnyx, so it can be used with other Telnyx services.
Request
Path Parameters
Uniquely identifies a Telnyx application (Call Control).
- application/json
Body
required
The params expected to create/update a Dialogflow Connection for given connection_id.
The JSON map to connect your Dialoglow account.
Possible values: [cx
, es
]
Default value: es
Determin which Dialogflow will be used.
The id of a configured conversation profile on your Dialogflow account. (If you use Dialogflow CX, this param is required)
The region of your agent is. (If you use Dialogflow CX, this param is required)
Which Dialogflow environment will be used.
Responses
201: Return details of the Dialogflow connection associated with the given CallControl connection.
- application/json
default: Unexpected error.
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/dialogflow_connections/:connection_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"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": "cx",
"conversation_profile_id": "a-VMHLWzTmKjiJw5S6O0-w",
"location": "global",
"environment": "development"
}'
Response samples
{
"data": {
"record_type": "dialogflow_connections",
"connection_id": "1234541231",
"conversation_profile_id": "a-VMHLWzTmKjiJw5S6O0-w",
"environment": "development",
"service_account": "****"
}
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}