Call Recordings

Get Call Recordings

The Flyflow API allows you to download the recording of a call by making a GET request to the /call/recording/{id}.mp3 endpoint. This endpoint returns the audio recording of the specified call in MP3 format.

Request

Endpoint

GET /call/recording/{id}.mp3

Headers

Authorization: The API key prefixed with Bearer. Example: Bearer your_api_key.

Content-Type: The content type of the request body. Must be set to application/json.

Path Parameters

id (int, required): The unique identifier of the call call.

cURL Example

curl -X GET \
  -H "Authorization: Bearer your_api_key" \
  "https://api.flyflow.dev/v1/call/recording/[call_id].mp3" \
  -o recording.mp3

Python Client Example

from flyflowclient import Flyflow

client = Flyflow(api_key='your_api_key')

call_id = 10
output_path = 'recording.mp3'

client.get_call_recording(call_id, output_path)

print(f"Recording saved to {output_path}")

Response

Status Codes

200 OK: The recording was successfully retrieved.

400 Bad Request: The request is invalid or missing required parameters.

401 Unauthorized: The API key is missing or invalid.

404 Not Found: The specified recording does not exist.

500 Internal Server Error: An unexpected error occurred on the server side.

Response Body

If the recording is successfully retrieved, the response body will contain the MP3 audio file of the call recording. The file will be downloaded and saved to the specified path.

Error Handling

If an error occurs during the retrieval of the call recording, the API will return an appropriate error response with a corresponding status code and error message in the response body.

For example, if the specified recording does not exist:

{
  "error": "Not Found",
  "message": "Recording not found"
}

Make sure to handle errors appropriately in your application and provide the necessary authentication and valid data in the request.

Conclusion

Downloading a call recording using the Flyflow API is a straightforward process. By making a GET request to the /call/recording/{id}.mp3 endpoint with the recording ID, you can retrieve the audio file associated with the specified call. The API will return the audio file in MP3 format upon success. Remember to handle errors and provide the necessary authentication and valid data to ensure a smooth integration with the Flyflow platform.