Download call recording
Returns the call recording of a request whose hasAudio is true — the stored file itself, not JSON. Streamed from our private copy, never the carrier’s URL.
Content-Type is the recording’s own format — usually audio/wav or audio/mpeg, since the carrier’s format varies from call to call (application/octet-stream when none was stored) — with its Content-Length. Content-Disposition: attachment; filename="activation-{activationId}.wav" (.mp3 for an MP3; no extension for any other format). Cache-Control: private, no-store: the recording speaks the activation code.
404 ACTIVATION_NOT_FOUND answers, all alike: a request of another workspace or an unknown id; a request without a recording (hasAudio: false — the wait timed out or was cancelled before any call, or the call could not be downloaded or stored); and any request of a line that is RETURNED or CANCELED — a line that leaves your workspace has its recordings deleted.
You rarely need to build this URL: the phone_line.audio_received, phone_line.code_received and phone_line.code_failed webhooks carry it as audioUrl whenever the request has a recording. The URL holds no credential — send your key with it.
Requires a tenant-scoped key — a number-scoped key (or per-number OAuth grant) gets 403 NUMBER_SCOPE_NOT_ALLOWED. Permission phone_lines:read: with an OAuth / MCP token the user must be an Owner or Admin (403 PERMISSION_DENIED otherwise).
curl --request GET \
--url https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio', 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://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body"<string>"Authorizations
Your ps_ API key
Path Parameters
The code request id (activation.id, returned by POST /v1/phone-lines/{id}/activations).
Response
The call recording, as stored (binary). Cache-Control: private, no-store.
The response is of type file.
Was this page helpful?
curl --request GET \
--url https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio', 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://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}/audio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body"<string>"