cURL
curl --request POST \
--url https://api.fluents.ai/v1/calls/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to_number": "+1234567890",
"from_number": "+0987654321",
"agent": {},
"telephony_provider": "twilio",
"agent_phone_number": "+1234567890",
"context": {},
"telephony_params": {},
"human_detection_result": "human",
"do_not_call_result": false,
"telephony_id": "call_123",
"telephony_metadata": {},
"hipaa_compliant": false,
"on_no_human_answer": "continue",
"run_do_not_call_detection": true,
"telephony_account_connection": {},
"is_outgoing": true
}
'import requests
url = "https://api.fluents.ai/v1/calls/create"
payload = {
"to_number": "+1234567890",
"from_number": "+0987654321",
"agent": {},
"telephony_provider": "twilio",
"agent_phone_number": "+1234567890",
"context": {},
"telephony_params": {},
"human_detection_result": "human",
"do_not_call_result": False,
"telephony_id": "call_123",
"telephony_metadata": {},
"hipaa_compliant": False,
"on_no_human_answer": "continue",
"run_do_not_call_detection": True,
"telephony_account_connection": {},
"is_outgoing": True
}
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({
to_number: '+1234567890',
from_number: '+0987654321',
agent: {},
telephony_provider: 'twilio',
agent_phone_number: '+1234567890',
context: {},
telephony_params: {},
human_detection_result: 'human',
do_not_call_result: false,
telephony_id: 'call_123',
telephony_metadata: {},
hipaa_compliant: false,
on_no_human_answer: 'continue',
run_do_not_call_detection: true,
telephony_account_connection: {},
is_outgoing: true
})
};
fetch('https://api.fluents.ai/v1/calls/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.fluents.ai/v1/calls/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([
'to_number' => '+1234567890',
'from_number' => '+0987654321',
'agent' => [
],
'telephony_provider' => 'twilio',
'agent_phone_number' => '+1234567890',
'context' => [
],
'telephony_params' => [
],
'human_detection_result' => 'human',
'do_not_call_result' => false,
'telephony_id' => 'call_123',
'telephony_metadata' => [
],
'hipaa_compliant' => false,
'on_no_human_answer' => 'continue',
'run_do_not_call_detection' => true,
'telephony_account_connection' => [
],
'is_outgoing' => true
]),
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.fluents.ai/v1/calls/create"
payload := strings.NewReader("{\n \"to_number\": \"+1234567890\",\n \"from_number\": \"+0987654321\",\n \"agent\": {},\n \"telephony_provider\": \"twilio\",\n \"agent_phone_number\": \"+1234567890\",\n \"context\": {},\n \"telephony_params\": {},\n \"human_detection_result\": \"human\",\n \"do_not_call_result\": false,\n \"telephony_id\": \"call_123\",\n \"telephony_metadata\": {},\n \"hipaa_compliant\": false,\n \"on_no_human_answer\": \"continue\",\n \"run_do_not_call_detection\": true,\n \"telephony_account_connection\": {},\n \"is_outgoing\": true\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.fluents.ai/v1/calls/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to_number\": \"+1234567890\",\n \"from_number\": \"+0987654321\",\n \"agent\": {},\n \"telephony_provider\": \"twilio\",\n \"agent_phone_number\": \"+1234567890\",\n \"context\": {},\n \"telephony_params\": {},\n \"human_detection_result\": \"human\",\n \"do_not_call_result\": false,\n \"telephony_id\": \"call_123\",\n \"telephony_metadata\": {},\n \"hipaa_compliant\": false,\n \"on_no_human_answer\": \"continue\",\n \"run_do_not_call_detection\": true,\n \"telephony_account_connection\": {},\n \"is_outgoing\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluents.ai/v1/calls/create")
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 \"to_number\": \"+1234567890\",\n \"from_number\": \"+0987654321\",\n \"agent\": {},\n \"telephony_provider\": \"twilio\",\n \"agent_phone_number\": \"+1234567890\",\n \"context\": {},\n \"telephony_params\": {},\n \"human_detection_result\": \"human\",\n \"do_not_call_result\": false,\n \"telephony_id\": \"call_123\",\n \"telephony_metadata\": {},\n \"hipaa_compliant\": false,\n \"on_no_human_answer\": \"continue\",\n \"run_do_not_call_detection\": true,\n \"telephony_account_connection\": {},\n \"is_outgoing\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"to_number": "+1234567890",
"from_number": "+0987654321",
"agent": {},
"telephony_provider": "twilio",
"agent_phone_number": "+1234567890",
"context": {},
"telephony_params": {},
"action_history": [
{
"event_type": "action_completed",
"timestamp": "2025-03-26T06:10:33.560833+00:00",
"action_id": "51d82e68-b63a-4b85-b0de-7fd2c8b36c88",
"action_type": "action_external",
"action_label": "Book Appointment",
"parameters": {
"key": "value"
},
"result": {
"json": {
"success": true
},
"http_status_code": 200,
"error": null
}
}
],
"status": "in_progress",
"error_message": "Call failed to connect",
"recording_available": true,
"transcript": "Hello, this is a transcript",
"human_detection_result": "human",
"do_not_call_result": false,
"telephony_id": "call_123",
"stage": "created",
"stage_outcome": "human_unanswered",
"telephony_metadata": {},
"start_time": "2023-01-01T00:00:00Z",
"end_time": "2023-01-01T00:01:00Z",
"hipaa_compliant": false,
"on_no_human_answer": "continue",
"run_do_not_call_detection": true,
"telephony_account_connection": {},
"is_outgoing": true,
"errors": [
"Error 1",
"Error 2"
]
}{
"message": "<string>",
"error": "<string>",
"statusCode": 400
}{
"message": "<string>",
"error": "<string>",
"statusCode": 404
}Calls
Create call
POST
/
v1
/
calls
/
create
cURL
curl --request POST \
--url https://api.fluents.ai/v1/calls/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to_number": "+1234567890",
"from_number": "+0987654321",
"agent": {},
"telephony_provider": "twilio",
"agent_phone_number": "+1234567890",
"context": {},
"telephony_params": {},
"human_detection_result": "human",
"do_not_call_result": false,
"telephony_id": "call_123",
"telephony_metadata": {},
"hipaa_compliant": false,
"on_no_human_answer": "continue",
"run_do_not_call_detection": true,
"telephony_account_connection": {},
"is_outgoing": true
}
'import requests
url = "https://api.fluents.ai/v1/calls/create"
payload = {
"to_number": "+1234567890",
"from_number": "+0987654321",
"agent": {},
"telephony_provider": "twilio",
"agent_phone_number": "+1234567890",
"context": {},
"telephony_params": {},
"human_detection_result": "human",
"do_not_call_result": False,
"telephony_id": "call_123",
"telephony_metadata": {},
"hipaa_compliant": False,
"on_no_human_answer": "continue",
"run_do_not_call_detection": True,
"telephony_account_connection": {},
"is_outgoing": True
}
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({
to_number: '+1234567890',
from_number: '+0987654321',
agent: {},
telephony_provider: 'twilio',
agent_phone_number: '+1234567890',
context: {},
telephony_params: {},
human_detection_result: 'human',
do_not_call_result: false,
telephony_id: 'call_123',
telephony_metadata: {},
hipaa_compliant: false,
on_no_human_answer: 'continue',
run_do_not_call_detection: true,
telephony_account_connection: {},
is_outgoing: true
})
};
fetch('https://api.fluents.ai/v1/calls/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.fluents.ai/v1/calls/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([
'to_number' => '+1234567890',
'from_number' => '+0987654321',
'agent' => [
],
'telephony_provider' => 'twilio',
'agent_phone_number' => '+1234567890',
'context' => [
],
'telephony_params' => [
],
'human_detection_result' => 'human',
'do_not_call_result' => false,
'telephony_id' => 'call_123',
'telephony_metadata' => [
],
'hipaa_compliant' => false,
'on_no_human_answer' => 'continue',
'run_do_not_call_detection' => true,
'telephony_account_connection' => [
],
'is_outgoing' => true
]),
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.fluents.ai/v1/calls/create"
payload := strings.NewReader("{\n \"to_number\": \"+1234567890\",\n \"from_number\": \"+0987654321\",\n \"agent\": {},\n \"telephony_provider\": \"twilio\",\n \"agent_phone_number\": \"+1234567890\",\n \"context\": {},\n \"telephony_params\": {},\n \"human_detection_result\": \"human\",\n \"do_not_call_result\": false,\n \"telephony_id\": \"call_123\",\n \"telephony_metadata\": {},\n \"hipaa_compliant\": false,\n \"on_no_human_answer\": \"continue\",\n \"run_do_not_call_detection\": true,\n \"telephony_account_connection\": {},\n \"is_outgoing\": true\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.fluents.ai/v1/calls/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to_number\": \"+1234567890\",\n \"from_number\": \"+0987654321\",\n \"agent\": {},\n \"telephony_provider\": \"twilio\",\n \"agent_phone_number\": \"+1234567890\",\n \"context\": {},\n \"telephony_params\": {},\n \"human_detection_result\": \"human\",\n \"do_not_call_result\": false,\n \"telephony_id\": \"call_123\",\n \"telephony_metadata\": {},\n \"hipaa_compliant\": false,\n \"on_no_human_answer\": \"continue\",\n \"run_do_not_call_detection\": true,\n \"telephony_account_connection\": {},\n \"is_outgoing\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluents.ai/v1/calls/create")
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 \"to_number\": \"+1234567890\",\n \"from_number\": \"+0987654321\",\n \"agent\": {},\n \"telephony_provider\": \"twilio\",\n \"agent_phone_number\": \"+1234567890\",\n \"context\": {},\n \"telephony_params\": {},\n \"human_detection_result\": \"human\",\n \"do_not_call_result\": false,\n \"telephony_id\": \"call_123\",\n \"telephony_metadata\": {},\n \"hipaa_compliant\": false,\n \"on_no_human_answer\": \"continue\",\n \"run_do_not_call_detection\": true,\n \"telephony_account_connection\": {},\n \"is_outgoing\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"to_number": "+1234567890",
"from_number": "+0987654321",
"agent": {},
"telephony_provider": "twilio",
"agent_phone_number": "+1234567890",
"context": {},
"telephony_params": {},
"action_history": [
{
"event_type": "action_completed",
"timestamp": "2025-03-26T06:10:33.560833+00:00",
"action_id": "51d82e68-b63a-4b85-b0de-7fd2c8b36c88",
"action_type": "action_external",
"action_label": "Book Appointment",
"parameters": {
"key": "value"
},
"result": {
"json": {
"success": true
},
"http_status_code": 200,
"error": null
}
}
],
"status": "in_progress",
"error_message": "Call failed to connect",
"recording_available": true,
"transcript": "Hello, this is a transcript",
"human_detection_result": "human",
"do_not_call_result": false,
"telephony_id": "call_123",
"stage": "created",
"stage_outcome": "human_unanswered",
"telephony_metadata": {},
"start_time": "2023-01-01T00:00:00Z",
"end_time": "2023-01-01T00:01:00Z",
"hipaa_compliant": false,
"on_no_human_answer": "continue",
"run_do_not_call_detection": true,
"telephony_account_connection": {},
"is_outgoing": true,
"errors": [
"Error 1",
"Error 2"
]
}{
"message": "<string>",
"error": "<string>",
"statusCode": 400
}{
"message": "<string>",
"error": "<string>",
"statusCode": 404
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Example:
"+1234567890"
Example:
"+0987654321"
Example:
"twilio"
Example:
"+1234567890"
Available options:
human, no_human Example:
"human"
Example:
false
Example:
"call_123"
Example:
false
Available options:
continue, hangup Example:
"continue"
Example:
true
Example:
true
Response
Example:
"550e8400-e29b-41d4-a716-446655440000"
Example:
"550e8400-e29b-41d4-a716-446655440000"
Example:
"+1234567890"
Example:
"+0987654321"
Example:
"twilio"
Example:
"+1234567890"
Example:
[
{
"event_type": "action_completed",
"timestamp": "2025-03-26T06:10:33.560833+00:00",
"action_id": "51d82e68-b63a-4b85-b0de-7fd2c8b36c88",
"action_type": "action_external",
"action_label": "Book Appointment",
"parameters": { "key": "value" },
"result": {
"json": { "success": true },
"http_status_code": 200,
"error": null
}
}
]
Available options:
not_started, in_progress, error, ended Example:
"in_progress"
Example:
"Call failed to connect"
Example:
true
Example:
"Hello, this is a transcript"
Available options:
human, no_human Example:
"human"
Example:
false
Example:
"call_123"
Available options:
created, picked_up, transfer_started, transfer_successful Example:
"created"
Available options:
human_unanswered, call_did_not_connect, human_disconnected, bot_disconnected, transfer_unanswered, transfer_disconnected Example:
"human_unanswered"
Example:
"2023-01-01T00:00:00Z"
Example:
"2023-01-01T00:01:00Z"
Example:
false
Available options:
continue, hangup Example:
"continue"
Example:
true
Example:
true
Example:
["Error 1", "Error 2"]
Was this page helpful?
⌘I

