---
title: "Update MOH for Domain from TTS"
method: PUT
path: "/domains/{domain}/users/{user}/moh/{index}"
tags: ["Media/Music on Hold/User"]
---

# Update MOH for Domain from TTS

`PUT /domains/{domain}/users/{user}/moh/{index}`

## Path parameters

- `domain` string, required — This is the main organization name. This is used to link resource to its group/tenant/organization/enterprise. Then using in path for GET you can set to "~" to use the domain name linked to your token/key instead of the domain name itself when reading for your own domain.
- `user` string, required — This is the main user extension for the user account. ~ can be used to mean "my account" which will extract the user from the token/key used for authentication.
- `index` string, required

## Request body

- object
  - `synchronous` 'yes' | 'no', required — When synchronous is requested with "yes" the response will be a 200 on success and will contain a valid JSON representiation of the new resource. If no or left off request a 202 "Accepted" will be given in a success case and this can be considered a success. Synchronous responses will be a little slower as the API will process the geo replication request and wait till the local copy has been written and can be read back berfore sending a response.
  - `script` string, required — This is a simple explanation of what the audio is and can include what is said in the audio file for explanation.
  - `voice_language` string — This is the language that can be requested when using TTS feature. Leave of to have API lookup configs from the defaults or domain specific configs.
  - `voice_id` string — This value will allow you to select the voice to be used for TTS applications. Value must be valid or will cause errors. leave off request to have the API lookup defaults from system and/or domain.

## Response `200`

- Audiofile
  - `filename` string — This is the filename without and path or folder. Should end in .wav
  - `ordinal-order` integer — This is the index of the audio file.
  - `file-duration-seconds` integer — This value is the length of the file in seconds.
  - `file-size-kilobytes` string — This value will be a formated filesize of the file in kilobytes
  - `created-datetime` string — This is the timestamp of create time fo the file
  - `file-access-url` string — This will be URL of the file for remote playback.
  - `file-script-text` string — This is the script that was used for text to speech and also used to create a new file.
  - `file-source` string — This is the source of the file, it will show how the file was created originally.
  - `text-to-speech-voice-id` string — This is the voice id used when using text to speech.
  - `text-to-speech-language` string — This is the voice language when using TTS.
  - `FromName` string
  - `FromUser` string
  - `FromHost` string
  - `NmsAni` string
  - `recorded-datetime` string — This is the timestamp of record time fo the file
  - `NmsRecStartTime` string
  - `NmsRecDuration` string
  - `TimeZone` string
  - `transcription` string

## Other responses

- `202`
- `400`
- `401`
- `404`

---

[API](https://skmtc.net/ns-api/apis/netsapiens-api-v2.md) · [All operations](https://skmtc.net/ns-api/apis/netsapiens-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ns-api/netsapiens-api-v2/versions/d37f65b5b886/schema)
