Recordings

Retrieve a Recording

Changed on

Retrieves one voice recording's metadata, such as duration, cost, and status. Use this account-level route for saved call or conference media; Video Room recordings are separate resources.

Request the recording URI with a .json extension to get the metadata.

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

Access

Access to the recording URI, for metadata and audio alike, follows the project's Protect Recording Media URLs setting. New projects have it turned on. See Media URL protection.

  • On: authenticate with your Project ID and an API token that has the Management scope. A request without valid credentials, or with a token that lacks the scope, gets a 401.
  • Off: anyone with the URI can retrieve the recording without authenticating, which lets external applications embed recording URLs without exposing your API credentials. Recording URIs contain long random IDs, which makes them difficult to guess unless you reveal them.

Learn more about API scopes.

Recording audio

The same recording URI also returns the recording audio, depending on the extension. Without an extension, the response follows the request's Accept header: application/json returns the metadata, and a generic value such as */* returns the audio.

The audio URLs respond with a 302 redirect to the audio file, so your client must follow redirects. When the recording has no audio to return, for example because its status isn't completed, they respond with 404 and an empty body.

Retrieve WAV file

When a recording URI has a .wav extension, or no extension and a generic Accept header, the request redirects to a WAV version of the recording file.

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

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

Retrieve MP3 file

Setting an extension of ".mp3" on the URI redirects to an MP3 version of the recording. For example:

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

get/Accounts/{AccountSid}/Recordings/{Sid}.json

Request

  • Base URL
    https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
  • URL
    https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json
  • Auth
    HTTP basic

Path parameters

AccountSidstring uuid required

Universal Unique Identifier.

The unique identifier for the account that is associated with this recording.

Sidstring uuid required

Universal Unique Identifier.

The unique identifier for the recording.

Response

The request has succeeded.

sidstring uuid required

Universal Unique Identifier.

account_sidstring uuid required

Universal Unique Identifier.

api_versionstring required

The version of the SignalWire API.

call_sidstring uuid required

Universal Unique Identifier.

conference_sidstring uuid required

Universal Unique Identifier.

channel'1' | '2' required

The number of channels in a recording (singular key). Returns '1' for mono or '2' for stereo.

channels'1' | '2' required

The number of channels in a recording. Returns '1' for mono or '2' for stereo.

date_createdstring required

The date, in RFC 2822 format, this recording was created.

date_updatedstring required

The date, in RFC 2822 format, this recording was updated.

start_timestring nullable required

The time, in RFC 2822 format, this recording started.

end_timestring nullable required

The time, in RFC 2822 format, this recording ended.

durationinteger required

The length, in seconds, of the recording.

pricenumber double required

The cost of the recording.

price_unitstring required

The currency of the price of the recording.

source'DialVerb' | 'Queue' | 'RecordVerb' | 'StartCallRecordingAPI' | 'Conference' required

How the recording was started.

  • DialVerb: the recording settings on <Dial>, including a <Dial> that connects to a <Conference>.
  • Queue: the recording settings on a <Dial> that connects to a <Queue>.
  • RecordVerb: the <Record> verb.
  • StartCallRecordingAPI: a request to create a recording on an active call.
  • Conference: a recording of a conference.
status'queued' | 'in-progress' | 'paused' | 'resumed' | 'completed' | 'absent' | 'stopped' required

Recording status.

error_codestring nullable required

Further details about a failed recording.

uristring required

The URI of the recording.

encryption_detailsstring nullable required

Encryption details. Always null.

trimstring nullable required

Whether leading and trailing silence is trimmed from a recording: trim-silence or do-not-trim. Can be null, for example on conference recordings.

Example response

{
  "api_version": "2010-04-01",
  "channel": "1",
  "channels": "1",
  "date_created": "Tue, 25 Sep 2018 23:00:00 +0000",
  "date_updated": "Wed, 26 Sep 2018 23:00:04 +0000",
  "start_time": "Tue, 25 Sep 2018 23:00:00 +0000",
  "end_time": "Wed, 26 Sep 2018 23:00:04 +0000",
  "duration": 4,
  "price": 0.0025,
  "price_unit": "USD",
  "uri": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142.json",
  "subresource_uris": {
    "transcriptions": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142/Transcriptions.json"
  },
  "trim": "do-not-trim"
}

Changes

    • breaking

      removed the media type application/json for the response with the status

    • info

      added the media type text/plain for the response with the status

    • info

      removed from the response property allOf list for the response status

    • info

      added subschema #2 to the response property anyOf list for the response status