# Play an audio clip

```
PATCH /say
```

## Parameters

| Parameter | Data Type         | Value                                           |
| --------- | ----------------- | ----------------------------------------------- |
| `serial`  | string, required  | the serial number of a vssl device              |
| `number`  | integer, required | the zone number.                                |
| `volume`  | integer, required | the volume level to play the audio file (0-99). |
| `url`     | string, required  | the url where the audio file can be             |

> note: the call will return immediately with either a failure message or an indication that the playback has been requested. It is possible for the playback to fail (e.g. the network can't retrieve the file, the file format is invalid, ...). Further status will be provided in the coming VSSL FW iterations.
>
> note2: if this is the first time a playback has been requested then we will send a command to wake up the unit and wait a few seconds before playing the file. Otherwise, if the last playback was less then 15 minutes ago then we will play the clip immediately.
>
> note3: this call allows you to play a file on 1 or all of the zones. If you want to play to a subset (e.g. zone 1,2) then you will need to make two calls, one for each zone you want to play the file on.

## Response

Status of the call

## Example Request

Sample HTTP request

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

```bash
$ curl --request PATCH http://localhost:8000/api/say?'serial=00BD27EF7210&number=2&volume=55&url=http://soundbible.com/grab.php?id=2190%26type=mp3'
```

{% endtab %}

{% tab title="IP Cmd" %}

```bash
IP: 192.168.0.15
Host: 8000
Data: "PATCH /api/say?'serial=00BD27EF7210&number=2&volume=55&url=http://soundbible.com/grab.php?id=2190%26type=mp3 HTTP/1.1\r\n\r\n"
```

{% endtab %}

{% tab title="httpie" %}

```
$ http PATCH http://192.168.0.15:8000/api/say serial==00BD27EF657D number==2 volume==26 url=='http://soundbible.com/grab.php?id=2190&type=mp3'
```

{% endtab %}

{% tab title="node" %}

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

axios.patch('http://192.168.0.15:8000/api/say', {
    params: {
      serial: '00BD27EF657D',
      number: 2, 
      volume: 26, 
      url: 'http://soundbible.com/grab.php?id=2190&type=mp3'
    }
  }).then((response)=>{
    console.log(response);
  }).catch((response)=>{
    console.log('Error making request');
  })
```

{% endtab %}
{% endtabs %}

## Example Response

```javascript
{
  "status": "request sent"
}
```


---

# Agent Instructions: 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:

```
GET https://vssl.gitbook.io/vssl-rest-api/announcements/play-audio-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
