import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const appResponse = await client.app.update('app_id');
console.log(appResponse.app_id);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
app_response = client.app.update(
app_id="app_id",
)
print(app_response.app_id)curl --request PATCH \
--url https://api.retellai.com/update-app/{app_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"tenant_url": "<string>",
"tenant_id": "<string>",
"auth_config": {
"type": "oauth2",
"client_id": "<string>",
"client_secret": "<string>"
},
"crm_config": {
"inbound_sync_mappings": [
{
"field_name": "<string>",
"external_field_name": "<string>"
}
],
"outbound_sync_mappings": [
{
"field_name": "<string>",
"external_field_name": "<string>"
}
],
"sync_conversation_activity": true,
"sync_new_contacts": true
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/update-app/{app_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'tenant_url' => '<string>',
'tenant_id' => '<string>',
'auth_config' => [
'type' => 'oauth2',
'client_id' => '<string>',
'client_secret' => '<string>'
],
'crm_config' => [
'inbound_sync_mappings' => [
[
'field_name' => '<string>',
'external_field_name' => '<string>'
]
],
'outbound_sync_mappings' => [
[
'field_name' => '<string>',
'external_field_name' => '<string>'
]
],
'sync_conversation_activity' => true,
'sync_new_contacts' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.retellai.com/update-app/{app_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"tenant_url\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"auth_config\": {\n \"type\": \"oauth2\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"crm_config\": {\n \"inbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"outbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"sync_conversation_activity\": true,\n \"sync_new_contacts\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.retellai.com/update-app/{app_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"tenant_url\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"auth_config\": {\n \"type\": \"oauth2\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"crm_config\": {\n \"inbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"outbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"sync_conversation_activity\": true,\n \"sync_new_contacts\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/update-app/{app_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"tenant_url\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"auth_config\": {\n \"type\": \"oauth2\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"crm_config\": {\n \"inbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"outbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"sync_conversation_activity\": true,\n \"sync_new_contacts\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"app_id": "<string>",
"org_id": "<string>",
"type": "crm",
"provider": "<string>",
"created_timestamp": 123,
"user_modified_timestamp": 123,
"connection_status": "not_connected",
"name": "<string>",
"tenant_url": "<string>",
"tenant_id": "<string>",
"auth_config": {
"type": "oauth2",
"client_id": "<string>"
},
"crm_config": {
"inbound_sync_mappings": [
{
"field_name": "<string>",
"external_field_name": "<string>"
}
],
"outbound_sync_mappings": [
{
"field_name": "<string>",
"external_field_name": "<string>"
}
],
"sync_conversation_activity": true,
"sync_new_contacts": true
}
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "The requested resource was not found."
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Update App
Partially update an App. Omitted fields remain unchanged. Updating auth_config invalidates the cached provider token immediately.
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const appResponse = await client.app.update('app_id');
console.log(appResponse.app_id);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
app_response = client.app.update(
app_id="app_id",
)
print(app_response.app_id)curl --request PATCH \
--url https://api.retellai.com/update-app/{app_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"tenant_url": "<string>",
"tenant_id": "<string>",
"auth_config": {
"type": "oauth2",
"client_id": "<string>",
"client_secret": "<string>"
},
"crm_config": {
"inbound_sync_mappings": [
{
"field_name": "<string>",
"external_field_name": "<string>"
}
],
"outbound_sync_mappings": [
{
"field_name": "<string>",
"external_field_name": "<string>"
}
],
"sync_conversation_activity": true,
"sync_new_contacts": true
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/update-app/{app_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'tenant_url' => '<string>',
'tenant_id' => '<string>',
'auth_config' => [
'type' => 'oauth2',
'client_id' => '<string>',
'client_secret' => '<string>'
],
'crm_config' => [
'inbound_sync_mappings' => [
[
'field_name' => '<string>',
'external_field_name' => '<string>'
]
],
'outbound_sync_mappings' => [
[
'field_name' => '<string>',
'external_field_name' => '<string>'
]
],
'sync_conversation_activity' => true,
'sync_new_contacts' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.retellai.com/update-app/{app_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"tenant_url\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"auth_config\": {\n \"type\": \"oauth2\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"crm_config\": {\n \"inbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"outbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"sync_conversation_activity\": true,\n \"sync_new_contacts\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.retellai.com/update-app/{app_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"tenant_url\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"auth_config\": {\n \"type\": \"oauth2\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"crm_config\": {\n \"inbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"outbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"sync_conversation_activity\": true,\n \"sync_new_contacts\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/update-app/{app_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"tenant_url\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"auth_config\": {\n \"type\": \"oauth2\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"crm_config\": {\n \"inbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"outbound_sync_mappings\": [\n {\n \"field_name\": \"<string>\",\n \"external_field_name\": \"<string>\"\n }\n ],\n \"sync_conversation_activity\": true,\n \"sync_new_contacts\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"app_id": "<string>",
"org_id": "<string>",
"type": "crm",
"provider": "<string>",
"created_timestamp": 123,
"user_modified_timestamp": 123,
"connection_status": "not_connected",
"name": "<string>",
"tenant_url": "<string>",
"tenant_id": "<string>",
"auth_config": {
"type": "oauth2",
"client_id": "<string>"
},
"crm_config": {
"inbound_sync_mappings": [
{
"field_name": "<string>",
"external_field_name": "<string>"
}
],
"outbound_sync_mappings": [
{
"field_name": "<string>",
"external_field_name": "<string>"
}
],
"sync_conversation_activity": true,
"sync_new_contacts": true
}
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "The requested resource was not found."
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Path Parameters
Body
Response
Updated App.
App integration category.
crm, calendar, knowledge_base, support, communication Provider name. Must be valid for the App's type; the supported providers per type are listed by list-app-templates.
Connection health of the App, server-managed. not_connected after create or a credential / tenant URL change; connected once verified via OAuth connect, an auth test, or a successful live tool call; error when the provider rejects the credentials (on connect, an auth test, or a live tool call).
not_connected, connected, error Per-tenant API base URL. Set by providers with per-org hosts; omitted by providers on a single global host.
Sub-account id, for providers that scope requests by a sub-account id on a shared host. Omitted by every other provider.
Non-secret auth metadata. Encrypted secret fields are never returned by the API.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

