Retrieve a call
curl --request POST \
--url https://api.cozmox.cloud/v1/outbound/retrieve-call \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"callId": "1234567890"
}
'import requests
url = "https://api.cozmox.cloud/v1/outbound/retrieve-call"
payload = { "callId": "1234567890" }
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({callId: '1234567890'})
};
fetch('https://api.cozmox.cloud/v1/outbound/retrieve-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.cozmox.cloud/v1/outbound/retrieve-call",
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([
'callId' => '1234567890'
]),
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.cozmox.cloud/v1/outbound/retrieve-call"
payload := strings.NewReader("{\n \"callId\": \"1234567890\"\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.cozmox.cloud/v1/outbound/retrieve-call")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callId\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cozmox.cloud/v1/outbound/retrieve-call")
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 \"callId\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2025-01-01T00:00:00.000Z",
"call_status": "completed",
"initialContext": "Hello, how are you?",
"greeting": "Hello, how are you?",
"fromPhone": "+1234567890",
"disconnect_reason": "<string>",
"extraContext": {
"name": "Liza",
"current_datetime": "2025-01-01 10:10:10"
},
"agent": {
"id": "<string>",
"name": "<string>",
"editedAt": "2023-11-07T05:31:56Z",
"latestPrompt": "<string>",
"primaryKnowledge": "<string>",
"backgroundNoise": "<string>",
"backgroundNoiseVolume": 1.05,
"llmProvider": "<string>",
"llmModel": "<string>",
"greeting": "<string>",
"stt": "<string>",
"tts": "<string>",
"baseLanguage": "<string>",
"voiceId": "<string>",
"voiceName": "<string>",
"backchannelingFrequency": 123,
"backchannelingWords": "<string>",
"tools": [
{
"name": "<string>",
"webhook_url": "<string>",
"description": "<string>",
"api_timeout_ms": 123,
"speak_during_execution": true,
"speak_after_execution": true,
"parameters": {
"type": "<string>",
"properties": {},
"required": [
"<string>"
]
}
}
]
},
"summary": "<string>",
"analysis": {
"needs_callback": "yes"
},
"call_duration": 123,
"recording_url": "<string>",
"is_voicemail": true
}Outbound
Retrieve a call
This operation allows you retrieve a call by id
POST
/
v1
/
outbound
/
retrieve-call
Retrieve a call
curl --request POST \
--url https://api.cozmox.cloud/v1/outbound/retrieve-call \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"callId": "1234567890"
}
'import requests
url = "https://api.cozmox.cloud/v1/outbound/retrieve-call"
payload = { "callId": "1234567890" }
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({callId: '1234567890'})
};
fetch('https://api.cozmox.cloud/v1/outbound/retrieve-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.cozmox.cloud/v1/outbound/retrieve-call",
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([
'callId' => '1234567890'
]),
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.cozmox.cloud/v1/outbound/retrieve-call"
payload := strings.NewReader("{\n \"callId\": \"1234567890\"\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.cozmox.cloud/v1/outbound/retrieve-call")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callId\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cozmox.cloud/v1/outbound/retrieve-call")
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 \"callId\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2025-01-01T00:00:00.000Z",
"call_status": "completed",
"initialContext": "Hello, how are you?",
"greeting": "Hello, how are you?",
"fromPhone": "+1234567890",
"disconnect_reason": "<string>",
"extraContext": {
"name": "Liza",
"current_datetime": "2025-01-01 10:10:10"
},
"agent": {
"id": "<string>",
"name": "<string>",
"editedAt": "2023-11-07T05:31:56Z",
"latestPrompt": "<string>",
"primaryKnowledge": "<string>",
"backgroundNoise": "<string>",
"backgroundNoiseVolume": 1.05,
"llmProvider": "<string>",
"llmModel": "<string>",
"greeting": "<string>",
"stt": "<string>",
"tts": "<string>",
"baseLanguage": "<string>",
"voiceId": "<string>",
"voiceName": "<string>",
"backchannelingFrequency": 123,
"backchannelingWords": "<string>",
"tools": [
{
"name": "<string>",
"webhook_url": "<string>",
"description": "<string>",
"api_timeout_ms": 123,
"speak_during_execution": true,
"speak_after_execution": true,
"parameters": {
"type": "<string>",
"properties": {},
"required": [
"<string>"
]
}
}
]
},
"summary": "<string>",
"analysis": {
"needs_callback": "yes"
},
"call_duration": 123,
"recording_url": "<string>",
"is_voicemail": true
}Authorizations
The API key
Body
application/json
The call id
Example:
"1234567890"
Response
The date and time the call was created
Example:
"2025-01-01T00:00:00.000Z"
The status of the call
Example:
"completed"
The initial context of the call
Example:
"Hello, how are you?"
The greeting of the call
Example:
"Hello, how are you?"
The phone number of the caller
Example:
"+1234567890"
The disconnect reason of the call
The extra variables of the call
Show child attributes
Show child attributes
Example:
{
"name": "Liza",
"current_datetime": "2025-01-01 10:10:10"
}
The agent of the call
Show child attributes
Show child attributes
The summary of the call
The analysis fields of the call
Show child attributes
Show child attributes
Example:
{ "needs_callback": "yes" }
The duration of the call
The recording url of the call
Whether the call is voicemail
⌘I