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)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/surge-go"
"github.com/stainless-sdks/surge-go/option"
)
func main() {
client := surge.NewClient(
option.WithAPIKey("My API Key"),
)
recording, err := client.Recordings.Get(context.TODO(), "rec_01kfyc9dgdec1avkgs7tng8htg")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", recording.ID)
}
require "surge_api"
surge = SurgeAPI::Client.new(api_key: "My API Key")
recording = surge.recordings.retrieve("rec_01kfyc9dgdec1avkgs7tng8htg")
puts(recording)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Surge\Client;
use Surge\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('SURGE_API_KEY') ?: 'My API Key');
try {
$recording = $client->recordings->retrieve('rec_01kfyc9dgdec1avkgs7tng8htg');
var_dump($recording);
} catch (APIException $e) {
echo $e->getMessage();
}curl --request GET \
--url https://api.surge.app/recordings/{id} \
--header 'Authorization: Bearer <token>'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)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/surge-go"
"github.com/stainless-sdks/surge-go/option"
)
func main() {
client := surge.NewClient(
option.WithAPIKey("My API Key"),
)
recording, err := client.Recordings.Get(context.TODO(), "rec_01kfyc9dgdec1avkgs7tng8htg")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", recording.ID)
}
require "surge_api"
surge = SurgeAPI::Client.new(api_key: "My API Key")
recording = surge.recordings.retrieve("rec_01kfyc9dgdec1avkgs7tng8htg")
puts(recording)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Surge\Client;
use Surge\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('SURGE_API_KEY') ?: 'My API Key');
try {
$recording = $client->recordings->retrieve('rec_01kfyc9dgdec1avkgs7tng8htg');
var_dump($recording);
} catch (APIException $e) {
echo $e->getMessage();
}curl --request GET \
--url https://api.surge.app/recordings/{id} \
--header 'Authorization: Bearer <token>'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"
⌘I