Voice Machine Detection API - Submit New Recording

Endpoint: POST https://flows.s1.e9lab.com/webhook/{{webhook_id}}

Description:

Submit a new call recording (via binary data or file URL) for detecting if it contains an answering machine.

Headers:

Required Parameters:

Optional Parameters (For Filtering and Syncing):

Success Response Example (JSON):

{
  "status": "Processing",
  "unique_id": "f5863a0b36"
}
    

Error Responses:

Example Requests:

With audio_file_url:

cURL:

curl -X POST "https://flows.s1.e9lab.com/webhook/07767be7-a7f8-43f7-a2bd-94bf412c9dd4" \
-H "username: {Your_Username}" \
-H "authkey: {Your_Auth_Key}" \
-F "audio_file_url=https://example.com/call_audio.mp3" \
-F "lang=es" \
-F "phone_number=34123456789"
        

Python:

import requests

url = "https://flows.s1.e9lab.com/webhook/07767be7-a7f8-43f7-a2bd-94bf412c9dd4"
headers = {
    'username': '{Your_Username}',
    'authkey': '{Your_Auth_Key}'
}
files = {
    'audio_file_url': ('', 'https://example.com/call_audio.mp3'),
    'lang': ('', 'es'),
    'phone_number': ('', '34123456789')
}

response = requests.post(url, headers=headers, files=files)
print(response.json())
        

PHP:

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://flows.s1.e9lab.com/webhook/07767be7-a7f8-43f7-a2bd-94bf412c9dd4");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
    "audio_file_url" => "https://example.com/call_audio.mp3",
    "lang" => "es",
    "phone_number" => "34123456789"
));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "username: {Your_Username}",
    "authkey: {Your_Auth_Key}"
));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
        

With Binary Data:

cURL:

curl -X POST "https://flows.s1.e9lab.com/webhook/07767be7-a7f8-43f7-a2bd-94bf412c9dd4" \
-H "username: {Your_Username}" \
-H "authkey: {Your_Auth_Key}" \
-F "data=@/path/to/audio_file.mp3" \
-F "lang=es"
        

Python:

import requests

url = "https://flows.s1.e9lab.com/webhook/07767be7-a7f8-43f7-a2bd-94bf412c9dd4"
headers = {
    'username': '{Your_Username}',
    'authkey': '{Your_Auth_Key}'
}
files = {
    'data': open('/path/to/audio_file.mp3', 'rb'),
    'lang': ('', 'es')
}

response = requests.post(url, headers=headers, files=files)
print(response.json())
        

PHP:

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://flows.s1.e9lab.com/webhook/07767be7-a7f8-43f7-a2bd-94bf412c9dd4");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
    "data" => new CURLFile('/path/to/audio_file.mp3'),
    "lang" => "es"
));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "username: {Your_Username}",
    "authkey: {Your_Auth_Key}"
));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>