Providers
Create Provider
Create a new telephony provider configuration
POST
/
api
/
v2
/
platform
/
telephony
/
providers-configurations
/
Create Provider
curl --request POST \
--url https://unpod.ai/api/v2/platform/telephony/providers-configurations/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Org-Handle: <org-handle>' \
--data '
{
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "your_auth_token_here"
}
'import requests
url = "https://unpod.ai/api/v2/platform/telephony/providers-configurations/"
payload = {
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "your_auth_token_here"
}
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Org-Handle': '<org-handle>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
provider: 'twilio',
account_sid: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
auth_token: 'your_auth_token_here'
})
};
fetch('https://unpod.ai/api/v2/platform/telephony/providers-configurations/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'provider' => 'twilio',
'account_sid' => 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'auth_token' => 'your_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/"
payload := strings.NewReader("{\n \"provider\": \"twilio\",\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"your_auth_token_here\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://unpod.ai/api/v2/platform/telephony/providers-configurations/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"twilio\",\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"your_auth_token_here\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/providers-configurations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"twilio\",\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"your_auth_token_here\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 201,
"message": "Provider configuration created successfully.",
"data": {
"id": 42,
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"created_at": "2026-02-07T10:00:00Z"
}
}
{
"status_code": 400,
"message": "Provider configuration creation failed.",
"errors": "Invalid account_sid or auth_token"
}
{
"status_code": 201,
"message": "Provider configuration created successfully.",
"data": {
"id": 42,
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"created_at": "2026-02-07T10:00:00Z"
}
}
{
"status_code": 400,
"message": "Provider configuration creation failed.",
"errors": "Invalid account_sid or auth_token"
}
Create Provider Configuration
Create a new telephony provider configuration by linking your provider credentials (Account SID and Auth Token) to your organization. These configurations are used to connect telephony providers to bridges.Prerequisites: Make sure you have your API Token, Org-Handle, and telephony provider credentials ready. See Authentication for details.
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 |
You can get the
Org-Handle by hitting the Get All Organizations API. The domain_handle field in the response is your Org-Handle.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| provider | string | Yes | Provider identifier (slug or ID from Get Providers API) |
| account_sid | string | Yes | Provider Account SID / Account identifier |
| auth_token | string | Yes | Provider Auth Token / Secret key |
Response Fields
| Field | Type | Description |
|---|---|---|
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | object | Created 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 (auth_token is not returned) |
| created_at | string | Creation timestamp (ISO 8601) |
Common Error Codes
| Status Code | Description |
|---|---|
| 201 | Created - Provider configuration created |
| 400 | Bad Request - Invalid credentials or parameters |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Invalid organization handle |
| 409 | Conflict - Configuration already exists |
| 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'
};
// Create a provider configuration
const createProvider = async (provider, accountSid, authToken) => {
const response = await axios.post(
'https://unpod.ai/api/v2/platform/telephony/providers-configurations/',
{ provider, account_sid: accountSid, auth_token: authToken },
{ headers }
);
console.log(`Provider created with ID: ${response.data.data.id}`);
return response.data.data;
};
// Example usage
createProvider('twilio', 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'your-auth-token');
import requests
headers = {
'Authorization': 'Token your-api-token',
'Org-Handle': 'your-org-handle',
'Content-Type': 'application/json'
}
def create_provider(provider: str, account_sid: str, auth_token: str):
"""Create a new telephony provider configuration"""
url = 'https://unpod.ai/api/v2/platform/telephony/providers-configurations/'
payload = {
'provider': provider,
'account_sid': account_sid,
'auth_token': auth_token
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(f"Provider created with ID: {data['data']['id']}")
return data['data']
# Example usage
create_provider('twilio', 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'your-auth-token')
# Create a provider configuration
curl -X POST "https://unpod.ai/api/v2/platform/telephony/providers-configurations/" \
-H "Authorization: Token your-api-token" \
-H "Org-Handle: your-org-handle" \
-H "Content-Type: application/json" \
-d '{
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "your-auth-token-here"
}'
Best Practices
- Provider Slug: Use the
slugfrom the Get Telephony Providers endpoint to identify the provider - Credential Security: Never log or expose
auth_tokenvalues - treat them as secrets - Credential Rotation: Use the Update Provider endpoint to rotate credentials without deleting the configuration
- Configuration ID: Store the returned
idto reference this configuration when connecting to bridges - Error Handling: Handle 400 errors that indicate invalid credentials before they cause production issues
- Security: Keep API tokens secure and rotate them regularly
Authorizations
Format: Token
Headers
Organization domain handle
Example:
"unpod.tv"
Body
application/json
Response
Provider created
Was this page helpful?
⌘I
Create Provider
curl --request POST \
--url https://unpod.ai/api/v2/platform/telephony/providers-configurations/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Org-Handle: <org-handle>' \
--data '
{
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "your_auth_token_here"
}
'import requests
url = "https://unpod.ai/api/v2/platform/telephony/providers-configurations/"
payload = {
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "your_auth_token_here"
}
headers = {
"Org-Handle": "<org-handle>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Org-Handle': '<org-handle>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
provider: 'twilio',
account_sid: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
auth_token: 'your_auth_token_here'
})
};
fetch('https://unpod.ai/api/v2/platform/telephony/providers-configurations/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'provider' => 'twilio',
'account_sid' => 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'auth_token' => 'your_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/"
payload := strings.NewReader("{\n \"provider\": \"twilio\",\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"your_auth_token_here\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://unpod.ai/api/v2/platform/telephony/providers-configurations/")
.header("Org-Handle", "<org-handle>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"twilio\",\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"your_auth_token_here\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://unpod.ai/api/v2/platform/telephony/providers-configurations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Org-Handle"] = '<org-handle>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"twilio\",\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"your_auth_token_here\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 201,
"message": "Provider configuration created successfully.",
"data": {
"id": 42,
"provider": "twilio",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"created_at": "2026-02-07T10:00:00Z"
}
}
{
"status_code": 400,
"message": "Provider configuration creation failed.",
"errors": "Invalid account_sid or auth_token"
}