curl --request PUT \
--url https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voicemailEnabled": true,
"voicemailGreetingUrl": "https://media.example.com/greeting.mp3",
"voicemailMaxDuration": 120,
"autoRecordEnabled": false,
"recordingFormat": "mp4",
"defaultAnswerBehavior": "webhook",
"maxConcurrentCalls": 100,
"whatsappCallingEnabled": false,
"whatsappSipEnabled": false
}
'import requests
url = "https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling"
payload = {
"voicemailEnabled": True,
"voicemailGreetingUrl": "https://media.example.com/greeting.mp3",
"voicemailMaxDuration": 120,
"autoRecordEnabled": False,
"recordingFormat": "mp4",
"defaultAnswerBehavior": "webhook",
"maxConcurrentCalls": 100,
"whatsappCallingEnabled": False,
"whatsappSipEnabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voicemailEnabled: true,
voicemailGreetingUrl: 'https://media.example.com/greeting.mp3',
voicemailMaxDuration: 120,
autoRecordEnabled: false,
recordingFormat: 'mp4',
defaultAnswerBehavior: 'webhook',
maxConcurrentCalls: 100,
whatsappCallingEnabled: false,
whatsappSipEnabled: false
})
};
fetch('https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling', 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://api.buildwithchirp.com/v1/organization/apps/{appId}/calling",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'voicemailEnabled' => true,
'voicemailGreetingUrl' => 'https://media.example.com/greeting.mp3',
'voicemailMaxDuration' => 120,
'autoRecordEnabled' => false,
'recordingFormat' => 'mp4',
'defaultAnswerBehavior' => 'webhook',
'maxConcurrentCalls' => 100,
'whatsappCallingEnabled' => false,
'whatsappSipEnabled' => false
]),
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.buildwithchirp.com/v1/organization/apps/{appId}/calling"
payload := strings.NewReader("{\n \"voicemailEnabled\": true,\n \"voicemailGreetingUrl\": \"https://media.example.com/greeting.mp3\",\n \"voicemailMaxDuration\": 120,\n \"autoRecordEnabled\": false,\n \"recordingFormat\": \"mp4\",\n \"defaultAnswerBehavior\": \"webhook\",\n \"maxConcurrentCalls\": 100,\n \"whatsappCallingEnabled\": false,\n \"whatsappSipEnabled\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"voicemailEnabled\": true,\n \"voicemailGreetingUrl\": \"https://media.example.com/greeting.mp3\",\n \"voicemailMaxDuration\": 120,\n \"autoRecordEnabled\": false,\n \"recordingFormat\": \"mp4\",\n \"defaultAnswerBehavior\": \"webhook\",\n \"maxConcurrentCalls\": 100,\n \"whatsappCallingEnabled\": false,\n \"whatsappSipEnabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"voicemailEnabled\": true,\n \"voicemailGreetingUrl\": \"https://media.example.com/greeting.mp3\",\n \"voicemailMaxDuration\": 120,\n \"autoRecordEnabled\": false,\n \"recordingFormat\": \"mp4\",\n \"defaultAnswerBehavior\": \"webhook\",\n \"maxConcurrentCalls\": 100,\n \"whatsappCallingEnabled\": false,\n \"whatsappSipEnabled\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "cc_2DbBs7GWhGvVNJGrDXr5RG0mBWI",
"appId": "app_2DbBs7GWhGvVNJGrDXr5RG0mBWI",
"organizationId": "<string>",
"voicemailEnabled": true,
"voicemailGreetingUrl": "<string>",
"voicemailMaxDuration": 123,
"autoRecordEnabled": true,
"maxConcurrentCalls": 123,
"whatsappCallingEnabled": true,
"whatsappSipEnabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}Update calling configuration
Create or update calling configuration for an app
curl --request PUT \
--url https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voicemailEnabled": true,
"voicemailGreetingUrl": "https://media.example.com/greeting.mp3",
"voicemailMaxDuration": 120,
"autoRecordEnabled": false,
"recordingFormat": "mp4",
"defaultAnswerBehavior": "webhook",
"maxConcurrentCalls": 100,
"whatsappCallingEnabled": false,
"whatsappSipEnabled": false
}
'import requests
url = "https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling"
payload = {
"voicemailEnabled": True,
"voicemailGreetingUrl": "https://media.example.com/greeting.mp3",
"voicemailMaxDuration": 120,
"autoRecordEnabled": False,
"recordingFormat": "mp4",
"defaultAnswerBehavior": "webhook",
"maxConcurrentCalls": 100,
"whatsappCallingEnabled": False,
"whatsappSipEnabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voicemailEnabled: true,
voicemailGreetingUrl: 'https://media.example.com/greeting.mp3',
voicemailMaxDuration: 120,
autoRecordEnabled: false,
recordingFormat: 'mp4',
defaultAnswerBehavior: 'webhook',
maxConcurrentCalls: 100,
whatsappCallingEnabled: false,
whatsappSipEnabled: false
})
};
fetch('https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling', 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://api.buildwithchirp.com/v1/organization/apps/{appId}/calling",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'voicemailEnabled' => true,
'voicemailGreetingUrl' => 'https://media.example.com/greeting.mp3',
'voicemailMaxDuration' => 120,
'autoRecordEnabled' => false,
'recordingFormat' => 'mp4',
'defaultAnswerBehavior' => 'webhook',
'maxConcurrentCalls' => 100,
'whatsappCallingEnabled' => false,
'whatsappSipEnabled' => false
]),
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.buildwithchirp.com/v1/organization/apps/{appId}/calling"
payload := strings.NewReader("{\n \"voicemailEnabled\": true,\n \"voicemailGreetingUrl\": \"https://media.example.com/greeting.mp3\",\n \"voicemailMaxDuration\": 120,\n \"autoRecordEnabled\": false,\n \"recordingFormat\": \"mp4\",\n \"defaultAnswerBehavior\": \"webhook\",\n \"maxConcurrentCalls\": 100,\n \"whatsappCallingEnabled\": false,\n \"whatsappSipEnabled\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"voicemailEnabled\": true,\n \"voicemailGreetingUrl\": \"https://media.example.com/greeting.mp3\",\n \"voicemailMaxDuration\": 120,\n \"autoRecordEnabled\": false,\n \"recordingFormat\": \"mp4\",\n \"defaultAnswerBehavior\": \"webhook\",\n \"maxConcurrentCalls\": 100,\n \"whatsappCallingEnabled\": false,\n \"whatsappSipEnabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buildwithchirp.com/v1/organization/apps/{appId}/calling")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"voicemailEnabled\": true,\n \"voicemailGreetingUrl\": \"https://media.example.com/greeting.mp3\",\n \"voicemailMaxDuration\": 120,\n \"autoRecordEnabled\": false,\n \"recordingFormat\": \"mp4\",\n \"defaultAnswerBehavior\": \"webhook\",\n \"maxConcurrentCalls\": 100,\n \"whatsappCallingEnabled\": false,\n \"whatsappSipEnabled\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "cc_2DbBs7GWhGvVNJGrDXr5RG0mBWI",
"appId": "app_2DbBs7GWhGvVNJGrDXr5RG0mBWI",
"organizationId": "<string>",
"voicemailEnabled": true,
"voicemailGreetingUrl": "<string>",
"voicemailMaxDuration": 123,
"autoRecordEnabled": true,
"maxConcurrentCalls": 123,
"whatsappCallingEnabled": true,
"whatsappSipEnabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request_error",
"message": "The phone number \"+1abc\" is not in E.164 format.",
"code": "invalid_phone_number",
"doc_url": "https://docs.buildwithchirp.com/api_reference/error-codes#invalid_phone_number",
"param": "from",
"provider": {
"source": "meta",
"code": 123,
"message": "<string>",
"fbtrace_id": "<string>",
"health_status": {
"entities": [
{
"id": "<string>",
"can_send_message": "AVAILABLE",
"errors": [
{
"error_code": 123,
"error_description": "<string>",
"possible_solution": "<string>"
}
]
}
]
}
},
"additional_info": [
"<string>"
]
}
}Authorizations
Admin API key (format: sk_admin_*) for organization-level operations
Path Parameters
"app_2DbBs7GWhGvVNJGrDXr5RG0mBWI"
Body
Enable or disable voicemail for unanswered calls
true
URL to a custom voicemail greeting audio file
"https://media.example.com/greeting.mp3"
Maximum voicemail recording duration in seconds (10-600)
10 <= x <= 600120
Automatically record all calls
false
Audio format for call recordings
mp4, ogg, webm "mp4"
Default behavior when a call is received: send webhook or go to voicemail
webhook, voicemail "webhook"
Maximum number of simultaneous active calls (1-10000)
1 <= x <= 10000100
Enable WhatsApp calling for this app
false
Enable WhatsApp SIP integration (requires whatsappCallingEnabled to be true)
false
Response
Calling configuration updated successfully
"cc_2DbBs7GWhGvVNJGrDXr5RG0mBWI"
"app_2DbBs7GWhGvVNJGrDXr5RG0mBWI"
mp4, ogg, webm webhook, voicemail