# Set Greeting

## GET or POST Request

{% hint style="info" %}
<https://v1.api19.com/voicemail/greeting/set>
{% endhint %}

Upload a file or make AI make you a greeting

## HTTP Post Variables Supported

<table data-header-hidden><thead><tr><th width="123.9090576171875"></th><th width="108.54547119140625"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Required</td><td>Type</td></tr><tr><td>box_id</td><td>yes</td><td>2-12 digits</td></tr><tr><td>type</td><td>yes</td><td>upload OR generate</td></tr><tr><td>key</td><td>yes</td><td>your api key</td></tr><tr><td><strong>For Upload</strong></td><td><strong>Required</strong></td><td><strong>For type=upload</strong></td></tr><tr><td>wav</td><td>yes</td><td>base64 encoded wav file</td></tr><tr><td>extension</td><td>yes</td><td>wav or mp3</td></tr><tr><td><strong>For Generate</strong></td><td><strong>Required</strong></td><td><strong>For type=generate</strong></td></tr><tr><td>text</td><td>yes</td><td>the text to say</td></tr><tr><td>voice</td><td>yes</td><td>the voice you want to say it<br>choices:<br>alloy, echo, fable, onyx, nova, shimmer</td></tr></tbody></table>

{% tabs %}
{% tab title="Curl Post" %}

<pre class="language-php"><code class="lang-php"><strong>curl https://v1.api19.com/voicemail/greeting/get \
</strong> -d 'key=api_token' \
 -d 'box_id=2233' \
 -d 'type=generate' \
 -d 'text=hey+thanks+for+calling+leave+a+message' \
 -d 'voice=alloy'
  
OR

curl https://v1.api19.com/voicemail/greeting/get \
 -d 'key=api_token' \
 -d 'box_id=2233' \
 -d 'type=upload' \
 -d 'wav=[base64encoded wav file]' \
 -d 'extension=wav'
</code></pre>

{% endtab %}

{% tab title="JSON Response" %}

```json
{"status":"ok"}
OR
{"status":"error","error":"invalid type"}
```

{% endtab %}
{% endtabs %}
