Notification Files
When configuring a Tracking Number, you have the option to add Call Features. Most call features require an audio message to be played to the caller or advertiser.
Using our text to speech capabilities, Telmetrics can automatically generate the audio notification for you, however in cases where you want more control over the notification, you may choose to manage them yourself.
Retrieving Notification Files
Notification files are categorized by their type, the following API end-points can be used to retrieve them. Using the 'stype' URL parameter, you can filter the results for your request to only return notification files relevant to their call feature:
- Call Record Notification Files - GET https://api.telmetrics.com/v3/api/datastore?stype= CallRecordNotificationFiles
- Stop Call Notification Files - GET https://api.telmetrics.com/v3/api/datastore?stype=StopCallFiles
- Whisper Notification Files - GET https://api.telmetrics.com/v3/api/datastore?stype=WhisperFiles
- Call Verify Notification Files - GET https://api.telmetrics.com/v3/api/datastore?stype=CallVerifyFiles
- Routing Notification Files - GET https://api.telmetrics.com/v3/api/datastore?stype=RouteMessageFiles
Using the following request will return all notification files that can be used with the Call Record feature:
curl -H "x-organization-token: {authorization_token}" \
-X GET \
"http://api.telmetrics.com/v3/api/datastore?stype=CallRecordNotificationFiles"
If successful, a response similar to the following will be returned
[
{
"data_store_id": "104dad62-b2a0-4a9d-9c8c-056cf236f2b1",
"type": "CallRecordNotificationFiles",
"file_name": "Thankyouforcalling.wav",
"created_datetime": "2011-04-02T08:29:08.463"
},
{
"data_store_id": "4e8a8a1a-b6ee-48dc-85ed-05bbb3fa0dff",
"type": "CallRecordNotificationFiles",
"file_name": "synth-78-636586218103565469.wav",
"created_datetime": "2018-04-06T14:30:10.777"
},
{
"data_store_id": "3d832e61-1856-4576-a487-08d985b0c2a1",
"type": "CallRecordNotificationFiles",
"file_name": "qualityassurance.wav",
"created_datetime": "2018-03-07T15:58:38.883"
}
]
Uploading a Notification File
Notification files can be uploaded by submitting a POST request to:
- Call Record Notification Files - POST https://api.telmetrics.com/v3/api/datastore?stype=CallRecordNotificationFiles
- Stop Call Notification Files - POST https://api.telmetrics.com/v3/api/datastore?stype=StopCallFiles
- Whisper Notification Files - POST https://api.telmetrics.com/v3/api/datastore?stype=WhisperFiles
- Call Verify Notification Files - POST https://api.telmetrics.com/v3/api/datastore?stype=CallVerifyFiles
- Routing Notification Files - POST https://api.telmetrics.com/v3/api/datastore?stype=RouteMessageFiles
When submitting a request, you will need to specify the 'stype' parameter, and the name of the MP3 file containing the audio notification file. Use the following to create a notification file:
POST http://api.telmetrics.com/v3/api/datastore?stype={message_file_type}
Using the following request will create a notification file:
curl -H "x-organization-token: {authentication_token}" \
-F "[email protected];type=audio/mpeg" http://api.telmetrics.com/v3/api/datastore?stype=CallRecordNotificationFiles
If successful, a response similar to the following will be generated:
{
"data_store_id": "784ba69d-86df-44d8-b656-85efefce6511",
"type": "CallRecordNotificationFiles",
"file_name": "callRecordNotification.mp3",
"created_datetime": "2018-04-17T13:39:55.7299023Z"
}
Updated almost 5 years ago