curl --request POST \
--url https://api.alpharun.com/api/v1/recording-imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form audio='@example-file' \
--form [email protected] \
--form recorded_at=2023-11-07T05:31:56Z \
--form 'contacts={
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"ext_id": "<string>",
"custom_fields": [
{
"key": "<string>",
"value": "<string>"
}
]
}' \
--form playbook_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
--form 'custom_fields={
"key": "<string>",
"value": "<string>"
}' \
--form 'ext_id=<string>'import requests
url = "https://api.alpharun.com/api/v1/recording-imports"
files = { "audio": ("example-file", open("example-file", "rb")) }
payload = {
"teammate_email": "[email protected]",
"recorded_at": "2023-11-07T05:31:56Z",
"contacts": "{
\"email\": \"[email protected]\",
\"first_name\": \"<string>\",
\"last_name\": \"<string>\",
\"phone_number\": \"<string>\",
\"ext_id\": \"<string>\",
\"custom_fields\": [
{
\"key\": \"<string>\",
\"value\": \"<string>\"
}
]
}",
"playbook_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_fields": "{
\"key\": \"<string>\",
\"value\": \"<string>\"
}",
"ext_id": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('audio', '<string>');
form.append('teammate_email', '[email protected]');
form.append('recorded_at', '2023-11-07T05:31:56Z');
form.append('contacts', '{
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"ext_id": "<string>",
"custom_fields": [
{
"key": "<string>",
"value": "<string>"
}
]
}');
form.append('playbook_id', '3c90c3cc-0d44-4b50-8888-8dd25736052a');
form.append('custom_fields', '{
"key": "<string>",
"value": "<string>"
}');
form.append('ext_id', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.alpharun.com/api/v1/recording-imports', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"teammate_email\"\r\n\r\[email protected]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"recorded_at\"\r\n\r\n2023-11-07T05:31:56Z\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contacts\"\r\n\r\n{\r\n \"email\": \"[email protected]\",\r\n \"first_name\": \"<string>\",\r\n \"last_name\": \"<string>\",\r\n \"phone_number\": \"<string>\",\r\n \"ext_id\": \"<string>\",\r\n \"custom_fields\": [\r\n {\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n }\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"playbook_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_fields\"\r\n\r\n{\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ext_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"teammate_email\"\r\n\r\[email protected]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"recorded_at\"\r\n\r\n2023-11-07T05:31:56Z\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contacts\"\r\n\r\n{\r\n \"email\": \"[email protected]\",\r\n \"first_name\": \"<string>\",\r\n \"last_name\": \"<string>\",\r\n \"phone_number\": \"<string>\",\r\n \"ext_id\": \"<string>\",\r\n \"custom_fields\": [\r\n {\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n }\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"playbook_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_fields\"\r\n\r\n{\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ext_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.alpharun.com/api/v1/recording-imports")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"teammate_email\"\r\n\r\[email protected]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"recorded_at\"\r\n\r\n2023-11-07T05:31:56Z\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contacts\"\r\n\r\n{\r\n \"email\": \"[email protected]\",\r\n \"first_name\": \"<string>\",\r\n \"last_name\": \"<string>\",\r\n \"phone_number\": \"<string>\",\r\n \"ext_id\": \"<string>\",\r\n \"custom_fields\": [\r\n {\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n }\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"playbook_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_fields\"\r\n\r\n{\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ext_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/recording-imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"teammate_email\"\r\n\r\[email protected]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"recorded_at\"\r\n\r\n2023-11-07T05:31:56Z\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contacts\"\r\n\r\n{\r\n \"email\": \"[email protected]\",\r\n \"first_name\": \"<string>\",\r\n \"last_name\": \"<string>\",\r\n \"phone_number\": \"<string>\",\r\n \"ext_id\": \"<string>\",\r\n \"custom_fields\": [\r\n {\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n }\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"playbook_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_fields\"\r\n\r\n{\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ext_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"recording_import": {
"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
}
}
}{
"error": 123,
"message": "<string>"
}Upload Recording Asynchronously
Uploads an audio file and creates the recording in the background. Poll GET /recording-imports/{RECORDING_IMPORT_ID} until status is no longer pending.
Takes the same fields as POST /recordings/upload, returns immediately and retries transient failures, so prefer it for new integrations.
curl --request POST \
--url https://api.alpharun.com/api/v1/recording-imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form audio='@example-file' \
--form [email protected] \
--form recorded_at=2023-11-07T05:31:56Z \
--form 'contacts={
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"ext_id": "<string>",
"custom_fields": [
{
"key": "<string>",
"value": "<string>"
}
]
}' \
--form playbook_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
--form 'custom_fields={
"key": "<string>",
"value": "<string>"
}' \
--form 'ext_id=<string>'import requests
url = "https://api.alpharun.com/api/v1/recording-imports"
files = { "audio": ("example-file", open("example-file", "rb")) }
payload = {
"teammate_email": "[email protected]",
"recorded_at": "2023-11-07T05:31:56Z",
"contacts": "{
\"email\": \"[email protected]\",
\"first_name\": \"<string>\",
\"last_name\": \"<string>\",
\"phone_number\": \"<string>\",
\"ext_id\": \"<string>\",
\"custom_fields\": [
{
\"key\": \"<string>\",
\"value\": \"<string>\"
}
]
}",
"playbook_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_fields": "{
\"key\": \"<string>\",
\"value\": \"<string>\"
}",
"ext_id": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('audio', '<string>');
form.append('teammate_email', '[email protected]');
form.append('recorded_at', '2023-11-07T05:31:56Z');
form.append('contacts', '{
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"ext_id": "<string>",
"custom_fields": [
{
"key": "<string>",
"value": "<string>"
}
]
}');
form.append('playbook_id', '3c90c3cc-0d44-4b50-8888-8dd25736052a');
form.append('custom_fields', '{
"key": "<string>",
"value": "<string>"
}');
form.append('ext_id', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.alpharun.com/api/v1/recording-imports', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"teammate_email\"\r\n\r\[email protected]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"recorded_at\"\r\n\r\n2023-11-07T05:31:56Z\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contacts\"\r\n\r\n{\r\n \"email\": \"[email protected]\",\r\n \"first_name\": \"<string>\",\r\n \"last_name\": \"<string>\",\r\n \"phone_number\": \"<string>\",\r\n \"ext_id\": \"<string>\",\r\n \"custom_fields\": [\r\n {\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n }\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"playbook_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_fields\"\r\n\r\n{\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ext_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"teammate_email\"\r\n\r\[email protected]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"recorded_at\"\r\n\r\n2023-11-07T05:31:56Z\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contacts\"\r\n\r\n{\r\n \"email\": \"[email protected]\",\r\n \"first_name\": \"<string>\",\r\n \"last_name\": \"<string>\",\r\n \"phone_number\": \"<string>\",\r\n \"ext_id\": \"<string>\",\r\n \"custom_fields\": [\r\n {\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n }\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"playbook_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_fields\"\r\n\r\n{\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ext_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.alpharun.com/api/v1/recording-imports")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"teammate_email\"\r\n\r\[email protected]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"recorded_at\"\r\n\r\n2023-11-07T05:31:56Z\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contacts\"\r\n\r\n{\r\n \"email\": \"[email protected]\",\r\n \"first_name\": \"<string>\",\r\n \"last_name\": \"<string>\",\r\n \"phone_number\": \"<string>\",\r\n \"ext_id\": \"<string>\",\r\n \"custom_fields\": [\r\n {\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n }\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"playbook_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_fields\"\r\n\r\n{\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ext_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpharun.com/api/v1/recording-imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"teammate_email\"\r\n\r\[email protected]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"recorded_at\"\r\n\r\n2023-11-07T05:31:56Z\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"contacts\"\r\n\r\n{\r\n \"email\": \"[email protected]\",\r\n \"first_name\": \"<string>\",\r\n \"last_name\": \"<string>\",\r\n \"phone_number\": \"<string>\",\r\n \"ext_id\": \"<string>\",\r\n \"custom_fields\": [\r\n {\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n }\r\n ]\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"playbook_id\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"custom_fields\"\r\n\r\n{\r\n \"key\": \"<string>\",\r\n \"value\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ext_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"recording_import": {
"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
}
}
}{
"error": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The date and time when the recording was made. Accepts ISO 8601 format with optional timezone specification (e.g., '2024-01-15T14:30:00Z' or '2024-01-15T14:30:00-05:00'). We encourage you to specify the TZ if available.
At least one of email, phone number and ext id must be not null on the contact. Contacts are unique per email, phone number, or ext_id. No two contacts can have the same email, phone number, or ext_id.
1- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
The ID of the playbook to use for the assessment. If omitted, the playbook will be determined by the routing rules defined in https://app.alpharun.com/settings/playbooks (based on the teammate group the teammate belongs to). If no matching routing rules is found, the request will be rejected.
Custom fields to set on the customer interaction created for this recording. Each key must match the field_name of a Customer interaction custom field defined in your Alpharun dashboard; entries whose keys don't match a definition are ignored. Like contacts, this must be sent as a JSON-encoded string in the multipart form.
Show child attributes
Show child attributes
Your own reference for this upload, echoed back as ext_id on the recording import so you can match results to your records. Not used for deduplication.
255Response
Recording import created
Show child attributes
Show child attributes