Get call status or initiate outbound call
curl --request GET \
--url https://api.call24x7.ai/outbound_call \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.call24x7.ai/outbound_call"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.call24x7.ai/outbound_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.call24x7.ai/outbound_call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.call24x7.ai/outbound_call"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.call24x7.ai/outbound_call")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.call24x7.ai/outbound_call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"call_id": "<string>",
"status": "IDLE",
"message": "<string>"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}API Endpoints
Get Call Status
Retrieve the status of an existing call by call_id, or initiate a new outbound call using query parameters.
GET
/
outbound_call
Get call status or initiate outbound call
curl --request GET \
--url https://api.call24x7.ai/outbound_call \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.call24x7.ai/outbound_call"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.call24x7.ai/outbound_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.call24x7.ai/outbound_call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.call24x7.ai/outbound_call"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.call24x7.ai/outbound_call")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.call24x7.ai/outbound_call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"call_id": "<string>",
"status": "IDLE",
"message": "<string>"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}{
"success": false,
"message": "<string>",
"error_code": "MISSING_PARAMS"
}Overview
Retrieve the status of an existing call by providing thecall_id, or initiate a new outbound call using query parameters.
Parameters
string
Existing call ID to retrieve status for. If provided, other parameters are ignored.
string
required
Phone number to call in E.164 format (e.g., +1234567890). Required if
call_id is not provided.string
required
ID of the AI agent to use for the call. Required if
call_id is not provided.string
Optional webhook URL to receive call completion notifications. Must be a valid HTTP/HTTPS URL.
string
Optional external call ID for tracking purposes.
Example Request
curl -X GET "https://api.call24x7.ai/outbound_call?to_phone_number=%2B1234567890&agent_id=agent-123" \
-H "Authorization: Bearer YOUR_API_KEY"
curl -X GET "https://api.call24x7.ai/outbound_call?call_id=12345" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
boolean
Whether the request was successful
string
Unique identifier for the call
string
Current status of the call. Possible values:
IDLE, RINGING, IN_PROGRESS, COMPLETED, FAILEDstring
Response message
Example Response
{
"success": true,
"call_id": "12345",
"status": "RINGING",
"message": "Call initiated successfully"
}
Error Responses
boolean
Always
false for errorsstring
Human-readable error message
string
Error code. Possible values:
MISSING_PARAMS, AGENT_NOT_FOUND, CALL_NOT_FOUND, INSUFFICIENT_BALANCE, INTERNAL_ERRORAuthorizations
API key authentication. Include your API key in the Authorization header as: Bearer YOUR_API_KEY
Query Parameters
Existing call ID to retrieve status for
Phone number to call (E.164 format, e.g., +1234567890). Required if call_id is not provided.
Pattern:
^\+[1-9]\d{1,14}$ID of the AI agent to use for the call. Required if call_id is not provided.
Optional webhook URL to receive call completion notifications
Optional external call ID for tracking
Response
Call initiated successfully or call status retrieved

