curl --request POST \
--url https://api.daily.co/v1/domain-dialin-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number": "+12555599999",
"name_prefix": "my-identifier-prefix",
"hmac": "9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=",
"room_creation_api": "https://mydomain.com/api/create-room",
"hold_music_url": "https://mydomain.com/hold-music.mp3",
"timeout_config": {
"message": "No Agents are available right now, please try again later"
},
"ivr_greeting": {
"message": "Please enter the dialin code for the meeting, it is in the meeting invite"
}
}
'import requests
url = "https://api.daily.co/v1/domain-dialin-config"
payload = {
"phone_number": "+12555599999",
"name_prefix": "my-identifier-prefix",
"hmac": "9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=",
"room_creation_api": "https://mydomain.com/api/create-room",
"hold_music_url": "https://mydomain.com/hold-music.mp3",
"timeout_config": { "message": "No Agents are available right now, please try again later" },
"ivr_greeting": { "message": "Please enter the dialin code for the meeting, it is in the meeting invite" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone_number: '+12555599999',
name_prefix: 'my-identifier-prefix',
hmac: '9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=',
room_creation_api: 'https://mydomain.com/api/create-room',
hold_music_url: 'https://mydomain.com/hold-music.mp3',
timeout_config: {message: 'No Agents are available right now, please try again later'},
ivr_greeting: {
message: 'Please enter the dialin code for the meeting, it is in the meeting invite'
}
})
};
fetch('https://api.daily.co/v1/domain-dialin-config', 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.daily.co/v1/domain-dialin-config",
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([
'phone_number' => '+12555599999',
'name_prefix' => 'my-identifier-prefix',
'hmac' => '9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=',
'room_creation_api' => 'https://mydomain.com/api/create-room',
'hold_music_url' => 'https://mydomain.com/hold-music.mp3',
'timeout_config' => [
'message' => 'No Agents are available right now, please try again later'
],
'ivr_greeting' => [
'message' => 'Please enter the dialin code for the meeting, it is in the meeting invite'
]
]),
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.daily.co/v1/domain-dialin-config"
payload := strings.NewReader("{\n \"phone_number\": \"+12555599999\",\n \"name_prefix\": \"my-identifier-prefix\",\n \"hmac\": \"9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=\",\n \"room_creation_api\": \"https://mydomain.com/api/create-room\",\n \"hold_music_url\": \"https://mydomain.com/hold-music.mp3\",\n \"timeout_config\": {\n \"message\": \"No Agents are available right now, please try again later\"\n },\n \"ivr_greeting\": {\n \"message\": \"Please enter the dialin code for the meeting, it is in the meeting invite\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.daily.co/v1/domain-dialin-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"+12555599999\",\n \"name_prefix\": \"my-identifier-prefix\",\n \"hmac\": \"9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=\",\n \"room_creation_api\": \"https://mydomain.com/api/create-room\",\n \"hold_music_url\": \"https://mydomain.com/hold-music.mp3\",\n \"timeout_config\": {\n \"message\": \"No Agents are available right now, please try again later\"\n },\n \"ivr_greeting\": {\n \"message\": \"Please enter the dialin code for the meeting, it is in the meeting invite\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daily.co/v1/domain-dialin-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"+12555599999\",\n \"name_prefix\": \"my-identifier-prefix\",\n \"hmac\": \"9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=\",\n \"room_creation_api\": \"https://mydomain.com/api/create-room\",\n \"hold_music_url\": \"https://mydomain.com/hold-music.mp3\",\n \"timeout_config\": {\n \"message\": \"No Agents are available right now, please try again later\"\n },\n \"ivr_greeting\": {\n \"message\": \"Please enter the dialin code for the meeting, it is in the meeting invite\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "0cb313e1-211f-4be0-833d-8c7305b19902",
"type": "pinless_dialin",
"config": {
"phone_number": "+12555599999",
"name_prefix": "my-identifier-prefix",
"hmac": "9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=",
"room_creation_api": "https://mydomain.com/api/create-room",
"hold_music_url": "https://mydomain.com/hold-music.mp3",
"timeout_config": {
"message": "No Agents are available right now, please try again later"
},
"ivr_greeting": {
"message": "Please enter the dialin code for the meeting, it is in the meeting invite"
}
}
}{
"error": "invalid-request-error",
"info": "Failed to configure pin dialin: 12096181843 not associated with domain: your-domain"
}Create Domain Dial Config Info
create a new pinless_dialin or pin_dialin config
curl --request POST \
--url https://api.daily.co/v1/domain-dialin-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number": "+12555599999",
"name_prefix": "my-identifier-prefix",
"hmac": "9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=",
"room_creation_api": "https://mydomain.com/api/create-room",
"hold_music_url": "https://mydomain.com/hold-music.mp3",
"timeout_config": {
"message": "No Agents are available right now, please try again later"
},
"ivr_greeting": {
"message": "Please enter the dialin code for the meeting, it is in the meeting invite"
}
}
'import requests
url = "https://api.daily.co/v1/domain-dialin-config"
payload = {
"phone_number": "+12555599999",
"name_prefix": "my-identifier-prefix",
"hmac": "9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=",
"room_creation_api": "https://mydomain.com/api/create-room",
"hold_music_url": "https://mydomain.com/hold-music.mp3",
"timeout_config": { "message": "No Agents are available right now, please try again later" },
"ivr_greeting": { "message": "Please enter the dialin code for the meeting, it is in the meeting invite" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone_number: '+12555599999',
name_prefix: 'my-identifier-prefix',
hmac: '9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=',
room_creation_api: 'https://mydomain.com/api/create-room',
hold_music_url: 'https://mydomain.com/hold-music.mp3',
timeout_config: {message: 'No Agents are available right now, please try again later'},
ivr_greeting: {
message: 'Please enter the dialin code for the meeting, it is in the meeting invite'
}
})
};
fetch('https://api.daily.co/v1/domain-dialin-config', 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.daily.co/v1/domain-dialin-config",
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([
'phone_number' => '+12555599999',
'name_prefix' => 'my-identifier-prefix',
'hmac' => '9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=',
'room_creation_api' => 'https://mydomain.com/api/create-room',
'hold_music_url' => 'https://mydomain.com/hold-music.mp3',
'timeout_config' => [
'message' => 'No Agents are available right now, please try again later'
],
'ivr_greeting' => [
'message' => 'Please enter the dialin code for the meeting, it is in the meeting invite'
]
]),
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.daily.co/v1/domain-dialin-config"
payload := strings.NewReader("{\n \"phone_number\": \"+12555599999\",\n \"name_prefix\": \"my-identifier-prefix\",\n \"hmac\": \"9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=\",\n \"room_creation_api\": \"https://mydomain.com/api/create-room\",\n \"hold_music_url\": \"https://mydomain.com/hold-music.mp3\",\n \"timeout_config\": {\n \"message\": \"No Agents are available right now, please try again later\"\n },\n \"ivr_greeting\": {\n \"message\": \"Please enter the dialin code for the meeting, it is in the meeting invite\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.daily.co/v1/domain-dialin-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"+12555599999\",\n \"name_prefix\": \"my-identifier-prefix\",\n \"hmac\": \"9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=\",\n \"room_creation_api\": \"https://mydomain.com/api/create-room\",\n \"hold_music_url\": \"https://mydomain.com/hold-music.mp3\",\n \"timeout_config\": {\n \"message\": \"No Agents are available right now, please try again later\"\n },\n \"ivr_greeting\": {\n \"message\": \"Please enter the dialin code for the meeting, it is in the meeting invite\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daily.co/v1/domain-dialin-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"+12555599999\",\n \"name_prefix\": \"my-identifier-prefix\",\n \"hmac\": \"9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=\",\n \"room_creation_api\": \"https://mydomain.com/api/create-room\",\n \"hold_music_url\": \"https://mydomain.com/hold-music.mp3\",\n \"timeout_config\": {\n \"message\": \"No Agents are available right now, please try again later\"\n },\n \"ivr_greeting\": {\n \"message\": \"Please enter the dialin code for the meeting, it is in the meeting invite\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "0cb313e1-211f-4be0-833d-8c7305b19902",
"type": "pinless_dialin",
"config": {
"phone_number": "+12555599999",
"name_prefix": "my-identifier-prefix",
"hmac": "9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0=",
"room_creation_api": "https://mydomain.com/api/create-room",
"hold_music_url": "https://mydomain.com/hold-music.mp3",
"timeout_config": {
"message": "No Agents are available right now, please try again later"
},
"ivr_greeting": {
"message": "Please enter the dialin code for the meeting, it is in the meeting invite"
}
}
}{
"error": "invalid-request-error",
"info": "Failed to configure pin dialin: 12096181843 not associated with domain: your-domain"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
the configuration object passed to the POST API that creates the dialin config.
The type of dial-in configuration to create.
pin_dialin, pinless_dialin The phone number to configure for pinless_dialin or pin_dialin, in E.164 format (e.g. "+18058700061"). If the same number is used by any other config then the API will fail. Required for pinless_dialin, optional for pin_dialin.
"+12555599999"
friendly name for the configuration.
"my-identifier-prefix"
The HMAC signature used to verify the webhook called to "room_creation_api". (only for pinless_dialin type)
"9jyatvPWQfBymCGDOYPYKF/TRZXR+08Gj4bvPF78pH0="
The URL to the hold music to play when the call is received, (only for pinless_dialin type). The hold music must be a publicly accessible URL in MP3 format. The hold music must be less than 10MB in size and less than 60 seconds in duration. In pinless_dialin, the hold music will be played twice.
"https://mydomain.com/hold-music.mp3"
The timeout configuration for the dialin config.
Show child attributes
Show child attributes
configuration when the call is received on phone number (only for pin_dialin).
Show child attributes
Show child attributes
Response
The final dialin config for the id.
A unique, opaque ID for this object. You can use this ID in API calls, and in paginated list operations.
"0cb313e1-211f-4be0-833d-8c7305b19902"
describes the type of configuration. It can be pinless_dialin or pin_dialin.
pinless_dialin, pin_dialin "pinless_dialin"
the configuration object passed to the POST API that creates the dialin config.
Show child attributes
Show child attributes