Batch import recordings
curl --request POST \
--url https://api.alpharun.com/api/v1/recording-imports/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recording_imports": [
{
"ext_id": "call-12345",
"audio_url": "https://files.example.com/calls/12345.mp3",
"teammate_email": "[email protected]",
"recorded_at": "2026-10-02T19:30:00Z",
"contacts": [
{
"phone_number": "+14155550123"
}
]
},
{
"ext_id": "call-12346",
"video_url": "https://files.example.com/calls/12346.mp4",
"teammate_email": "[email protected]",
"recorded_at": "2026-10-02T19:45:00Z",
"contacts": [
{
"email": "[email protected]"
}
]
}
]
}
'import requests
url = "https://api.alpharun.com/api/v1/recording-imports/batch"
payload = { "recording_imports": [
{
"ext_id": "call-12345",
"audio_url": "https://files.example.com/calls/12345.mp3",
"teammate_email": "[email protected]",
"recorded_at": "2026-10-02T19:30:00Z",
"contacts": [{ "phone_number": "+14155550123" }]
},
{
"ext_id": "call-12346",
"video_url": "https://files.example.com/calls/12346.mp4",
"teammate_email": "[email protected]",
"recorded_at": "2026-10-02T19:45:00Z",
"contacts": [{ "email": "[email protected]" }]
}
] }
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({
recording_imports: [
{
ext_id: 'call-12345',
audio_url: 'https://files.example.com/calls/12345.mp3',
teammate_email: '[email protected]',
recorded_at: '2026-10-02T19:30:00Z',
contacts: [{phone_number: '+14155550123'}]
},
{
ext_id: 'call-12346',
video_url: 'https://files.example.com/calls/12346.mp4',
teammate_email: '[email protected]',
recorded_at: '2026-10-02T19:45:00Z',
contacts: [{email: '[email protected]'}]
}
]
})
};
fetch('https://api.alpharun.com/api/v1/recording-imports/batch', 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.alpharun.com/api/v1/recording-imports/batch",
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([
'recording_imports' => [
[
'ext_id' => 'call-12345',
'audio_url' => 'https://files.example.com/calls/12345.mp3',
'teammate_email' => '[email protected]',
'recorded_at' => '2026-10-02T19:30:00Z',
'contacts' => [
[
'phone_number' => '+14155550123'
]
]
],
[
'ext_id' => 'call-12346',
'video_url' => 'https://files.example.com/calls/12346.mp4',
'teammate_email' => '[email protected]',
'recorded_at' => '2026-10-02T19:45:00Z',
'contacts' => [
[
'email' => '[email protected]'
]
]
]
]
]),
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.alpharun.com/api/v1/recording-imports/batch"
payload := strings.NewReader("{\n \"recording_imports\": [\n {\n \"ext_id\": \"call-12345\",\n \"audio_url\": \"https://files.example.com/calls/12345.mp3\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:30:00Z\",\n \"contacts\": [\n {\n \"phone_number\": \"+14155550123\"\n }\n ]\n },\n {\n \"ext_id\": \"call-12346\",\n \"video_url\": \"https://files.example.com/calls/12346.mp4\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:45:00Z\",\n \"contacts\": [\n {\n \"email\": \"[email protected]\"\n }\n ]\n }\n ]\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.alpharun.com/api/v1/recording-imports/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recording_imports\": [\n {\n \"ext_id\": \"call-12345\",\n \"audio_url\": \"https://files.example.com/calls/12345.mp3\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:30:00Z\",\n \"contacts\": [\n {\n \"phone_number\": \"+14155550123\"\n }\n ]\n },\n {\n \"ext_id\": \"call-12346\",\n \"video_url\": \"https://files.example.com/calls/12346.mp4\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:45:00Z\",\n \"contacts\": [\n {\n \"email\": \"[email protected]\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/recording-imports/batch")
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 \"recording_imports\": [\n {\n \"ext_id\": \"call-12345\",\n \"audio_url\": \"https://files.example.com/calls/12345.mp3\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:30:00Z\",\n \"contacts\": [\n {\n \"phone_number\": \"+14155550123\"\n }\n ]\n },\n {\n \"ext_id\": \"call-12346\",\n \"video_url\": \"https://files.example.com/calls/12346.mp4\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:45:00Z\",\n \"contacts\": [\n {\n \"email\": \"[email protected]\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"recording_imports": [
{
"id": "9b2f6c1e-3d4a-4f7b-8c2e-1a5d7e9f0b3c",
"ext_id": "call-12345",
"status": "pending",
"recording_id": null,
"error": null,
"created_at": "2026-10-02T20:00:00.000Z",
"imported_at": null
},
{
"id": "0c7d2e4f-6a8b-4c1d-9e3f-2b5a7c9d1e4f",
"ext_id": "call-12346",
"status": "pending",
"recording_id": null,
"error": null,
"created_at": "2026-10-02T20:00:00.000Z",
"imported_at": null
}
]
}
}{
"error": 123,
"message": "<string>"
}Call monitoring
Batch Import Recordings
Creates up to 50 recording imports from audio or video URLs you host, downloaded in the background. Each item takes the same fields as POST /recording-imports plus exactly one of audio_url or video_url. Poll GET /recording-imports?ids=... until every status is no longer pending.
The batch is all or nothing: if any item fails validation, nothing is created.
POST
/
recording-imports
/
batch
Batch import recordings
curl --request POST \
--url https://api.alpharun.com/api/v1/recording-imports/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recording_imports": [
{
"ext_id": "call-12345",
"audio_url": "https://files.example.com/calls/12345.mp3",
"teammate_email": "[email protected]",
"recorded_at": "2026-10-02T19:30:00Z",
"contacts": [
{
"phone_number": "+14155550123"
}
]
},
{
"ext_id": "call-12346",
"video_url": "https://files.example.com/calls/12346.mp4",
"teammate_email": "[email protected]",
"recorded_at": "2026-10-02T19:45:00Z",
"contacts": [
{
"email": "[email protected]"
}
]
}
]
}
'import requests
url = "https://api.alpharun.com/api/v1/recording-imports/batch"
payload = { "recording_imports": [
{
"ext_id": "call-12345",
"audio_url": "https://files.example.com/calls/12345.mp3",
"teammate_email": "[email protected]",
"recorded_at": "2026-10-02T19:30:00Z",
"contacts": [{ "phone_number": "+14155550123" }]
},
{
"ext_id": "call-12346",
"video_url": "https://files.example.com/calls/12346.mp4",
"teammate_email": "[email protected]",
"recorded_at": "2026-10-02T19:45:00Z",
"contacts": [{ "email": "[email protected]" }]
}
] }
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({
recording_imports: [
{
ext_id: 'call-12345',
audio_url: 'https://files.example.com/calls/12345.mp3',
teammate_email: '[email protected]',
recorded_at: '2026-10-02T19:30:00Z',
contacts: [{phone_number: '+14155550123'}]
},
{
ext_id: 'call-12346',
video_url: 'https://files.example.com/calls/12346.mp4',
teammate_email: '[email protected]',
recorded_at: '2026-10-02T19:45:00Z',
contacts: [{email: '[email protected]'}]
}
]
})
};
fetch('https://api.alpharun.com/api/v1/recording-imports/batch', 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.alpharun.com/api/v1/recording-imports/batch",
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([
'recording_imports' => [
[
'ext_id' => 'call-12345',
'audio_url' => 'https://files.example.com/calls/12345.mp3',
'teammate_email' => '[email protected]',
'recorded_at' => '2026-10-02T19:30:00Z',
'contacts' => [
[
'phone_number' => '+14155550123'
]
]
],
[
'ext_id' => 'call-12346',
'video_url' => 'https://files.example.com/calls/12346.mp4',
'teammate_email' => '[email protected]',
'recorded_at' => '2026-10-02T19:45:00Z',
'contacts' => [
[
'email' => '[email protected]'
]
]
]
]
]),
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.alpharun.com/api/v1/recording-imports/batch"
payload := strings.NewReader("{\n \"recording_imports\": [\n {\n \"ext_id\": \"call-12345\",\n \"audio_url\": \"https://files.example.com/calls/12345.mp3\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:30:00Z\",\n \"contacts\": [\n {\n \"phone_number\": \"+14155550123\"\n }\n ]\n },\n {\n \"ext_id\": \"call-12346\",\n \"video_url\": \"https://files.example.com/calls/12346.mp4\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:45:00Z\",\n \"contacts\": [\n {\n \"email\": \"[email protected]\"\n }\n ]\n }\n ]\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.alpharun.com/api/v1/recording-imports/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recording_imports\": [\n {\n \"ext_id\": \"call-12345\",\n \"audio_url\": \"https://files.example.com/calls/12345.mp3\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:30:00Z\",\n \"contacts\": [\n {\n \"phone_number\": \"+14155550123\"\n }\n ]\n },\n {\n \"ext_id\": \"call-12346\",\n \"video_url\": \"https://files.example.com/calls/12346.mp4\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:45:00Z\",\n \"contacts\": [\n {\n \"email\": \"[email protected]\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/recording-imports/batch")
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 \"recording_imports\": [\n {\n \"ext_id\": \"call-12345\",\n \"audio_url\": \"https://files.example.com/calls/12345.mp3\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:30:00Z\",\n \"contacts\": [\n {\n \"phone_number\": \"+14155550123\"\n }\n ]\n },\n {\n \"ext_id\": \"call-12346\",\n \"video_url\": \"https://files.example.com/calls/12346.mp4\",\n \"teammate_email\": \"[email protected]\",\n \"recorded_at\": \"2026-10-02T19:45:00Z\",\n \"contacts\": [\n {\n \"email\": \"[email protected]\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"recording_imports": [
{
"id": "9b2f6c1e-3d4a-4f7b-8c2e-1a5d7e9f0b3c",
"ext_id": "call-12345",
"status": "pending",
"recording_id": null,
"error": null,
"created_at": "2026-10-02T20:00:00.000Z",
"imported_at": null
},
{
"id": "0c7d2e4f-6a8b-4c1d-9e3f-2b5a7c9d1e4f",
"ext_id": "call-12346",
"status": "pending",
"recording_id": null,
"error": null,
"created_at": "2026-10-02T20:00:00.000Z",
"imported_at": null
}
]
}
}{
"error": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Response
Recording imports created, in request order
Show child attributes
Show child attributes