Retrieve

View as Markdown

Use this endpoint for the Recordings method to retrieve a single recording media or its metadata.

Direct external access to recording files is useful for many external applications, so they are public and do not require Basic Auth to access. This allows external applications to embed recording URLs without exposing their SignalWire API credentials. SignalWire recording URLs are long and random, making them difficult to guess or exploit unless you reveal the URL.

Recording file types

WAV

When a recording URI has no extension or a .wav extension, the request will return a binary WAV version of the recording file.

GET https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}

MP3

Setting an extension of “.mp3” on the URI returns a binary MP3 version of the recording. For example:

GET https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.mp3

Metadata

A recording’s metadata, such as duration, cost, time, can be returned by setting the Recording URI’s extension to .json. For example:

GET https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json


Path parameters

AccountSidstringRequiredformat: "uuid"
The unique identifier for the account that is associated with this recording.
SidstringRequiredformat: "uuid"
The unique identifier for the recording.

Response

sidstringRequiredformat: "uuid"
The unique identifier for the recording.
account_sidstringRequiredformat: "uuid"
The unique identifier for the account that is associated with this recording.
api_versionstringRequired
The version of the SignalWire API.
call_sidstring or nullRequiredformat: "uuid"
The unique identifier for the call that is associated with this recording. Null if this is a conference recording.
conference_sidstring or nullRequiredformat: "uuid"
The unique identifier for the conference that is associated with this recording. Null if this is a call recording.
channelenumRequired
The number of channels in a recording (singular key). Returns '1' for mono or '2' for stereo.
Allowed values:
channelsenumRequired
The number of channels in a recording. Returns '1' for mono or '2' for stereo.
Allowed values:
date_createdstringRequired
The date, in RFC 2822 format, this recording was created.
date_updatedstringRequired
The date, in RFC 2822 format, this recording was updated.
start_timestring or nullRequired
The time, in RFC 2822 format, this recording started.
end_timestring or nullRequired
The time, in RFC 2822 format, this recording ended.
durationintegerRequired>=0
The length, in seconds, of the recording.
pricestring or nullRequired
The cost for the recording.
price_unitstringRequired
The currency of the price of the recording.
sourceenumRequired
How the recording was made.
statusenumRequired
The status of the recording.
error_codestring or nullRequired
Further details about a failed recording.
uristringRequired
The URI of the recording.
subresource_urisobjectRequired
Subresource URIs.
encryption_detailsstring or nullRequired
Encryption details. Always null.
trimstringRequired
Whether leading and trailing silence is trimmed from a recording.
Response
1{
2 "sid": "19e436af-5688-4307-b03b-bdb2b42b8142",
3 "account_sid": "720796a0-8ee9-4350-83bd-2d07a3121f1e",
4 "api_version": "2010-04-01",
5 "call_sid": "43bb71ee-553f-4074-bb20-8e2747647cce",
6 "conference_sid": "string",
7 "channel": "1",
8 "channels": "1",
9 "date_created": "Tue, 25 Sep 2018 23:00:00 +0000",
10 "date_updated": "Wed, 26 Sep 2018 23:00:04 +0000",
11 "start_time": "Tue, 25 Sep 2018 23:00:00 +0000",
12 "end_time": "Wed, 26 Sep 2018 23:00:04 +0000",
13 "duration": 4,
14 "price": "-0.0025",
15 "price_unit": "USD",
16 "source": "DialVerb",
17 "status": "queued",
18 "error_code": "string",
19 "uri": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142.json",
20 "subresource_uris": {
21 "transcriptions": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142/Transcriptions.json"
22 },
23 "encryption_details": "string",
24 "trim": "do-not-trim"
25}

Request examples

1const { RestClient } = require('@signalwire/compatibility-api')
2const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
3
4client.recordings('Sid')
5 .fetch()
6 .then(recording => console.log(recording.callSid))
7 .done();