Difference between revisions of "Get the Recorded Voicemail Details"

From docs
Jump to: navigation, search
(Store Recorded Voicemail File)
(Successful Response (200))
 
Line 41: Line 41:
 
| audio_file || file || Yes || Voicemail audio file (<code>mp3</code> or <code>wav</code>; maximum size rule <code>max:5000</code>)
 
| audio_file || file || Yes || Voicemail audio file (<code>mp3</code> or <code>wav</code>; maximum size rule <code>max:5000</code>)
 
|}
 
|}
 +
 +
=== cURL Example for Android ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/voicemail/recorded/file' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'phone_number="YOUR_TWILIO_PHONE_NUMBER"' \ --form 'audio_file=@"/path/to/your/voicemail.mp3"' </pre>
 +
 +
=== cURL Example for iOS ===
 +
 +
<pre> curl --location 'https://apimobile.callproof.com/api/voicemail/recorded/file' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'phone_number="YOUR_TWILIO_PHONE_NUMBER"' \ --form 'audio_file=@"/path/to/your/voicemail.mp3"' </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 06:15, 21 July 2026

Mobile_API »Store Recorded Voicemail File

Base URL

https://apimobile.callproof.com

Endpoint

/api/voicemail/recorded/file

Purpose

Uploads a recorded voicemail audio file for a company Twilio phone number, replaces any existing voicemail file for that number, and enables voicemail (while disabling call forwarding) on that number.

HTTP Method

POST

Headers

Header Required Description
Authorization Yes Bearer access token
Content-Type Yes multipart/form-data (file upload)

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

Parameter Type Required Description
phone_number string Yes Twilio phone number that will receive the recorded voicemail
audio_file file Yes Voicemail audio file (mp3 or wav; maximum size rule max:5000)

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/voicemail/recorded/file' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'phone_number="YOUR_TWILIO_PHONE_NUMBER"' \ --form 'audio_file=@"/path/to/your/voicemail.mp3"' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/voicemail/recorded/file' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'phone_number="YOUR_TWILIO_PHONE_NUMBER"' \ --form 'audio_file=@"/path/to/your/voicemail.mp3"' 

Successful Response (200)

Indicates that the voicemail file was uploaded successfully.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
message string Confirmation message (for example, "The voicemail file uploaded successfully.")
uri string Requested resource URI

Error Responses

Status Code Meaning
200 Validation failed – response body uses clientStatusCode 401 with the first validation error message
400 Bad Request – the voicemail file could not be stored
401 Unauthorized – missing, invalid, or expired Bearer token
  • Validation (HTTP 200, clientStatusCode 401) – Missing phone_number / audio_file, invalid file type, or file too large.
  • 400 – Phone number not found for the company ("Phone number not found"), file not uploaded ("Voicemail not uploaded"), or another upload error (for example, "Error while uploading the voicemail file details").
  • 401 – Authentication failed or the access token is missing/expired.