JavaScript
import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
});
const recording = await client.recordings.retrieve('rec_01kfyc9dgdec1avkgs7tng8htg');
console.log(recording.id);import os
from surge import Surge
client = Surge(
api_key=os.environ.get("SURGE_API_KEY"), # This is the default and can be omitted
)
recording = client.recordings.retrieve(
"rec_01kfyc9dgdec1avkgs7tng8htg",
)
print(recording.id)require "surge_api"
surge = SurgeAPI::Client.new(api_key: "My API Key")
recording = surge.recordings.retrieve("rec_01kfyc9dgdec1avkgs7tng8htg")
puts(recording)curl --request GET \
--url https://api.surge.app/recordings/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surge.app/recordings/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.surge.app/recordings/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.surge.app/recordings/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"call": {
"contact": {
"email": "dom@toretto.family",
"first_name": "Dominic",
"id": "ctc_01ja88cboqffhswjx8zbak3ykk",
"last_name": "Toretto",
"metadata": {
"car": "1970 Dodge Charger R/T"
},
"phone_number": "+18015551234"
},
"duration": 184,
"id": "call_01jjnn7s0zfx5tdcsxjfy93et2",
"initiated_at": "2025-03-31T21:01:37Z",
"status": "completed"
},
"duration": 124,
"id": "rec_01kfyc9dgdec1avkgs7tng8htg"
}{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}Recordings
Retrieve recording
Retrieve a single call recording by ID, including its processing status.
GET
/
recordings
/
{id}
JavaScript
import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
});
const recording = await client.recordings.retrieve('rec_01kfyc9dgdec1avkgs7tng8htg');
console.log(recording.id);import os
from surge import Surge
client = Surge(
api_key=os.environ.get("SURGE_API_KEY"), # This is the default and can be omitted
)
recording = client.recordings.retrieve(
"rec_01kfyc9dgdec1avkgs7tng8htg",
)
print(recording.id)require "surge_api"
surge = SurgeAPI::Client.new(api_key: "My API Key")
recording = surge.recordings.retrieve("rec_01kfyc9dgdec1avkgs7tng8htg")
puts(recording)curl --request GET \
--url https://api.surge.app/recordings/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surge.app/recordings/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.surge.app/recordings/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.surge.app/recordings/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"call": {
"contact": {
"email": "dom@toretto.family",
"first_name": "Dominic",
"id": "ctc_01ja88cboqffhswjx8zbak3ykk",
"last_name": "Toretto",
"metadata": {
"car": "1970 Dodge Charger R/T"
},
"phone_number": "+18015551234"
},
"duration": 184,
"id": "call_01jjnn7s0zfx5tdcsxjfy93et2",
"initiated_at": "2025-03-31T21:01:37Z",
"status": "completed"
},
"duration": 124,
"id": "rec_01kfyc9dgdec1avkgs7tng8htg"
}{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the recording to retrieve.
Example:
"rec_01kfyc9dgdec1avkgs7tng8htg"