Update Auto-Response Setting
PUT
/
messaging_profiles
/
{profile_id}
/
autoresp_configs
/
{autoresp_cfg_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 autoRespConfigResponse = await client.messagingProfiles.autorespConfigs.update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{
profile_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
country_code: 'US',
keywords: ['keyword1', 'keyword2'],
op: 'start',
},
);
console.log(autoRespConfigResponse.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
auto_resp_config_response = client.messaging_profiles.autoresp_configs.update(
autoresp_cfg_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
country_code="US",
keywords=["keyword1", "keyword2"],
op="start",
)
print(auto_resp_config_response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
autoRespConfigResponse, err := client.MessagingProfiles.AutorespConfigs.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.MessagingProfileAutorespConfigUpdateParams{
ProfileID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
AutoRespConfigCreate: telnyx.AutoRespConfigCreateParam{
CountryCode: "US",
Keywords: []string{"keyword1", "keyword2"},
Op: telnyx.AutoRespConfigCreateOpStart,
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", autoRespConfigResponse.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.messagingprofiles.autorespconfigs.AutoRespConfigCreate;
import com.telnyx.sdk.models.messagingprofiles.autorespconfigs.AutoRespConfigResponse;
import com.telnyx.sdk.models.messagingprofiles.autorespconfigs.AutorespConfigUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AutorespConfigUpdateParams params = AutorespConfigUpdateParams.builder()
.profileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.autorespCfgId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.autoRespConfigCreate(AutoRespConfigCreate.builder()
.countryCode("US")
.addKeyword("keyword1")
.addKeyword("keyword2")
.op(AutoRespConfigCreate.Op.START)
.build())
.build();
AutoRespConfigResponse autoRespConfigResponse = client.messagingProfiles().autorespConfigs().update(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
auto_resp_config_response = telnyx.messaging_profiles.autoresp_configs.update(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
profile_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
country_code: "US",
keywords: ["keyword1", "keyword2"],
op: :start
)
puts(auto_resp_config_response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$autoRespConfigResponse = $client->messagingProfiles->autorespConfigs->update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
profileID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
countryCode: 'US',
keywords: ['keyword1', 'keyword2'],
op: 'start',
respText: 'Thank you for your message',
);
var_dump($autoRespConfigResponse);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messaging-profiles:autoresp-configs update \
--api-key 'My API Key' \
--profile-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
--autoresp-cfg-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
--country-code US \
--keyword keyword1 \
--keyword keyword2 \
--op startcurl --request PUT \
--url https://api.telnyx.com/v2/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keywords": [
"keyword1",
"keyword2"
],
"country_code": "US",
"resp_text": "Thank you for your message"
}
'{
"data": {
"op": "start",
"keywords": [
"START",
"BEGIN"
],
"resp_text": "Hello there!",
"country_code": "*",
"id": "54b7e19f-98a8-416f-81d1-a2782eade48b",
"created_at": "2023-03-10T21:54:46.293380+00:00",
"updated_at": "2023-03-10T21:54:46.293380+00:00"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the profile.
Unique identifier of the autoresp cfg.
Body
application/json
Response
Successful Response
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const autoRespConfigResponse = await client.messagingProfiles.autorespConfigs.update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{
profile_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
country_code: 'US',
keywords: ['keyword1', 'keyword2'],
op: 'start',
},
);
console.log(autoRespConfigResponse.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
auto_resp_config_response = client.messaging_profiles.autoresp_configs.update(
autoresp_cfg_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
country_code="US",
keywords=["keyword1", "keyword2"],
op="start",
)
print(auto_resp_config_response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
autoRespConfigResponse, err := client.MessagingProfiles.AutorespConfigs.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.MessagingProfileAutorespConfigUpdateParams{
ProfileID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
AutoRespConfigCreate: telnyx.AutoRespConfigCreateParam{
CountryCode: "US",
Keywords: []string{"keyword1", "keyword2"},
Op: telnyx.AutoRespConfigCreateOpStart,
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", autoRespConfigResponse.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.messagingprofiles.autorespconfigs.AutoRespConfigCreate;
import com.telnyx.sdk.models.messagingprofiles.autorespconfigs.AutoRespConfigResponse;
import com.telnyx.sdk.models.messagingprofiles.autorespconfigs.AutorespConfigUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AutorespConfigUpdateParams params = AutorespConfigUpdateParams.builder()
.profileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.autorespCfgId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.autoRespConfigCreate(AutoRespConfigCreate.builder()
.countryCode("US")
.addKeyword("keyword1")
.addKeyword("keyword2")
.op(AutoRespConfigCreate.Op.START)
.build())
.build();
AutoRespConfigResponse autoRespConfigResponse = client.messagingProfiles().autorespConfigs().update(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
auto_resp_config_response = telnyx.messaging_profiles.autoresp_configs.update(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
profile_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
country_code: "US",
keywords: ["keyword1", "keyword2"],
op: :start
)
puts(auto_resp_config_response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$autoRespConfigResponse = $client->messagingProfiles->autorespConfigs->update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
profileID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
countryCode: 'US',
keywords: ['keyword1', 'keyword2'],
op: 'start',
respText: 'Thank you for your message',
);
var_dump($autoRespConfigResponse);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx messaging-profiles:autoresp-configs update \
--api-key 'My API Key' \
--profile-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
--autoresp-cfg-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
--country-code US \
--keyword keyword1 \
--keyword keyword2 \
--op startcurl --request PUT \
--url https://api.telnyx.com/v2/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keywords": [
"keyword1",
"keyword2"
],
"country_code": "US",
"resp_text": "Thank you for your message"
}
'{
"data": {
"op": "start",
"keywords": [
"START",
"BEGIN"
],
"resp_text": "Hello there!",
"country_code": "*",
"id": "54b7e19f-98a8-416f-81d1-a2782eade48b",
"created_at": "2023-03-10T21:54:46.293380+00:00",
"updated_at": "2023-03-10T21:54:46.293380+00:00"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}