Rename an Audio File
Rename an already existing audio file
URL
POST https://api.voicepartner.fr/v1/audio-file/rename
Limit: 5 requests per minute
Required Parameters
apiKey
tokenAudio
Identifier of the audio file
emailForNotification
The end-of-campaign notification will be sent to this email address
phoneNumbers
Recipients' mobile phone numbers. To send multiple messages, the numbers must be separated by commas. They can be:
in national format (06xxxxxxxx) or international format (+336xxxxxxxx), for French numbers.
Optional Parameters
sender
Mobile phone number that can be called back. This number must first be validated on the my.voicepartner.fr platform.
scheduledDate
Send date of the message, in YYYY-mm-dd H:m:00 format (e.g. 2021-02-02 14:15:00). Only set this if you want the drops to be sent later.
notifyUrl
Callback URL for the campaign status, sent as GET
Requests
<?php
// The API URL you want to send the request to
$url = 'https://api.voicepartner.fr/v1/audio-file/rename';
// The data you want to send as JSON
$data = array(
'apiKey' => 'YOUR_API_KEY',
'tokenAudio' => 'AUDIO_FILE_TOKEN',
'filename' => 'File name'
);
// Encode the data as JSON
$data_json = json_encode($data);
// Initialize cURL
$curl = curl_init($url);
// Configure cURL options to send JSON
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_json);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_json)
));
// Execute the cURL request and store the response
$response = curl_exec($curl);
// Close the cURL session
curl_close($curl);
// Display the response
echo $response;Response
Last updated