Providers
Update Provider
Partially update a telephony provider configuration
PATCH
/
api
/
v2
/
platform
/
telephony
/
providers-configurations
/
{id}
/
Update Provider
curl --request PATCH \
--url https://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Org-Handle: <org-handle>' \
--data '
{
"auth_token": "your_new_auth_token_here"
}
'import requests
url = "https://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/"
payload = { "auth_token": "your_new_auth_token_here" }
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Org-Handle': '<org-handle>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({auth_token: 'your_new_auth_token_here'})
};
fetch('https://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://unpod.ai/api/v2/platform/telephony/providers-configurations/{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([
'auth_token' => 'your_new_auth_token_here'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"Org-Handle: <org-handle>"
],
]);
$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://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/"
payload := strings.NewReader("{\n \"auth_token\": \"your_new_auth_token_here\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Org-Handle", "<org-handle>")
req.Header.Add("Authorization", "<api-key>")
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://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"auth_token\": \"your_new_auth_token_here\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auth_token\": \"your_new_auth_token_here\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 200,
"message": "Provider configuration updated successfully.",
"data": {
"id": 42,
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"created_at": "2026-02-07T10:00:00Z"
}
}
{
"status_code": 404,
"message": "Provider configuration not found."
}
{
"status_code": 200,
"message": "Provider configuration updated successfully.",
"data": {
"id": 42,
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"created_at": "2026-02-07T10:00:00Z"
}
}
{
"status_code": 404,
"message": "Provider configuration not found."
}
Update Provider Configuration
Partially update an existing telephony provider configuration. This is useful for rotating credentials such as theauth_token without deleting and recreating the entire configuration.
Prerequisites: Make sure you have your API Token and Org-Handle ready. See Authentication for details.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique identifier of the provider configuration |
You can get the provider configuration
id by hitting the Get All Providers API.Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
| Content-Type | string | Yes | application/json |
Request Body
All fields are optional - include only the fields you wish to update.| Field | Type | Required | Description |
|---|---|---|---|
| auth_token | string | No | Updated Auth Token / Secret key |
| account_sid | string | No | Updated Account SID |
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Updated provider config details |
Provider Config Object Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Unique provider configuration identifier |
| provider | string | Provider slug/identifier |
| account_sid | string | Account SID for the provider |
| created_at | string | Configuration creation timestamp |
Common Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Configuration updated successfully |
| 400 | Bad Request - Invalid update parameters |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Invalid organization handle |
| 404 | Not Found - Provider configuration not found |
| 500 | Internal Server Error - Server-side error |
Code Examples
const axios = require('axios');
const headers = {
'Authorization': 'Token your-api-token',
'Org-Handle': 'your-org-handle',
'Content-Type': 'application/json'
};
// Update a provider configuration
const updateProvider = async (id, updates) => {
const response = await axios.patch(
`https://unpod.ai/api/v2/platform/telephony/providers-configurations/${id}/`,
updates,
{ headers }
);
console.log(`Provider #${response.data.data.id} updated successfully`);
return response.data.data;
};
// Example: rotate auth_token
updateProvider(42, { auth_token: 'your-new-auth-token-here' });
import requests
headers = {
'Authorization': 'Token your-api-token',
'Org-Handle': 'your-org-handle',
'Content-Type': 'application/json'
}
def update_provider(config_id: int, updates: dict):
"""Partially update a provider configuration"""
url = f'https://unpod.ai/api/v2/platform/telephony/providers-configurations/{config_id}/'
response = requests.patch(url, headers=headers, json=updates)
data = response.json()
print(f"Provider #{data['data']['id']} updated successfully")
return data['data']
# Example: rotate auth_token
update_provider(42, {'auth_token': 'your-new-auth-token-here'})
# Update a provider configuration (rotate auth token)
curl -X PATCH "https://unpod.ai/api/v2/platform/telephony/providers-configurations/42/" \
-H "Authorization: Token your-api-token" \
-H "Org-Handle: your-org-handle" \
-H "Content-Type: application/json" \
-d '{
"auth_token": "your-new-auth-token-here"
}'
Best Practices
- Partial Updates: Only include fields you want to change - PATCH supports partial updates
- Credential Rotation: Regularly rotate
auth_tokenvalues for security without disrupting bridges - Security: Never expose
auth_tokenvalues in logs or responses - Verify Before Update: Use Get Provider by ID to confirm the configuration exists before patching
- Error Handling: Handle 404 and 400 errors to catch invalid IDs or credential formats
Authorizations
Format: Token
Headers
Organization domain handle
Example:
"unpod.tv"
Path Parameters
Example:
42
Body
application/json
Response
Provider updated
Was this page helpful?
⌘I
Update Provider
curl --request PATCH \
--url https://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Org-Handle: <org-handle>' \
--data '
{
"auth_token": "your_new_auth_token_here"
}
'import requests
url = "https://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/"
payload = { "auth_token": "your_new_auth_token_here" }
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Org-Handle': '<org-handle>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({auth_token: 'your_new_auth_token_here'})
};
fetch('https://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://unpod.ai/api/v2/platform/telephony/providers-configurations/{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([
'auth_token' => 'your_new_auth_token_here'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"Org-Handle: <org-handle>"
],
]);
$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://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/"
payload := strings.NewReader("{\n \"auth_token\": \"your_new_auth_token_here\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Org-Handle", "<org-handle>")
req.Header.Add("Authorization", "<api-key>")
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://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"auth_token\": \"your_new_auth_token_here\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/providers-configurations/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auth_token\": \"your_new_auth_token_here\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 200,
"message": "Provider configuration updated successfully.",
"data": {
"id": 42,
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"created_at": "2026-02-07T10:00:00Z"
}
}
{
"status_code": 404,
"message": "Provider configuration not found."
}