import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.texml.accounts.calls.recordingsJson.recordingsJson('call_sid', {
account_sid: 'account_sid',
});
console.log(response.account_sid);{
"account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b",
"call_sid": "v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA",
"conference_sid": "cd5a70f4-759b-4d5e-9c06-88c00f16f3c1",
"channels": 1,
"date_created": "Fri, 11 Aug 2023 19:12:11 +0000",
"date_updated": "Fri, 11 Aug 2023 19:12:11 +0000",
"start_time": "Fri, 11 Aug 2023 19:12:11 +0000",
"price": "0.10",
"price_unit": "USD",
"duration": "12",
"sid": "e9cea0be-7dbd-4b98-98b1-c0089d9d43b0",
"source": "StartCallRecordingAPI",
"error_code": null,
"track": "inbound",
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Recordings/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
}Starts recording with specified parameters for call idientified by call_sid.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.texml.accounts.calls.recordingsJson.recordingsJson('call_sid', {
account_sid: 'account_sid',
});
console.log(response.account_sid);{
"account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b",
"call_sid": "v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA",
"conference_sid": "cd5a70f4-759b-4d5e-9c06-88c00f16f3c1",
"channels": 1,
"date_created": "Fri, 11 Aug 2023 19:12:11 +0000",
"date_updated": "Fri, 11 Aug 2023 19:12:11 +0000",
"start_time": "Fri, 11 Aug 2023 19:12:11 +0000",
"price": "0.10",
"price_unit": "USD",
"duration": "12",
"sid": "e9cea0be-7dbd-4b98-98b1-c0089d9d43b0",
"source": "StartCallRecordingAPI",
"error_code": null,
"track": "inbound",
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Recordings/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The id of the account the resource belongs to.
The CallSid that identifies the call to update.
Starts call recording on a call.
Whether to play a beep when recording is started.
false
The changes to the recording's state that should generate a call to RecoridngStatusCallback. Can be: in-progress, completed and absent. Separate multiple values with a space. Defaults to completed.
"in-progress completed absent"
Url where status callbacks will be sent.
"http://webhook.com/callback"
HTTP method used to send status callbacks.
GET, POST "GET"
When dual, final audio file has the first leg on channel A, and the rest on channel B. single mixes both tracks into a single channel.
single, dual "single"
The audio track to record for the call. The default is both.
inbound, outbound, both "inbound"
Whether to send RecordingUrl in webhooks.
false
Successful call recording create response
"61bf923e-5e4d-4595-a110-56190ea18a1b"
"v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA"
"cd5a70f4-759b-4d5e-9c06-88c00f16f3c1"
1, 2 1
"Fri, 11 Aug 2023 19:12:11 +0000"
"Fri, 11 Aug 2023 19:12:11 +0000"
"Fri, 11 Aug 2023 19:12:11 +0000"
The price of this recording, the currency is specified in the price_unit field.
"0.10"
The unit in which the price is given.
"USD"
The duration of this recording, given in seconds.
"12"
Identifier of a resource.
"e9cea0be-7dbd-4b98-98b1-c0089d9d43b0"
Defines how the recording was created.
StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking null
The audio track to record for the call. The default is both.
inbound, outbound, both "inbound"
The relative URI for this recording resource.
"/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Recordings/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
Was this page helpful?