Passer un appel téléphonique
curl --request POST \
--url https://api.example.com/api/optimus/phone-callimport requests
url = "https://api.example.com/api/optimus/phone-call"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/optimus/phone-call', 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.example.com/api/optimus/phone-call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/optimus/phone-call"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/api/optimus/phone-call")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/optimus/phone-call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyAppels
Passer un appel téléphonique
Lancer un appel téléphonique sortant
POST
/
api
/
optimus
/
phone-call
Passer un appel téléphonique
curl --request POST \
--url https://api.example.com/api/optimus/phone-callimport requests
url = "https://api.example.com/api/optimus/phone-call"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/optimus/phone-call', 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.example.com/api/optimus/phone-call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/optimus/phone-call"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/api/optimus/phone-call")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/optimus/phone-call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyRequête
curl -X POST https://app.orova.ai/api/optimus/call \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assistantId": "AGENT_ID",
"phoneNumber": "+1234567890",
"phoneNumberId": "PHONE_NUMBER_ID",
"contactName": "John Doe",
"workspaceId": "WORKSPACE_ID"
}'
Paramètres
| Champ | Type | Requis | Description |
|---|---|---|---|
assistantId | string | Oui | Agent à utiliser pour l’appel |
phoneNumber | string | Oui | Numéro de téléphone de destination (E.164) |
phoneNumberId | string | Oui | Numéro Orova depuis lequel appeler |
contactName | string | Non | Nom du contact pour l’historique et l’injection de variables |
workspaceId | string | Oui | ID de l’espace de travail |
Réponse
{
"call_id": "call_abc123",
"status": "initiated"
}
Remarques
- Une vérification des crédits est effectuée avant l’appel. Renvoie
402si les crédits sont insuffisants. - Si
contactNameest fourni, Orova recherche le contact et injecte ses données sous forme de variables. - L’appel est lancé via Twilio. L’agent prononce le premier message lorsque le destinataire répond.
Cette page vous a-t-elle été utile ?
⌘I

