> For the complete documentation index, see [llms.txt](https://www.docpartner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.docpartner.dev/en/api/voice-partner/voice-message/audio-file-list.md).

# Audio File List

Retrieve the list of audio files added and validated

## URL

<mark style="color:red;">`GET`</mark> `https://api.voicepartner.fr/v1/audios`

{% hint style="warning" %}
Limit of 360 requests per minute. If you exceed these limits you will receive an HTTP 429 response.
{% endhint %}

#### **Required Parameters**

<table data-full-width="false"><thead><tr><th width="180">Name</th><th>Value</th></tr></thead><tbody><tr><td><code>apiKey</code></td><td><a href="https://my.voicepartner.fr/app/api">Your API key</a></td></tr></tbody></table>

#### Requests

{% tabs %}
{% tab title="PHP" %}

```php
<?php

// The API URL you want to send the request to
$url = 'http://api.voicepartner.fr/v1/audios/YOUR_API_KEY';

// Initialize cURL
$curl = curl_init($url);

// Configure cURL options
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Cache-Control: no-cache'
]);

// Execute the cURL request and store the response
$response = curl_exec($curl);

// Check whether an error occurred during the request
if ($response === false) {
    // Handle the error here
    $error = curl_error($curl);
    curl_close($curl);
    die("cURL Error: $error");
}

// Close the cURL session
curl_close($curl);

// Display the response
echo $response;
```

{% endtab %}

{% tab title="VB.net" %}

```vbnet
﻿Imports System.Net.Http

Public Class AudioFileList
    Public Async Function GetAudios(client As HttpClient, apiKey As String) As Task
        Dim url As String = $"audios/{apiKey}"

        Try
            Dim response As HttpResponseMessage = Await client.GetAsync(url)
            If response.IsSuccessStatusCode Then
                Dim responseString As String = Await response.Content.ReadAsStringAsync()
                Console.WriteLine("Audios: " & responseString)
            Else
                Console.WriteLine("Error: " & response.ReasonPhrase)
            End If
        Catch ex As Exception
            Console.WriteLine("Exception: " & ex.Message)
        End Try
    End Function
End Class
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# The API URL you want to send the request to
url = 'http://api.voicepartner.fr/v1/audios/YOUR_API_KEY'

# Configure HTTP headers
headers = {
    'Cache-Control': 'no-cache'
}

# Execute the GET request and store the response
response = requests.get(url, headers=headers)

# Check the response status
if response.status_code == 200:
    # Display the response
    print(response.text)
else:
    # Handle the error here
    print(f"Request error: {response.status_code}")
```

{% endtab %}

{% tab title="cURL" %}

```
curl http://api.voicepartner.fr/v1/audios/YOUR_API_KEY
```

{% endtab %}

{% tab title="Nodejs" %}

```javascript
const axios = require('axios');

// The API URL you want to send the request to
const url = 'http://api.voicepartner.fr/v1/audios/YOUR_API_KEY';

axios.get(url)
    .then(response => {
        console.log(response.data);
    })
    .catch(error => {
        console.error('Request error:', error);
    });
```

{% endtab %}

{% tab title="JAVA" %}

```java
package com.example.API;

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;

public class AudioFileList {
    public static void main(String[] args) {
        // Replace 'YOUR_API_KEY' with your actual API key
        String url = "http://api.voicepartner.fr/v1/audios/YOUR_API_KEY";

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(url))
                .build();

        client.sendAsync(request, BodyHandlers.ofString())
                .thenApply(HttpResponse::body)
                .thenAccept(System.out::println)
                .exceptionally(e -> {
                    System.out.println("Request error: " + e.getMessage());
                    return null;
                })
                .join();
    }
}
```

{% endtab %}

{% tab title="GO" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	url := "http://api.voicepartner.fr/v1/audios/YOUR_API_KEY"

	response, err := http.Get(url)
	if err != nil {
		fmt.Printf("Error: %s\n", err.Error())
		return
	}
	defer response.Body.Close()

	body, err := ioutil.ReadAll(response.Body)
	if err != nil {
		fmt.Printf("Error: %s\n", err.Error())
		return
	}

	fmt.Printf("Response: %s\n", string(body))
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace API.ApiClients
{
    public class AudioFileList
    {
        public static async Task Main()
        {
            var url = "http://api.voicepartner.fr/v1/audios/YOUR_API_KEY";

            using (var client = new HttpClient())
            {
                try
                {
                    var response = await client.GetAsync(url);
                    var content = await response.Content.ReadAsStringAsync();
                    Console.WriteLine("Response: " + content);
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error: " + ex.Message);
                }
            }
        }
    }
}
```

{% endtab %}
{% endtabs %}

#### **Response**

{% tabs %}
{% tab title="json" %}

```json
{
    "nb_datas": 58,
    "datas": [
        {
            "name": "filename1",
            "token": "token1",
            "size": "104.5Ko",
            "duration": "0:07",
            "created_at": {
                "date": "2018-04-16 13:26:46.000000",
                "timezone_type": 3,
                "timezone": "Europe/Paris"
            }
        },
        {
            "name": "filename2",
            "token": "token2",
            "size": "762.7Ko",
            "duration": "0:49",
            "created_at": {
                "date": "2018-06-04 07:26:04.000000",
                "timezone_type": 3,
                "timezone": "Europe/Paris"
            }
        },...
    ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.docpartner.dev/en/api/voice-partner/voice-message/audio-file-list.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
