List TTS histories
curl --request GET \
--url https://api.tryhamsa.com/v2/tts/histories \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v2/tts/histories"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v2/tts/histories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryhamsa.com/v2/tts/histories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tryhamsa.com/v2/tts/histories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryhamsa.com/v2/tts/histories")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/tts/histories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Operation completed successfully",
"messageKey": "OPERATION_SUCCESSFUL",
"data": {
"ttsHistories": [
{
"id": "c4f66d94-a1f5-4000-b9a3-dad55b206968",
"audio": "https://cdn.tryhamsa.com/tts-histories/audio.wav",
"downloadUrl": "https://cdn.tryhamsa.com/tts-histories/audio.wav?response-content-disposition=attachment",
"script": "hello hello",
"createdAt": "2025-12-31T08:19:52.129Z",
"ttsVoice": {
"name": "Huda",
"dialect": {
"languageCode": "oma",
"language": "ar"
}
}
}
],
"totalPages": 5,
"page": 1,
"totalCount": 50
}
}{
"code": 9400,
"message": "Field must be a string!",
"messageKey": "FieldMustBeString"
}{
"success": false,
"code": 500,
"message": "Internal server error"
}Text to Speech Routes
List TTS histories
List TTS history entries with pagination.
GET
/
v2
/
tts
/
histories
List TTS histories
curl --request GET \
--url https://api.tryhamsa.com/v2/tts/histories \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v2/tts/histories"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v2/tts/histories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryhamsa.com/v2/tts/histories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tryhamsa.com/v2/tts/histories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryhamsa.com/v2/tts/histories")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/tts/histories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Operation completed successfully",
"messageKey": "OPERATION_SUCCESSFUL",
"data": {
"ttsHistories": [
{
"id": "c4f66d94-a1f5-4000-b9a3-dad55b206968",
"audio": "https://cdn.tryhamsa.com/tts-histories/audio.wav",
"downloadUrl": "https://cdn.tryhamsa.com/tts-histories/audio.wav?response-content-disposition=attachment",
"script": "hello hello",
"createdAt": "2025-12-31T08:19:52.129Z",
"ttsVoice": {
"name": "Huda",
"dialect": {
"languageCode": "oma",
"language": "ar"
}
}
}
],
"totalPages": 5,
"page": 1,
"totalCount": 50
}
}{
"code": 9400,
"message": "Field must be a string!",
"messageKey": "FieldMustBeString"
}{
"success": false,
"code": 500,
"message": "Internal server error"
}Authorizations
Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '
Query Parameters
Current page number.
Example:
1
Number of items per page.
Example:
10
Project identifier.
Example:
"ae6d58c6-c6bd-4ae0-ad74-b8b39c29928b"
Was this page helpful?
⌘I