curl --request POST \
--url https://api.qcall.ai/api/v1/inbound/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"assistant_id": "<string>",
"dialer_id": "<string>",
"notification": false
}
'import requests
url = "https://api.qcall.ai/api/v1/inbound/create"
payload = {
"name": "<string>",
"assistant_id": "<string>",
"dialer_id": "<string>",
"notification": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
assistant_id: '<string>',
dialer_id: '<string>',
notification: false
})
};
fetch('https://api.qcall.ai/api/v1/inbound/create', 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.qcall.ai/api/v1/inbound/create",
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([
'name' => '<string>',
'assistant_id' => '<string>',
'dialer_id' => '<string>',
'notification' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.qcall.ai/api/v1/inbound/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"assistant_id\": \"<string>\",\n \"dialer_id\": \"<string>\",\n \"notification\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.qcall.ai/api/v1/inbound/create")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"assistant_id\": \"<string>\",\n \"dialer_id\": \"<string>\",\n \"notification\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qcall.ai/api/v1/inbound/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"assistant_id\": \"<string>\",\n \"dialer_id\": \"<string>\",\n \"notification\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"assistant_id": "<string>",
"dialer_id": "<string>",
"assistant_name": "<string>",
"phone_number": "<string>",
"incoming_count": 123,
"notification": true
}{
"error": 123,
"message": "<string>"
}Create Inbound
Creates a new inbound assistant. An inbound assistant binds an existing assistant to a dialer phone number, so that incoming calls placed to that number are handled automatically by the selected assistant. Note: to receive incoming calls you must also configure your telephony provider (e.g. Twilio) to send call webhooks to https://api.qcall.ai/inbound.
curl --request POST \
--url https://api.qcall.ai/api/v1/inbound/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"assistant_id": "<string>",
"dialer_id": "<string>",
"notification": false
}
'import requests
url = "https://api.qcall.ai/api/v1/inbound/create"
payload = {
"name": "<string>",
"assistant_id": "<string>",
"dialer_id": "<string>",
"notification": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
assistant_id: '<string>',
dialer_id: '<string>',
notification: false
})
};
fetch('https://api.qcall.ai/api/v1/inbound/create', 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.qcall.ai/api/v1/inbound/create",
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([
'name' => '<string>',
'assistant_id' => '<string>',
'dialer_id' => '<string>',
'notification' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.qcall.ai/api/v1/inbound/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"assistant_id\": \"<string>\",\n \"dialer_id\": \"<string>\",\n \"notification\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.qcall.ai/api/v1/inbound/create")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"assistant_id\": \"<string>\",\n \"dialer_id\": \"<string>\",\n \"notification\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qcall.ai/api/v1/inbound/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"assistant_id\": \"<string>\",\n \"dialer_id\": \"<string>\",\n \"notification\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"assistant_id": "<string>",
"dialer_id": "<string>",
"assistant_name": "<string>",
"phone_number": "<string>",
"incoming_count": 123,
"notification": true
}{
"error": 123,
"message": "<string>"
}notification to true to enable notifications for incoming calls handled by this inbound assistant.
https://api.qcall.ai/inbound. See Twilio’s TwiML request documentation for more details.Authorizations
Body
Inbound assistant to add
The name of the inbound assistant
ID of the assistant (or IVR assistant) that will handle the inbound calls
ID of the dialer whose phone number receives the inbound calls
Whether to enable notifications for incoming calls handled by this inbound assistant
Response
Inbound assistant response
Unique identifier of the inbound assistant
The display name of the inbound assistant
ID of the assistant that answers the inbound calls
ID of the dialer that provides the phone number
Name of the linked assistant
Phone number the inbound assistant is attached to
Number of incoming calls handled by this inbound assistant
Whether notifications are enabled for incoming calls handled by this inbound assistant

