This endpoint is used to send Voice Messages individually (1 request per Voice Message).
It is ideal for sending single personalised messages for use cases like notifications or OTP messages.
CLID whitelisting is mandatory for source; please reach out to your account manager or email [email protected]
curl --request POST \
--url https://voice.wavecell.com/api/v1/subaccounts/subAccountId1/callflows \
--header 'accept: application/json' \
--header 'authorization: Bearer axxxxxxxxxxxefg' \
--header 'content-type: application/json' \
--data '
{
"validUntil": "2024-07-15T08:25:16.225Z",
"callflow": [
{
"action": "makeCall",
"params": {
"source": "6512345678",
"destination": "6590000000"
}
},
{
"action": "say",
"params": {
"text": "Hi, This is a test message from 8x8",
"language": "en-US",
"voiceProfile": "en-US-Standard-A",
"repetition": 1,
"speed": 1
}
},
{
"action": "hangup"
}
]
}
'
subAccountId - (string required)
You must replace {subAccountId} with the subaccountid that you want to use. By default this is generated once you have completed the voice onboarding.
BODY PARAMS
- To send a single Voice Message using the 8x8 Voice Message API you need to POST a JSON object to the url defined above.
- Additionally it is required to set either a language code or a voice profile in the request, to guarantee the correct pronunciation of the voice message.
- The JSON object takes the following properties:
validUntil date-time (Optional)
date time. format: YYYY-MM-DDTHH:MM:SS.SSSZ
Example: 2024-07-03T05:59:32.226Z
action: makeCall(string-required)
makeCall enables you to create an outbound voice call to a specified destination with the caller id
specified as source. Once the call is answered by the receiving party, the rest of the callflow actions
will be executed in sequence.
PARAMS OBJECT
source (string - required)
Originator phone number. For CLIDs that have been whitelisted and CLID overwrite is enabled for the subaccount, please set the CLID as "6588000000".
Example: [+] [country code] [88000000]
destination (string -required)
Destination phone number in E.164 international format.
Example: +6590000000 [+] [country code] [subscriber number including area code]
action: Say(string-required)
Say enables you to convert the given text into a speech and play it in the currently active call.
PARAMS OBJECT
text (string-required)
The message body content to be converted to voice. Maximum voice message length is 3000 characters
language (string - required)
Set language code for the correct pronunciation of the voice message. To see all available languages please send an API request to https://developer.8x8.com/connect/reference/get-voice-profile-information endpoint to retrieve voice profiles that 8x8 supports
voiceProfile (string - required)
Choose one of the available Voice profiles to define the voice, gender and accent for the message you are sending. To see all available speech profiles, please send an API request to https://developer.8x8.com/connect/reference/get-voice-profile-information endpoint to retrieve voice profiles that 8x8 supports
repetition (integer)
The amount of times to repeat the voice message during the call. Accepted values are 1, 2 or 3. Default value is 1 for no repeat.
speed (integer)
Reproduction speed of speech in the resulting message. Accepted values range from 0.5(slowest) - 2(fastest), as a two digit number. The default value is 1.
action: hangup(string-required)
hangup enables you to disconnect the active call and may also be used to indicate the end of the callflow.