rthornton | 2023-08-23 23:43:34 UTC | #1
I'm trying to update a user greetings via the API. I can find and download a greeting file in wav format and listen to it. I confirm it's the right prompt for the right user but I'm not sure of the format to upload a new wav file to replace the greeting (or create a new greeting for the prompt).
Download API to get greeting GET https://api.{{environment}}/api/v2/greetings/:greetingId/media?formatId=WAV
API https://api.{{environment}}/api/v2/greetings
{ "name": "", "type": "VOICEMAIL", "ownerType": "USER", "owner": {*removed** "name": "" },
"audioFile": { "durationMilliseconds": 0, "sizeBytes": 0, "selfUri": "" },
"audioTTS": "", "createdDate": "", "createdBy": "", "modifiedDate": "", "modifiedBy": "" }
If my new wav file is located in c:\temp\new.wav, how would I format the media file to upload it? I see lots of examples for architect prompts but nothing for voicemail greetings.
Thanks, Rob
tim.smith | 2023-08-24 16:45:33 UTC | #2
I'm trying to track down an answer about this, but my initial thought is that you can't set a greeting via API. The only docs I can find are this: https://help.mypurecloud.com/articles/record-a-voicemail-greeting/, which demonstrates that each user has to set it themselves by calling into their voicemail. I haven't found anyplace else to set this. Have you seen any feature where you can do this in the UI without making a phone call?
Regarding the API endpoint itself, I think that's for setting a TTS string that gets converted to a WAV file and the documented request contract is erroneous as it's the same as the response contract; it doesn't make any sense for the client to set fields like createdDate or modifiedBy. I think the audioFile data is also only for the response.
I'll continue seeking confirmation that I'm correct here and will post back once I can get in touch with someone.
system | 2023-09-24 16:45:36 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 21680