Update an RCS agent
Updates one or more fields on an agent while its status is CREATED. While Telnyx is still creating the agent with the provider, or any test device invitation is PENDING, the update returns 409. Submitted agents cannot be changed through this endpoint.
PATCH
/
rcs
/
agents
/
{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 Agent = await client.rcs.agents.update('id', {
display_name: 'display_name',
});
console.log(Agent.agent_id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
agent = client.rcs.agents.update(
id="id",
display_name="display_name",
)
print(agent.agent_id)
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"),
)
agent, err := client.Rcs.Agents.Update(
context.TODO(),
"id",
telnyx.RcAgentUpdateParams{
DisplayName: telnyx.String("display_name"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", agent.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.rcs.agents.AgentUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AgentUpdateParams params = AgentUpdateParams.builder()
.displayName("display_name")
.build();
var response = client.rcs().agents().update("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
agent = telnyx.rcs.agents.update("id", display_name: "display_name")
puts(agent)<?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 {
$agent = $client->rcs->agents->update(
'id',
display_name: 'display_name',
);
var_dump($agent);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx rcs:agents update \
--api-key 'My API Key' \
--id id \
--display-name display_namecurl --request PATCH \
--url https://api.telnyx.com/v2/rcs/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "Acme Delivery Updates"
}
'{
"agent_id": "22222222-2222-4222-8222-222222222222",
"brand_id": "11111111-1111-4111-8111-111111111111",
"display_name": "Acme Order Updates",
"use_case": "TRANSACTIONAL",
"status": "SUBMITTED",
"profile_id": "40000000-0000-0000-0000-000000000001",
"basics_status": "SUBMITTED",
"campaign_status": null,
"testing_status": null,
"billing_category": "NON_CONVERSATIONAL",
"hosting_region": null,
"configuration": {
"basics": {
"description": "Order confirmations and delivery updates",
"logo_url": "https://www.example.com/rcs/logo.png",
"hero_url": "https://www.example.com/rcs/hero.png",
"brand_color": "#123456",
"privacy_policy_url": "https://www.example.com/privacy",
"terms_and_conditions_url": "https://www.example.com/terms",
"email": {
"address": "[email protected]",
"label": "Support"
}
},
"campaign": null,
"testing": null
},
"carrier_approvals": [],
"test_devices": [],
"capabilities": {
"brand_entity": true,
"brand_verification": true,
"submission_sections": true,
"distinct_launch_phase": false,
"per_carrier_approval": false,
"templates": false,
"campaigns": false,
"vendor_webhooks": false,
"invite_test_devices": false
}
}{
"detail": "The requested RCS resource was not found."
}{
"detail": "The requested RCS resource was not found."
}{
"detail": "The requested RCS resource was not found."
}{
"detail": [
{
"loc": [
"body",
"display_name"
],
"msg": "Field required",
"type": "missing"
}
]
}{
"detail": {
"field": "configuration.basics.logo_url",
"code": "image_unavailable",
"message": "image could not be retrieved"
}
}{
"detail": "The requested RCS resource was not found."
}Authorizations
Body
application/json
Response
The updated RCS agent.
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const Agent = await client.rcs.agents.update('id', {
display_name: 'display_name',
});
console.log(Agent.agent_id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
agent = client.rcs.agents.update(
id="id",
display_name="display_name",
)
print(agent.agent_id)
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"),
)
agent, err := client.Rcs.Agents.Update(
context.TODO(),
"id",
telnyx.RcAgentUpdateParams{
DisplayName: telnyx.String("display_name"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", agent.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.rcs.agents.AgentUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AgentUpdateParams params = AgentUpdateParams.builder()
.displayName("display_name")
.build();
var response = client.rcs().agents().update("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
agent = telnyx.rcs.agents.update("id", display_name: "display_name")
puts(agent)<?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 {
$agent = $client->rcs->agents->update(
'id',
display_name: 'display_name',
);
var_dump($agent);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx rcs:agents update \
--api-key 'My API Key' \
--id id \
--display-name display_namecurl --request PATCH \
--url https://api.telnyx.com/v2/rcs/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "Acme Delivery Updates"
}
'{
"agent_id": "22222222-2222-4222-8222-222222222222",
"brand_id": "11111111-1111-4111-8111-111111111111",
"display_name": "Acme Order Updates",
"use_case": "TRANSACTIONAL",
"status": "SUBMITTED",
"profile_id": "40000000-0000-0000-0000-000000000001",
"basics_status": "SUBMITTED",
"campaign_status": null,
"testing_status": null,
"billing_category": "NON_CONVERSATIONAL",
"hosting_region": null,
"configuration": {
"basics": {
"description": "Order confirmations and delivery updates",
"logo_url": "https://www.example.com/rcs/logo.png",
"hero_url": "https://www.example.com/rcs/hero.png",
"brand_color": "#123456",
"privacy_policy_url": "https://www.example.com/privacy",
"terms_and_conditions_url": "https://www.example.com/terms",
"email": {
"address": "[email protected]",
"label": "Support"
}
},
"campaign": null,
"testing": null
},
"carrier_approvals": [],
"test_devices": [],
"capabilities": {
"brand_entity": true,
"brand_verification": true,
"submission_sections": true,
"distinct_launch_phase": false,
"per_carrier_approval": false,
"templates": false,
"campaigns": false,
"vendor_webhooks": false,
"invite_test_devices": false
}
}{
"detail": "The requested RCS resource was not found."
}{
"detail": "The requested RCS resource was not found."
}{
"detail": "The requested RCS resource was not found."
}{
"detail": [
{
"loc": [
"body",
"display_name"
],
"msg": "Field required",
"type": "missing"
}
]
}{
"detail": {
"field": "configuration.basics.logo_url",
"code": "image_unavailable",
"message": "image could not be retrieved"
}
}{
"detail": "The requested RCS resource was not found."
}