openapi: 3.2.0 info: title: Sonetel Globaldata API version: '2.0' description: 'Operations tagged Globaldata across 2 of this provider''s published API definitions: 8_globaldata.yaml, sonetel-supporting-data-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://public-api.sonetel.com/ description: Production tags: - name: Globaldata paths: /globaldata/timezone: get: summary: List all timezones description: '# List all timezones Get a list of all available timezones and their details such as the `zone_name` which includes the names of the most popular cities in that zone and the numeric `zone_id`. You can use this `zone_id` to update your account or user''s location settings. For example, to update a user''s timezone to *Hawaii* (`zone_id : 47`), use the following request: ```c curl \ --location \ --request PUT ''https://public-api.sonetel.com/account/{accountid}/user/{userid}'' \ --header ''Content-Type: application/json'' \ --header ''Authorization: Bearer '' \ --data-raw ''{ "location" : { "timezone_id" : 47 } }'' ``` A successful response will return the updated user resource. > Updating the timezone of your accounts affects the office hours set in your account.' operationId: get-globaldata-timezone responses: '200': $ref: '#/components/responses/Timezone' servers: - url: https://public-api.sonetel.com/ description: Production tags: - Globaldata servers: - url: https://public-api.sonetel.com/ description: Production /globaldata/voiceprompts: get: summary: List of pre-recorded voices description: '# List of pre-recorded voices As part of our voice app service, we offer pre-recorded & ready-to-use set of voices that can be used in your voice apps. Use this endpoint to get a list of all the pre-recorded voices that are available for use. > A voice is a set of pre-recorded messages that are available in a specific language and gender. It corresponds to the `voice` parameter in a voice app and controls the language & gender of the voice in which messages are played to the caller. ### Change the default voice of a voice app To change the default voice of a voice app, you can update it''s `voice` property by issuing a PUT request to `/account/{accountid}/voiceapp/{voiceappid}`. Here is an example where we are updating the default voice of a voicemail box to Spanish. **Step 1**: Issue a GET request to `/globaldata/voiceprompts`. From the results, select which "voice" you wish to use. For example, to use the Spanish voice, make a note of the code defined in the response''s `lang_path` property. For Spanish this is `spa`. **Step 2**: Get the unique ID of the voice app for which you wish to change the default voice. Issue a GET request to `/account/{accountid}/voiceapp` and the resposne will return a list of all the voice apps in your account. **Step 3**: Now, issue a PUT request as shown below to update the voice app''s default voice to Spanish. ```c curl \ --location \ --request PUT ''https://public-api.sonetel.com/account/{accountid}/voiceapp/{voiceappid}'' \ --header ''Authorization: Bearer '' \ --header ''Content-Type: application/json'' \ --data-raw ''{ "app_id": "{voiceappid}", "name": "Sales voicemail", "app_type": "mailbox", "voice": "spa" }'' ```' operationId: get-globaldata-voiceprompts responses: '200': $ref: '#/components/responses/Voiceprompts' servers: - url: https://public-api.sonetel.com/ description: Production tags: - Globaldata servers: - url: https://public-api.sonetel.com/ description: Production /globaldata/language: get: summary: List all language codes description: '# List all language codes To ensure a truly global service, Sonetel''s apps can be used in different languages. You can use the `/language` API endpoint to get a list of all the languages around the world. Although our app has not yet been translated into all the languages, we are constantly updating our service with more languages. To change the language of your account, or just a user in your account, you can issue a PUT request to the user or account resource and include the new `language` code in the request body. > Updating the language of your account affects some default settings such as what voice is used for your default voice apps and so on. All new users will inherit the default language of the account. Request: ```c curl \ --location \ --request PUT ''https://public-api.sonetel.com/account/{accountid}'' \ --header ''Content-Type: application/json'' \ --header ''Authorization: Bearer '' \ --data-raw ''{ "language" : "swe" }'' ``` A successful response will return the updated resource. Request: ```c curl \ --location \ --request PUT ''https://public-api.sonetel.com/account/{accountid}/user/{userid}'' \ --header ''Content-Type: application/json'' \ --header ''Authorization: Bearer '' \ --data-raw ''{ "language" : "swe" }'' ``` A successful response will return the updated resource.' operationId: get-globaldata-language responses: '200': $ref: '#/components/responses/Language' servers: - url: https://public-api.sonetel.com/ description: Production tags: - Globaldata servers: - url: https://public-api.sonetel.com/ description: Production components: responses: Voiceprompts: description: List of pre-recorded voices content: application/json: schema: type: object properties: id: type: string description: Internal ID of the voice prompt. minLength: 1 lang_path: type: string description: 'The code to be used for changing the language and accent in voice apps. Issue a PUT request to the voice app endpoint with the `voice` property set to the correct value.' minLength: 1 name: type: string description: A descriptive name of the voice such as "English UK" or "French". minLength: 1 gender: type: string description: The gender of the voice. minLength: 1 language: type: string description: The 3 letter ISO language code. minLength: 1 supported_voiceapps: type: object description: A list of voice apps where this voice can be used. properties: ivr: type: boolean description: A flag that specifies whether the default messages for IVR are available in this voice. prompt_record: type: boolean description: A flag that specifies whether the default messages for voice prompt recording function are available in this voice. company_mailbox: type: boolean description: 'A flag that specifies whether the default messages for the company voicemail are available in this voice. Company voicemail is different than user voicemail. A user''s voicemail can only be delivered to them via email. However, a company voicemail can be delivered to a user or an email address.' user_mailbox: type: boolean description: A flag that specifies whether the default messages for user voicemails are available in this voice. user_prompt_record: type: boolean description: A flag that specifies whether the voice messages heard by the caller when recording their personal voicemail messages are available in this voice. call_thru: type: boolean description: A flag that specifies whether the voice messages heard by the caller when using our Call thru service are available in this voice. call_back: type: boolean description: A flag that specifies whether the voice messages heard by the caller when using our Callback service are available in this voice. conference: type: boolean description: A flag that specifies whether the voice messages heard by the caller when connecting to our conference service are available in this voice. system_prompts: type: boolean description: A flag that specifies whether the voice messages used in other system messages such as invalid extention, etc are available in this voice. x-examples: example-1: id: '1' lang_path: en name: English gender: male language: eng supported_voiceapps: ivr: true prompt_record: false company_mailbox: true user_mailbox: true user_prompt_record: false call_thru: false call_back: true conference: false system_prompts: true examples: Example: value: id: '1' lang_path: en name: English gender: male language: eng supported_voiceapps: ivr: true prompt_record: false company_mailbox: true user_mailbox: true user_prompt_record: false call_thru: false call_back: true conference: false system_prompts: true headers: Content-Type: schema: type: string description: application/json;charset=UTF-8 Timezone: description: Support timezones content: application/json: schema: type: object properties: gmt_offset: type: string description: The offset from UTC when daylight savings is not in effect. For example `"+09:30"`, `"-07:00"` minLength: 1 zone_id: type: string description: A unique ID to identify the zone. It is used when the timezone settings for an account or user need to be updated. minLength: 1 zone_name: type: string description: A descriptive name of the timezone including the names of the popular cities from that zone. For example, `"(GMT +9:00) Tokyo, Seoul, Osaka"` minLength: 1 daylight_saving_time: type: object description: Daylight saving offset for zone. If the timezone does not follow daylight saving then the `gmt_offset` under this object is same as the regular `gmt_offset`. properties: gmt_offset: type: string description: The offset from UTC when daylight savings is in effect. minLength: 1 x-examples: example-1: gmt_offset: string zone_id: string zone_name: string daylight_saving_time: gmt_offset: string examples: Example: value: gmt_offset: -08:00 zone_id: '44' zone_name: (GMT -8:00) Pacific time (US and Canada) daylight_saving_time: gmt_offset: -07:00 headers: Content-Type: schema: type: string description: application/json;charset=UTF-8 Language: description: Example response content: application/json: schema: type: object properties: isolangCode2Digit: type: string description: Two letter ISO code of the language isolangCode3Digit: type: string description: Three letter ISO code of the language langId: type: number description: A numeric ID that uniquely identifies this language. langName: type: string description: Name of the language langFamily: type: string description: The family that the language belongs to. x-examples: example-1: isolangCode2Digit: ab isolangCode3Digit: abk langId: 1 langName: Abkhaz langFamily: Northwest Caucasian examples: Example: value: isolangCode2Digit: sv isolangCode3Digit: swe langId: 154 langName: Swedish langFamily: Indo-European x-refined-from: - 8_globaldata.yaml - sonetel-supporting-data-openapi.yml