List Voices

This section explains how to use the /voices endpoint to get phone number data using TalkStack's API.

Step1: Prepare Your Request

  • Endpoint: /voices

  • Method: GET

  • URL: https://api.talkstackai.com/voices

  • Headers: Include Content-Type: application/json.

  • Authorization: Bearer token or x-api-key in Headers

Step 2: Send the Request

Use your preferred HTTP client to send the GET request.

Step 3: Handle the request

The response will provide a detailed list of voices.

Success Response:

  • Status Code: 200 OK

  • Body:

{
    "message": "successfully fetched voice list.",
    "status": "success",
    "voices": [
        {
            "name": "Aria",
            "labels": {
                "accent": "American",
                "description": "expressive",
                "age": "middle-aged",
                "gender": "female",
                "use_case": "social media"
            },
            "voice_id": "XXXXXXXXXXXXXXXX",
            "preview_url": "XXXXXXXXXXXXXXXXXXXXX"
        },
        {
            "name": "Roger",
            "labels": {
                "accent": "American",
                "description": "confident",
                "age": "middle-aged",
                "gender": "male",
                "use_case": "social media"
            },
            "voice_id": "XXXXXXXXXXXXXXXXXXX",
            "preview_url": "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
        },
        ...
    ]
}

Troubleshooting

  • 401 Unauthorized: If the user is unauthorized or the token is missing.

  • 500 Internal Server Error: For errors in getting voices list.

Last updated