openapi: 3.2.0 info: title: Sonetel Account API version: '2.0' termsOfService: https://sonetel.com/en/help/help-topics/terms-conditions/terms-conditions/ description: 'Operations tagged Account across 8 of this provider''s published API definitions: 5_voice_apps.yaml, 7_users.yaml, account.yaml, phone_numbers.yaml, sonetel-account-openapi.yml, sonetel-phone-numbers-openapi.yml, sonetel-users-openapi.yml, sonetel-voice-apps-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://public-api.sonetel.com description: Production - url: https://public-api.sonetel.com/ description: Production tags: - name: Account paths: /account/{accountid}/voiceapp: get: summary: Get all voice apps description: '# Get all voice apps Issue a GET request to `/account/{accountid}/voiceapp` to fetch a list of all the voice apps in your account. The response contains the properties of all the voice apps in your account including their unique `app_id`.' operationId: get-voiceapps-account parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string responses: '200': $ref: '#/components/responses/List-voiceapps' '401': description: Unauthorized security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account post: summary: Create new voice app description: '# Create new voice app In addition to the default voice apps available in your Sonetel account, you can create new voice apps as well by issuing a POST request to the voice app list resource i.e. `POST https://public-api.sonetel.com/account/{accountid}/voiceapp`. The body of the request must contain a JSON representation of the app''s properties such as its name and type. These are described in details below. The response to a successful request carries the resource representation of the newly created voice app.' operationId: create-voiceapp-account parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: Content-Type in: header description: application/json required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/Voiceapp' responses: '200': $ref: '#/components/responses/Voiceapp-response' security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account servers: - url: https://public-api.sonetel.com description: Production /account/{accountid}/voiceapp/{voiceappid}: get: summary: Get voice app by ID description: '# Get voice app by ID Get the properties of a specific voice app using its unique `app_id` i.e. `GET https://public-api.sonetel.com/account/{accountid}/voiceapp/{voiceappid}`. The response contains a JSON representation of the app''s properties. The properties in the response will vary based on the type of voice app. #### Get the app_id To get the `app_id` of a specific voice app, issue a GET request to `/account/{accountid}/voiceapp`. This will return a list of all the voice apps in your Sonetel account.' operationId: get-account-voiceappid parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: voiceappid in: path description: The unique ID of the voice app you wish to manage. required: true schema: type: string responses: '200': $ref: '#/components/responses/Voiceapp-response' security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account put: summary: Update voice app by ID description: '# Update voice app by ID Voice apps can be updated by issuing a PUT to the `/voiceapp` resource. For example, `PUT https://public-api.sonetel.com/account/{accountid}/voiceapp/{voiceappid}`. The voice app''s name, voice, actions, etc can be updated. A list of the properties that can be updated is given below. > Not all the properties are available in the all the voice apps. Some of them will only be available in specific apps such as `sysprompt` or `mailbox` - this is mentioned in the property''s description. A successful response will return the updated resource.' operationId: update-account-voiceappid parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: Content-Type in: header description: application/json required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: voiceappid in: path description: The unique ID of the voice app you wish to manage. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/Voiceapp' responses: '200': $ref: '#/components/responses/Voiceapp-response' security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account delete: summary: Delete a voice app description: '# Delete a voice app Voice apps can be deleted by issuing a DELETE to the `/voiceapp` resource i.e. `DELETE https://public-api.sonetel.com/account/{accountid}/voiceapp/{voiceappid}` > Deleting a voice app is permanent. It is not possible to restore voice apps once they are deleted.' operationId: delete-account-voiceappid parameters: - name: Authorization in: header description: Bearer schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: voiceappid in: path description: The unique ID of the voice app you wish to manage. required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: resource: type: string description: Name of the resource accessed. For example `voiceapp`. readOnly: true status: type: string enum: - success - failed description: Status of the request i.e. success or failed. readOnly: true response: type: string description: Details of the response. readOnly: true x-examples: example-1: resource: voiceapp status: success response: Voice App deleted successfully examples: Example: value: resource: voiceapp status: success response: Voice App deleted successfully security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account servers: - url: https://public-api.sonetel.com description: Production /account/{accountid}/voiceapp/{voiceappid}/prompt: post: summary: Create a custom prompt description: '# Create a custom prompt You can create one or more custom prompts under a voice app. A custom prompt is a short message that you want your callers to hear under certain conditions. For example, if you frequently run sales and promotional offers, you can add a custom prompt for this. The voice message linked to this custom prompt can then be updated whenever you have a new promo or when an ongoing promo ends. When creating the prompt, you can only specify its name. The voice message linked to it can only be added after the prompt has beens successfully created. The voice message associated with a prompt can be setup in different ways. You can upload an audio file with the voice message, record the voice message by calling in to our recording service or use our paid text-to-speech service. Creating a prompt and associating a voice message with it is a as a two-step process: 1. The first step involves creation of the prompt resource. This is done by issuing a POST to the prompt resource. The prompt''s name must be specified as a parameter in the request. At this stage, the prompt does not have any voice message associated to it and is not usable in the voice app. 2. To attach a voice message to the prompt, you can either upload a pre-recorded wav file or dial *22 from your Sonetel account, enter the `record_id` of the prompt and record it. ### Flow for creating a new prompt Here is a sample flow where we create a new custom prompt and upload a pre-recorded audio file to it. #### Step 1 - create prompt ```c curl \ --location \ --request POST ''https://public-api.sonetel.com/account/{accountid}/voiceapp/{voiceappid}/prompt?name=Christmas Promo'' \ --header ''Authorization: Bearer '' ``` > A success response will return the JSON representation of the newly created prompt. Make a note of the `prompt_id` for use in step 2. #### Step 2 - upload voice message ```c curl \ --location \ --request POST ''https://public-api.sonetel.com/prompt/{promptid}/message'' \ --header ''Accept: application/json, text/plain, */*'' \ --header ''Authorization: Bearer '' \ --header ''Content-Type: multipart/form-data; boundary={boundary_id}'' --form ''file=@"{/path/to/file}"'' ``` An alternative to uploading a pre-recorded message is recording your own message by calling in via SIP. Place a SIP call to the prompt''s `record_path` (which is just a SIP address), record your message and press # once done. Similarly, to listen to the recording, call the prompt''s `play_path`.' operationId: post-user parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: Content-Type in: header description: application/json required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: voiceappid in: path description: The unique ID of the voice app you wish to manage required: true schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/Create-Prompt' responses: '200': $ref: '#/components/responses/List-prompt' security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account get: summary: List prompts linked to voice app description: '# List prompts linked to voice app A prompt represents a voice message in a voice app such as the welcome message in an IVR. Use this endpoint to get a list of all the prompts associated with a voice app as shown in the example below. Request: ```c curl \ --location \ --request GET ''https://public-api.sonetel.com/account/{accountid}/voiceapp/{voiceappid}/prompt?fields=message'' \ --header ''Authorization: Bearer '' ``` Response: ```json { "resource": "prompt", "status": "success", "response": [ { "prompt_id": "PRio9aaaaaaa", "type": "standard", "name": "Welcome", "app_id": "VA9azaabbcc", "account_id": "20000000", "record_id": "7001", "exists": true, "file_name": "response.wav", "file_details": "Uploaded", "play_path": "play#PRio9aaaaaaa@prompts.sonetel.com", "record_path": "record#PRio9aaaaaaa@prompts.sonetel.com", "audio_length": "10.0", "size": "157.92", "message_url": "https://audio-prompts.sonetel.com/PRio9aaaaaaa-00000000-aaaa-0000-a000-0a0aa00a000a.wav", "create_date": "20210727T00:00:00Z" }, { "prompt_id": "PRio9aaaaaa4", "type": "standard", "name": "Please wait", "app_id": "VA9zzxxyyaa", "account_id": "20000000", "record_id": "7008", "exists": true, "file_name": "", "play_path": "play#PRio9aaaaaa4@prompts.sonetel.com", "record_path": "record#PRio9aaaaaa4@prompts.sonetel.com", "audio_length": "2", "size": "", "message_url": "https://audio-prompts.sonetel.com/standard/en/sonetel/please_wait.wav", "create_date": "" } ] } ```' operationId: get-user parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: voiceappid in: path description: The unique ID of the voice app you wish to manage required: true schema: type: string responses: '200': $ref: '#/components/responses/List-prompt' security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account servers: - url: https://public-api.sonetel.com description: Production /account/{accountid}/voiceapp/{voiceappid}/prompt/{promptid}: get: summary: Get prompts by ID description: '# Get prompts by ID Use this endpoint to get the details of a specific prompt using its `prompt_id`. To get a list of all the prompts associated with a voice app, issue a GET request to `/account/{accountid}/voiceapp/{voiceappid}/prompt`. The response returns a JSON representation of all the prompts with their properties. ### Prompt message details In order to fetch the details of the voice message linked to the prompt, add the query parameters `?fields=message` to the GET request. Example: ```c curl \ --location --request GET \ ''https://public-api.sonetel.com/account/{accountid}/voiceapp/{voiceappid}/prompt/{promptid}?fields=message'' \ --header ''Content-Type: application/json'' \ --header ''Authorization: Bearer '' ```' operationId: get-voiceapp-prompt-id parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: fields in: query description: Include the message details in the response by adding this query parameter to the API call. schema: type: string default: message - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: voiceappid in: path description: Unique ID of the voice app you wish to manage required: true schema: type: string - name: promptid in: path description: Unique ID of the voice prompt you wish to manage required: true schema: type: string responses: '200': $ref: '#/components/responses/List-prompt' '404': description: Not Found security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account put: summary: Update prompt by ID description: 'Update the prompt by issuing a PUT request to the `/prompt/{promptid}` endpoint. At the moment, it is only possible to update the name of a prompt. > The voice message played by the prompt can be updated by issuing a POST request to the `/prompt/{promptid}/message` endpoint. This is described in detail in the section **Add custom message to a prompt**.' operationId: Replace-voiceapp-promptid parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: voiceappid in: path description: Unique ID of the voice app you wish to manage required: true schema: type: string - name: promptid in: path description: Unique ID of the voice prompt you wish to manage required: true schema: type: string responses: '200': description: OK security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account delete: summary: Delete a custom prompt description: '# Delete a custom prompt Prompts that you have created, i.e. custom prompts can be deleted by issuing a DELETE to the prompt resource, either using the full URL or the short URL. To delete using the full path URL use: `DELETE https://public-api.sonetel.com/account/{accountid}/voiceapp/{voiceappid}/prompt/{promptid}` Response to a successful method call carries a string with confirmation. > It is not possible to delete the default prompts added to the voice app automatically when it is created.' operationId: delete-voiceapp-promptid parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: voiceappid in: path description: Unique ID of the voice app you wish to manage required: true schema: type: string - name: promptid in: path description: Unique ID of the voice prompt you wish to manage required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: resource: type: string description: Name of the resource accessed i.e. prompt minLength: 1 status: type: string description: Status of the request i.e. success or failed minLength: 1 response: type: string description: Details of the response. minLength: 1 x-examples: example-1: resource: prompt status: success response: Prompt deleted successfully examples: Example: value: resource: prompt status: success response: Prompt deleted successfully security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account servers: - url: https://public-api.sonetel.com description: Production /account/{accountid}/user: post: summary: Add new user description: '# Add new user Add a new user to your account by issuing a POST request to the `/user` endpoint. You must include the user''s details such as their first and last names, password and email address in order to successfully create their account. > The user''s email address must be a unique i.e. not in use by any other user in our system. You can optionally include the `"type" : "admin"` property as well if you wish to add a new admin user. ### User settings Some of the user''s preferences can be set while creating the account. For example, you can set the user''s call settings or their location.' operationId: postAccountByAccountidUser parameters: - name: Content-Type in: header description: application/json required: true schema: type: string default: application/json - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID. required: true schema: type: number requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/User-Update' examples: Add regular user: value: user_fname: Jane user_lname: Doe email: user1@example.com password: pa$$word location: country: USA area_code: '212' Add admin user: value: user_fname: John user_lname: Doe email: user2@example.com password: pa$$word type: admin responses: '200': description: User Created content: application/json: schema: $ref: '#/components/schemas/User-GET' '400': description: Missing Required Information '409': description: Email Already Taken security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account x-operation-id-source: normalized x-operation-id-original: post-user get: summary: List all users description: '# List all users Use this endpoint to either get a list of all the users present in your account or search for a specific user. ## List all users To get a list of all users, issue a GET request to `/account/{accountid}/user`. The response contains a list of all the users along with their details such as their unique user id, email address, created date and so on. ## Search for a user To search for a specific user, add one of the query parameters listed below. For example, to search for a user whose email address contains the word ''manager'' use `/account/{accountid}/user?email=manager`' operationId: getaccount-accountid-user parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: name in: query description: Name of the user you want to search for. Entering the partial name will return all the users with matching names. schema: type: string - name: email in: query description: Email address of the user you want to search for. Entering a partial email address will return all the users with matching emails. schema: type: string - name: accountid in: path description: Your Sonetel account ID. required: true schema: type: number responses: '200': description: OK content: application/json: schema: type: object properties: resource: {} status: type: string description: Status of the request minLength: 1 response: type: array minItems: 1 uniqueItems: true items: type: object properties: user_fname: type: string description: The first name of the user minLength: 1 max_conversations: type: number description: The maximum number of customer conversations the user can handle simultaneously language: type: string description: Three letter ISO code of the user's account language. minLength: 1 language_id: type: number description: An internal numeric code of the user's account language. title: type: string description: The user's job title for example, Sales Engineer, CEO, etc. minLength: 1 type: type: string description: Privilege level of user i.e. admin or regular minLength: 1 user_lname: type: string description: The last name of the user. minLength: 1 tags: type: string description: Internal identifier used by Sonetel. minLength: 1 password_status: type: string description: 'A user’s access via password may be blocked if there are many attempts to use an incorrect password, either while signing in to the web portal or while connecting a SIP phone. This field indicates the current status of the password. This can take the following values. - `ok`: Indicates that access via password is OK. - `1` or `2`: There has been one(1) or two(2) attempts to connect with an incorrect password. - `locked`: The password is locked out and must be reset.' minLength: 1 account_id: type: string description: The Sonetel account ID of the account that the user is linked to. minLength: 1 user_jid: type: string description: The User’s Jabber Id. minLength: 1 sonetel-id: type: string description: A unique identifier for the user used by Jabber. minLength: 1 user_id: type: string description: Unique Id of the Sonetel user. minLength: 1 company_name: type: string description: Name of the company the user is linked to. minLength: 1 created_date: type: string description: The date & time when the user's account was created. minLength: 1 email: type: string description: The user's email address. minLength: 1 notifications: type: number description: Number of unread notifications for the user. x-examples: example-1: resource: null status: success response: - user_fname: John max_conversations: 3 language: eng auto_translate: false language_id: 41 title: Sales Manager type: regular user_lname: Doe tags: conversations password_status: OK account_id: '2000000' user_jid: 59f9c80c-aaaa-1111-bbbb-cccc3333dddd@eu01.sonetel.com sonetel-id: 59f9c80c-aaaa-1111-bbbb-cccc3333dddd@sonetel.com user_id: '2016383950' company_name: Acme Inc created_date: 20210716T00:00:00Z email: user@example.com notifications: 0 - user_fname: John max_conversations: 3 language: eng auto_translate: false language_id: 41 title: '' type: admin user_lname: Doe tags: conversations password_status: OK account_id: '2000000' user_jid: fa2033d0-aaaa-1111-bbbb-cccc3333dddd@eu01.sonetel.com sonetel-id: fa2033d0-aaaa-1111-bbbb-cccc3333dddd@sonetel.com user_id: '201000000' company_name: Acme Inc created_date: 20210716T00:00:00Z email: user@example.com notifications: 0 examples: Example: value: resource: null status: success response: - user_fname: John max_conversations: 3 language: eng auto_translate: false language_id: 41 title: Sales Manager type: regular user_lname: Doe tags: conversations password_status: OK account_id: '0000000' user_jid: 1a1a1a1a-a2a2-4343-a0a0-d0d0d0d0d0d0@eu01.sonetel.com sonetel-id: 1a1a1a1a-a2a2-4343-a0a0-d0d0d0d0d0d0@sonetel.com user_id: '2016383950' company_name: Acme Inc created_date: 20210716T00:00:00Z email: john.doe@example.com notifications: 0 - user_fname: Adam max_conversations: 3 language: eng auto_translate: false language_id: 41 type: admin user_lname: Smith tags: conversations password_status: OK account_id: '0000000' user_jid: 1b1b1b1b-a2a2-4343-a0a0-d0d0d0d0d0d0@eu01.sonetel.com sonetel-id: 1b1b1ba1b-a2a2-4343-a0a0-d0d0d0d0d0d0@sonetel.com user_id: '2016383956' company_name: Acme Inc created_date: 20210716T00:00:00Z email: adam.smith@example.com notifications: 0 security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account servers: - url: https://public-api.sonetel.com description: Production /account/{accountid}/user/{userid}: get: summary: Get user profile description: '# Get user profile Get the details of a user''s profile such as their name, email address, title and so on. You need to pass the user''s unique user ID as a path parameter with the request.' operationId: get-account-accountid-user-userid parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: A unique ID assigned to each Sonetel account. required: true schema: type: string - name: userid in: path description: A unique ID assigned to each user in an account. Get a list of all users in your account using `GET /account/{accountid}/user` required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/User-GET' security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account put: summary: Update user profile description: '# Update user profile Use this endpoint to update the user''s profile such as their name or title. You need the user''s unique ID (get it from here) and must pass the updated settings in the requuest body. For example, to update the user''s title, 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 ACCESS_TOKEN'' \ --data-raw ''{"title":"USER_TITLE"}'' ``` A success response will contain the updated user resource. > To update the user''s call settings, use the `/account/{accountid}/user/{userid}/call` endpoint instead.' operationId: put-account-accountid-user-userid parameters: - name: Content-Type in: header description: application/json required: true schema: type: string default: application/json - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: A unique ID assigned to each Sonetel account. required: true schema: type: string - name: userid in: path description: A unique ID assigned to each user in an account. Get a list of all users in your account using `GET /account/{accountid}/user` required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/User-Update' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/User-GET' security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account delete: summary: Delete a user description: '# Delete a user In order to delete a user from your Sonetel account, issue a DELETE request to this endpoint. You will need the user''s unique ID in order to delete their account. If a phone number is connected to the user, please ensure that it is conncted to a different destination otherwise incoming calls will not work once the user is deleted. > Once a user has been deleted, it is impossible to restore their account or the user settings.' operationId: delete-account-accountid-user-userid parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: A unique ID assigned to each Sonetel account. required: true schema: type: string - name: userid in: path description: A unique ID assigned to each user in an account. Get a list of all users in your account using `GET /account/{accountid}/user` required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: resource: {} status: type: string minLength: 1 response: type: string minLength: 1 required: - status - response x-examples: example-1: resource: null status: success response: User deleted successfully examples: Example: value: resource: null status: success response: User deleted successfully security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account servers: - url: https://public-api.sonetel.com description: Production /account/{accountid}/user/{userid}/call: post: summary: Update call settings description: '# Update call settings You can customize what happens when a user receives an incoming phone call.' operationId: post-account-accountid-user-userid-call parameters: - name: Content-Type in: header description: application/json required: true schema: type: string default: application/json - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: userid in: path description: The unique ID of the user whose settings are to be updated required: true schema: type: string requestBody: description: '' content: application/json: schema: $ref: '#/components/schemas/User-Call-Settings' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/User-Call-Settings' security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account get: summary: Get call settings description: 'Issue a GET request to the this endpoint in order to fetch the user''s current call settings i.e. what happens when a user receives an incoming phone call or makes an outgoing call. This includes settings that define what phones should ring, for how many seconds, and what caller-Id should be sent to the phones. This is described in detail in the ''Update call settings'' section.' operationId: get-account-accountid-user-userid-call parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: userid in: path description: The unique ID of the user whose settings are to be updated required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/User-Call-Settings' security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account servers: - url: https://public-api.sonetel.com description: Production /account/{accountId}: get: summary: Get your account information description: Issue a GET request to the `/account/{accountId}` endpoint to fetch your account properties such as the currency and current prepaid balance. operationId: get-users-userId parameters: - $ref: '#/components/parameters/Authorization' - name: fields in: query description: 'Specify which fields must be returned. The list of fields must be specified comma separated. Possible values of fields are: `call_recording_settings`, `autorefill_settings`, `notifications`, `usage`, `service_settings`' schema: type: string - name: accountId in: path description: Your Sonetel account ID required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Account-GET' headers: Content-Type: schema: type: string description: application/json;charset=UTF-8 '404': description: User Not Found security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account put: summary: Update your account information description: '# Update your account information Update you account properties by issuing a PUT request to the `/account/{accountId}` endpoint. At the moment, you can update the following properties in your account: 1. Company name 2. Language 3. Timezone In order to update the language and timezone, you will need to use the unique language and timezone identifiers. You can easily get them from our `/globaldata` endpoint. - `language` - https://public-api.sonetel.com/globaldata/language - `zone_id` - https://public-api.sonetel.com/globaldata/timezone Read more about the /globaldata APIs.' operationId: put-account-accountId parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: Content-Type in: header description: application/json required: true schema: type: string default: application/json - name: accountId in: path description: Your Sonetel account ID required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/Account-PUT' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Account-GET' headers: Content-Type: schema: type: string description: application/json;charset=UTF-8 '401': description: Unauthorized security: - Production: [] servers: - url: https://public-api.sonetel.com description: Production tags: - Account servers: - url: https://public-api.sonetel.com description: Production /account/{accountId}/settings/data-mgr/call-recording: get: summary: Fetch call recording data settings description: Fetch a user's data management settings for call recordings. operationId: get-account-accountId-settings-data-mgr-call-recording parameters: - name: accountId in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/DataMgrCallRecSettings' security: - {} servers: - url: https://public-api.sonetel.com description: Production x-internal: true tags: - Account put: summary: Update call recording data settings operationId: put-account-accountId-settings-data-mgr-call-recording parameters: - name: accountId in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountDataMgrCallRecSettings' responses: '200': $ref: '#/components/responses/DataMgrCallRecSettings' security: - {} servers: - url: https://public-api.sonetel.com description: Production x-internal: true tags: - Account servers: - url: https://public-api.sonetel.com description: Production /account/{accountid}/phonenumbersubscription: get: summary: Get my subscribed numbers description: '# Get my subscribed numbers A number subscription resource represents a phone number that you have purchased from or ported to Sonetel, or is available for free testing in your account. To buy a phone number from Sonetel via the API, you can create a phone number subscription by issuing a POST request to the `account/{accountid}/phonenumbersubscription` endpoint. At the time of purchase, or later via an update, you can choose how the incoming calls to it should be handled. For example, you can specify whether calls should be sent to a mobile number, SIP address or your voicemail box.' operationId: get-subscribed-numbers parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string responses: '200': description: Subscription Found content: application/json: schema: $ref: '#/components/schemas/List-PhnumSubscriptions' examples: Example: value: page_metadata: pagination_type: static count: '2' page_count: '1' previous: NA next: NA page: '1' first: NA last: NA sort: property: activation_date ignoreCase: false nullHandling: client descending: true ascending: false resource: phonenumbersubscription status: success response: - account_id: ACCOUNT_ID country_code: '1' area_code: '857' country: USA is_part_of_series: 'no' range: '1' city: Boston (857) type: geographic one_time_fee: '0.0' recurring_fee: '1.99' recurrence_interval: 1m per_call_fee: '0.000' per_min_fee: '0.000' charge_interval: '60' per_sms_fee: '0.0' per_fax_fee: '' currency: USD price_category: regular connect_to_type: app connect_to: UNIQUE_APP_ID activation_date: 20210702T10:42:44Z next_fee_date: 20210713T07:22:53Z reclaim_date: 20210812T07:22:53Z status: active status_desc: '' freetest: 'no' branded: true freeplan: false fax_enabled: 'no' sms_enabled: add-on fax_supported: 'no' sms_supported: 'no' phnum: '18575550000' free_test_expiry_date: '' sms_settings: delivery_methods: - dest_type: auto plan_details: current_renew_mode: 1m next_renew_mode: 1m activation_date: '2021-07-02T10:42:44Z' next_fee_date: '2021-07-13T07:22:53Z' deactivate_date: '2021-08-12T07:22:53Z' next_recurring_fee: '1.99' show: caller state: Massachusetts addr_req: none addr_proof: 'no' access_restrictions: international restrictions_desc: If you are on Premium, all types of numbers can be subscribed for free.
If you want a free number, select a City number and use our free chat function at your website. cli_support: add_on business_pkg_support: 'yes' package: standard call_recording_allowed: add_on voiceapp_connect: 'yes' csg_connect: 'yes' - account_id: ACCOUNT_ID country_code: '1' area_code: '347' country: USA is_part_of_series: 'no' range: '1' city: New York (347) type: geographic one_time_fee: '0.0' recurring_fee: '1.99' recurrence_interval: 1m per_call_fee: '0.000' per_min_fee: '0.000' charge_interval: '60' per_sms_fee: '0.0' per_fax_fee: '' currency: USD price_category: regular connect_to_type: user connect_to: '2000000000' activation_date: 20210525T12:42:55Z next_fee_date: 20210813T07:15:09Z reclaim_date: 20210912T07:15:09Z status: active status_desc: '' freetest: 'no' branded: false freeplan: false fax_enabled: 'no' sms_enabled: add-on fax_supported: 'no' sms_supported: 'no' phnum: '13475550000' free_test_expiry_date: '' sms_settings: delivery_methods: - dest_type: auto plan_details: current_renew_mode: 1m next_renew_mode: 1m activation_date: '2021-05-25T12:42:55Z' next_fee_date: '2021-08-13T07:15:09Z' deactivate_date: '2021-09-12T07:15:09Z' next_recurring_fee: '1.99' show: caller state: New York addr_req: none addr_proof: 'no' access_restrictions: international restrictions_desc: If you are on Premium, all types of numbers can be subscribed for free.
If you want a free number, select a City number and use our free chat function at your website. cli_support: add_on business_pkg_support: 'yes' package: standard call_recording_allowed: add_on voiceapp_connect: 'yes' csg_connect: 'yes' '404': description: Not Found servers: - url: https://public-api.sonetel.com/ description: Production tags: - Account post: summary: Buy a number description: '# Buy a number A phone number subscription is created when a phone number is assigned to your Sonetel account. To purchase a new number, issue a POST to the `/account/{accountid}/phonenumbersubscription` resource and mention the phone number in the body in the `phnum` field. > If you do not specify the `connect_to` and `connect_to_type` properties while purchasing the number, it will not be connected to any destination by default and incoming calls to it will not work. The charges for the phone number are debited from your Sonetel prepaid account when the number is successfully assigned to you. You can add credit to your prepaid account from app.sonetel.com. > Use the `/account` endpoint to check whether you have enough prepaid credit to purchase the phone number. To find a phone number that you want to buy, you can use `/numberstocksummary` and `/availablephonenumber` resources. The response carries the phone number subscription resource.' operationId: postaccount-accountid-phonenumbersubscription parameters: - name: Content-Type in: header description: application/json required: true schema: type: string default: application/json - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string requestBody: description: '' content: application/json: schema: type: object properties: phnum: type: string description: The phone number that you want to purchase. connect_to_type: type: string enum: - user - phnum - sip - app description: The type of destination that the phone number is connected to for receiving incoming calls. connect_to: type: string description: The object that the phone number is connected to. It can be a userId, a phone number or a SIP address. required: - phnum examples: Example (buy): value: phnum: '12025551234' Example (buy & connect to SIP): value: phnum: '12025551234' connect_to_type: sip connect_to: 12025551234@264.12.345.34:13410 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Single-phone-number-subscription' '401': description: Unauthorized servers: - url: https://public-api.sonetel.com/ description: Production tags: - Account servers: - url: https://public-api.sonetel.com/ description: Production /account/{accountid}/phonenumbersubscription/{phnum}: put: summary: Update number settings description: '# Update number settings After a phone number has been subscribed, you can issue a PUT request in order to change its settings such as the destination it is connected to, the package that it is on (standard or business). ## Change Call forwarding Incoming calls to a phone number can be sent to various types of destinations such as a user, a voice app or your mobile number. The `connect_to_type` and `connect_to` properties together define the destination where the number is connected. The below table specifies how these two properties can be used. | Destination | connect_to_type | connect_to | |--------------|-----------------|------------| |a user|user| `UserId` of the user| |any mobile or landline number|phnum|the destination number in E164 format with ''+''. For example, +14015550000| |SIP URI|sip|\[sip:\]sip_uri@domain_or_ip\[:port\]| |a voice app|app|`{ “app_type” : “ivr”, “app_id” : "UNIQUE_APP_ID" }`| **Note**: 1. To get the `userid` for all the users in your account, use `GET /account/{accountid}/user`. 2. A list of all the voice apps in your account and their `app_id` can be fetched using `GET /account/{accountid}/voiceapp` > ### Connecting numbers to a voiceapp > > Only phone numbers that are free with website or paid plans can be connected to a voice app. > Plans can be enabled from app.sonetel.com' operationId: putaccount-accountid-phonenumbersubscription-phnum parameters: - name: Content-Type in: header description: application/json required: true schema: type: string default: application/json - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: phnum in: path description: Your phone number in the E164 format without the leading +. required: true schema: type: string requestBody: content: application/json: schema: type: object properties: connect_to_type: type: string enum: - user - phnum - sip - app description: The type of destination that the phone number is connected to for receiving incoming calls. minLength: 1 connect_to: type: string description: The object that the phone number is connected to. It can be a userId, a phone number or a SIP address. minLength: 1 required: - connect_to_type - connect_to x-examples: example-1: connect_to_type: phnum connect_to: '+919866241476' show: caller examples: Example (user): value: connect_to_type: user connect_to: '200000000' Example (voicemail): value: connect_to_type: app connect_to: UNIQUE_APP_ID responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Single-phone-number-subscription' servers: - url: https://public-api.sonetel.com/ description: Production tags: - Account get: summary: Get my number details description: '# Get my number details Send a GET request to the `/account/{accountid}/phonenumbersubscription/{phnum}` endpoint to see the details of a specific phone number assigned to your account. Here `{phnum}` represents a phone number assigned to your account in the E164 format without the leading plus sign. For example, if the phone number is *+1 (401) 555-0000*, the API call will be `/account/{accountid}/phonenumbersubscription/14015550000` The response carries the phone number resource with its properties such as the destination it is connected to, the next date on which the subscription fee is due and so on.' operationId: getaccount-accountid-phonenumbersubscription-phnum parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: phnum in: path description: Your phone number in the E164 format without the leading +. required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Single-phone-number-subscription' servers: - url: https://public-api.sonetel.com/ description: Production tags: - Account delete: summary: Return number description: '# Return number A phone number subscription can be removed from your account by issuing a DELETE request to the phone number subscription resource. Mention the phone number to delete in the request URI. Deleting a phone number subscription permanently removes it. > Please be careful when deleting subscriptions, it may not be possible to re-assign the phone number once it is removed from your account. Issuing a DELETE request to the phone number subscription immediately removes it from your Sonetel account. If you wish to return the number after the current subscription period ends, you can turn off the renewal instead. 1. Sign in to your account from app.sonetel.com 2. Go to the Phone numbers section. 3. Click on the number you wish to return and change the renewal mode from *Subscription* to **Do not renew**' operationId: deleteaccount-accountid-phonenumbersubscription-phnum parameters: - name: Authorization in: header description: Bearer required: true schema: type: string - name: accountid in: path description: Your Sonetel account ID required: true schema: type: string - name: phnum in: path description: Your phone number in the E164 format without the leading +. required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: resource: type: string description: Name of the resource that was accessed minLength: 1 status: type: string enum: - success - failed description: The status of the request i.e. success or failed. minLength: 1 readOnly: true response: type: string description: The response from the API. minLength: 1 x-examples: example-1: resource: phonenumbersubscription status: success response: Successfully removed subscription of phone number 14012233433 from account 206497932 examples: Example: value: resource: phonenumbersubscription status: success response: Successfully removed subscription of phone number from account servers: - url: https://public-api.sonetel.com/ description: Production tags: - Account servers: - url: https://public-api.sonetel.com/ description: Production components: responses: Voiceapp-response: description: Example response content: application/json: schema: type: object properties: app_id: type: string description: The Unique ID of the voice app minLength: 1 name: type: string description: A descriptive name for the voice app minLength: 1 app_type: type: string enum: - ivr - mailbox - sysprompt description: The type of app i.e. IVR, voicemail. shortcode: type: string description: 'Internal extention number of the voice app. You can dial it from your Sonetel account (SIP call, callback, etc). You can also use it co forward calls from phone numbers to a voice app. i.e. in the incoming call settings of the phone number, set the call to forward to trhe app''s shortcode.' minLength: 1 sip_address: type: string description: The SIP address of the voice app minLength: 1 voice: type: string enum: - en - swe - spa - hin-fe - tam-fe - tel-fe - en-fe - gr-fe - en-uk-fe - fr-fe - ara-fe description: The set of pre-recorded voice prompts for the voice app play_welcome: type: string enum: - 'yes' - 'no' description: A flag that indicates if the welcome message is played or not. get_extension: type: string enum: - 'yes' - 'no' description: A flag that indicates if the auto-attendant function is active. play_menu: type: string enum: - 'yes' - 'no' description: A flag that indicates if the interactive voice menu function(receive digits from callers to take actions) is active or not. menu: type: object description: The voice response menu that defines the digits and the actions taken on each digit press properties: digit_0: type: object description: Action to be taken when the caller selects option 0 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. digit_1: type: object description: Action to be taken when the caller selects option 1 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. digit_2: type: object description: Action to be taken when the caller selects option 2 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. digit_3: type: object description: Action to be taken when the caller selects option 3 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. digit_4: type: object description: Action to be taken when the caller selects option 4 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. digit_5: type: object description: Action to be taken when the caller selects option 5 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. digit_6: type: object description: Action to be taken when the caller selects option 6 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. digit_7: type: object description: Action to be taken when the caller selects option 7 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. digit_8: type: object description: Action to be taken when the caller selects option 8 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. digit_9: type: object description: Action to be taken when the caller selects option 9 in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. timeout: type: object description: Action to be taken when the caller does not select any option in the IVR. properties: action: type: string description: Action to take when the menu item is selected by the caller. to: type: string description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's `user_id`. tts_allowed: type: string enum: - 'yes' - 'no' description: This is a read-only flag which indicates whether TTS functionality is allowed on this voice-app or not. readOnly: true x-examples: example-1: app_id: VAdhy6q1oioz name: Sai test menu app_type: ivr shortcode: '*21*2' sip_address: VAdhy6q1oioz@sonetel.net voice: en play_welcome: 'yes' get_extension: 'no' play_menu: 'yes' menu: digit_0: action: '' to: '' id: '' digit_1: action: '' to: '' id: '' digit_2: action: '' to: '' id: '' digit_3: action: '' to: '' id: '' digit_4: action: '' to: '' id: '' digit_5: action: '' to: '' id: '' digit_6: action: '' to: '' id: '' digit_7: action: '' to: '' id: '' digit_8: action: '' to: '' id: '' timeout: action: '' to: '' id: '' digit_9: action: '' to: '' id: '' tts_allowed: 'yes' examples: IVR: value: app_id: ACud89Klks name: Main menu app_type: ivr shortcode: '*21' sip_address: ACud89Klks@sonetel.net voice: hin-fe play_welcome: 'yes' get_extension: 'no' play_menu: 'yes' menu: digit_0: action: '' to: '' id: '' digit_1: action: call to: user id: '2000000000' digit_2: action: play to: prompt id: PRio9abcd3fgh digit_3: action: call to: phnum id: '+46850000000' digit_4: action: '' to: '' id: '' digit_5: action: '' to: '' id: '' digit_6: action: '' to: '' id: '' digit_7: action: '' to: '' id: '' digit_8: action: '' to: '' id: '' timeout: action: connect to: app id: ACud89Klks digit_9: action: '' to: '' id: '' tts_allowed: 'yes' Voicemail: value: app_id: AB3hdluaaa name: main VM app_type: mailbox shortcode: '*12' sip_address: AB3hdluaaa@sonetel.net voice: en-fe greeting_prompt: 'no' goodbye_prompt: 'no' deliver_to: email deliver_to_details: user@example.com tts_allowed: 'yes' headers: Content-Type: schema: type: string description: application/json;charset=UTF-8 List-prompt: description: '' content: application/json: schema: type: array minItems: 1 uniqueItems: true items: type: object description: Object containing the prompt's details properties: prompt_id: type: string description: The unique Id of the prompt minLength: 1 type: type: string enum: - custom - standard description: standard”. Specifies if the associated voice message is a custom message or a standard message. A custom message is one that has been recorded or uploaded by the customer, while a standard message is a pre-recorded message provided by Sonetel minLength: 1 name: type: string description: A descriptive name of the prompt. minLength: 1 app_id: type: string description: The unique ID of the voice app that the prompt belongs to. minLength: 1 account_id: type: string description: Your Sonetel account ID minLength: 1 record_id: type: string description: 'The ID of the prompt that can be dialed via DTMF digits when updating the voice message from the recording function (*22). Dial *22 from a SIP phone registered with Sonetel and enter the record ID to record over the existing message.' minLength: 1 exists: type: string description: 'A flag that specifies if the associated voice message for this prompt exists. This flag is only relevant in case of custom prompts. For default prompts, the flag is always “yes” since there is always a voice message associated with them.' minLength: 1 file_name: type: string description: The name of the audio file uploaded by the customer. The field is empty if no file has been uploaded. file_details: type: string description: This lists details of the recording file, Empty if it is standard or non-existing. `Recorded by phone` if it is recorded. `uploaded` if it is uploaded, `Text to speech` if it is TTS converted file. play_path: type: string description: This field carries the prompt sip_uri that can be used to call to play the prompt. (play#prompt-id@prompts.sonetel.com) record_path: type: string description: This field carries the prompt sip_url that can be used to record the prompt. (record#prompt-id@prompts.sonetel.com) audio_length: type: string description: The length of the audio in seconds. size: type: string description: The size of the file in kilobytes. message_url: type: string description: The URL of the voice message of the prompt. This is the URL where the voice file for the prompt can be accessed and uploaded. create_date: type: string description: The date and time when the prompt was created. format: date-time x-examples: example-1: - record_id: '1001' account_id: YOUR_ACCOUNT_ID name: Welcome exists: 'yes' prompt_id: PRio9aaaaaaa type: standard app_id: AB0cdefghij - record_id: '1002' account_id: YOUR_ACCOUNT_ID name: Main Menu exists: 'yes' prompt_id: PRio9aaaaaab type: standard app_id: AB0cdefghij - record_id: '1007' account_id: YOUR_ACCOUNT_ID name: Invalid Menu Entry exists: 'yes' prompt_id: PRio9aaaaaac type: standard app_id: AB0cdefghij - record_id: '1008' account_id: YOUR_ACCOUNT_ID name: Please Wait exists: 'yes' prompt_id: PRio9aaaaaad type: standard app_id: AB0cdefghij - record_id: '1030' account_id: YOUR_ACCOUNT_ID name: Information exists: 'yes' prompt_id: PRio9aaaaaae type: custom app_id: AB0cdefghij - record_id: '1003' account_id: YOUR_ACCOUNT_ID name: Office closed exists: 'yes' prompt_id: PRio9aaaaaaf type: standard app_id: AB0cdefghij - record_id: '1004' account_id: YOUR_ACCOUNT_ID name: Info message 1 exists: 'yes' prompt_id: PRio9aaaaaag type: standard app_id: AB0cdefghij - record_id: '1005' account_id: YOUR_ACCOUNT_ID name: Enter Extension exists: 'yes' prompt_id: PRio9aaaaaah type: standard app_id: AB0cdefghij - record_id: '1006' account_id: YOUR_ACCOUNT_ID name: Invalid Extension exists: 'yes' prompt_id: PRio9aaaaaai type: standard app_id: AB0cdefghij examples: Prompt: value: record_id: '1001' account_id: YOUR_ACCOUNT_ID name: Welcome exists: 'yes' prompt_id: PRio9aaaaaaa type: standard app_id: AB0cdefghij Prompt with message details: value: prompt_id: PRia0abcdefGh type: standard name: Welcome app_id: VAfgte45a2Gh account_id: '200000000' record_id: '7001' exists: true file_name: response.wav file_details: Uploaded play_path: play#PRia0abcdefGh@prompts.sonetel.com record_path: record#PRia0abcdefGh@prompts.sonetel.com audio_length: '10.0' size: '157.92' message_url: https://audio-prompts.sonetel.com/PRia0abcdefGh-00000a00-0000-aaaa-0000-aaaa0000b1b1.wav create_date: 20210727T00:00:00Z headers: Content-Type: schema: type: string description: application/json;charset=UTF-8 List-voiceapps: description: Example response content: application/json: schema: type: array minItems: 1 uniqueItems: true items: type: object properties: app_id: type: string description: The Unique ID of the voice app name: type: string description: A descriptive name for the voice app app_type: type: string enum: - ivr - mailbox - sysprompt description: The type of app i.e. IVR, etc. shortcode: type: string description: 'Internal extention number of the voice app. You can dial it from your Sonetel account (SIP call, callback, etc). You can also use it co forward calls from phone numbers to a voice app. i.e. in the incoming call settings of the phone number, set the call to forward to trhe app''s shortcode.' sip_address: type: string description: The SIP address of the voice app voice: type: string description: 'The set of pre-recorded voice prompts for the voice app. It controls the language, accent and gender of the voice that the callers hear. For example, if the `voice` is set to `en-uk-fe`, the user hears an English female voice in a UK accent.' play_welcome: type: string enum: - 'yes' - 'no' description: A flag that indicates if the Welcome message is played or not. get_extension: type: string enum: - 'yes' - 'no' description: 'A flag that indicates if the auto-attendant function is active. When enabled, the caller can enter the internal 3-digit extention number of any user in your Sonetela ccount and be connected to them. You can find the user''s extension number in their call settings.' play_menu: type: string enum: - 'yes' - 'no' description: A flag that indicates if the interactive voice menu function (receive digits from callers to take actions) is active or not. menu: type: object description: The voice response menu that defines the digits and the actions taken on each digit press properties: digit_0: type: object description: Action to be taken when the caller selects option 0 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. digit_1: type: object description: Action to be taken when the caller selects option 1 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. digit_2: type: object description: Action to be taken when the caller selects option 2 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. digit_3: type: object description: Action to be taken when the caller selects option 3 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. digit_4: type: object description: Action to be taken when the caller selects option 4 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. digit_5: type: object description: Action to be taken when the caller selects option 5 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. digit_6: type: object description: Action to be taken when the caller selects option 6 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. digit_7: type: object description: Action to be taken when the caller selects option 7 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. digit_8: type: object description: Action to be taken when the caller selects option 8 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. digit_9: type: object description: Action to be taken when the caller selects option 9 in the IVR. properties: action: type: string enum: - play - connect - call description: 'Action to take when the menu item is selected by the caller. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. timeout: type: object description: Action to be taken when the caller does not select any option. properties: action: type: string enum: - play - connect - call description: 'Action to take when this menu item is activated. An empty value indicates that no action is taken.' to: type: string enum: - user - other - prompt - app id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. tts_allowed: type: string enum: - 'yes' - 'no' description: This is a read-only field which indicates whether TTS functionality is allowed on this voice-app or not. readOnly: true error_voice: type: string description: 'The language, gender and accent of the voice that is heard by the caller for playing error messages on call. The error message can be repeated in 2 different languages. The `error_voice` property controls the voice heard by the the first time while `error_repeat_voice` is the voice in which the error message is repeated. This field applies in case the app_type is “sysprompt”.' error_repeat_voice: type: string description: 'You can repeat the error messages played to callers in a two different languages. The `error_repeat_voice` property controls the language in which the error message is repeated. For example, if you''d like to play the error messages in English first and then Swedish, then set `error_voice` to `en` and `error_repeat_voice` to `swe`. This field applies in case the app_type is “sysprompt”.' greeting_prompt: type: string enum: - 'yes' - 'no' description: 'A flag that indicates if a greeting message is played when a caller reaches the voicemail. This field applies in case the app_type is `mailbox`.' goodbye_prompt: type: string enum: - 'yes' - 'no' description: A flag that indicates if a goodbye message is played when a caller has left a voicemail message. This field applies in case the app_type is `mailbox` deliver_to: type: string enum: - user - email description: 'Voicemails are delivered as email attachments. This field can specify either a user or an email address to which the voicemail are delivered. This field applies in case the app_type is “mailbox”' deliver_to_details: type: string description: 'If `deliver_to` is a user, this field takes the `user_id` of the user. The email is delivered to the email address of the user configured in the Sonetel account. If `deliver_to` is an email, this field takes the email address to which the voicemail is delivered.' x-examples: example-1: - app_id: VAdhy6q1oioi name: Main menu app_type: ivr shortcode: '*21' sip_address: VAdhy6q1oioi@sonetel.net voice: en play_welcome: 'yes' get_extension: 'no' play_menu: 'yes' menu: digit_0: action: '' to: '' id: '' digit_1: action: call to: user id: '2015573690' digit_2: action: play to: prompt id: PRiodhy6q1oiod digit_3: action: call to: user id: '2015573690' digit_4: action: '' to: '' id: '' digit_5: action: '' to: '' id: '' digit_6: action: '' to: '' id: '' digit_7: action: '' to: '' id: '' digit_8: action: '' to: '' id: '' timeout: action: call to: user id: '2015573690' digit_9: action: '' to: '' id: '' tts_allowed: 'yes' - app_id: VAdhy6q1oioz name: Sai test menu app_type: ivr shortcode: '*21*2' sip_address: VAdhy6q1oioz@sonetel.net voice: en play_welcome: 'yes' get_extension: 'no' play_menu: 'yes' menu: digit_0: action: '' to: '' id: '' digit_1: action: '' to: '' id: '' digit_2: action: '' to: '' id: '' digit_3: action: '' to: '' id: '' digit_4: action: '' to: '' id: '' digit_5: action: '' to: '' id: '' digit_6: action: '' to: '' id: '' digit_7: action: '' to: '' id: '' digit_8: action: '' to: '' id: '' timeout: action: '' to: '' id: '' digit_9: action: '' to: '' id: '' tts_allowed: 'yes' - app_id: VAdhy6q1ozvoi name: System Prompt app_type: sysprompts error_voice: en error_repeat_voice: en-fe usermailbox_voice: en tts_allowed: 'yes' - app_id: VAdhy6q1o9oi name: Voice Mail app_type: mailbox shortcode: '*12' sip_address: VAdhy6q1o9oi@sonetel.net voice: en greeting_prompt: 'yes' goodbye_prompt: 'yes' deliver_to: user deliver_to_details: '2015573690' tts_allowed: 'yes' examples: Example: value: resource: voiceapp response: - app_id: ABc8sjNMs name: Main menu Test app_type: ivr shortcode: '*21' sip_address: ABc8sjNMs@sonetel.net voice: hin-fe play_welcome: 'yes' get_extension: 'no' play_menu: 'yes' menu: digit_0: action: '' to: '' id: '' digit_1: action: call to: user id: '2000000000' digit_2: action: play to: prompt id: PRiw9azqjoioa digit_3: action: call to: phnum id: '+46800000000' digit_4: action: '' to: '' id: '' digit_5: action: '' to: '' id: '' digit_6: action: '' to: '' id: '' digit_7: action: '' to: '' id: '' digit_8: action: '' to: '' id: '' timeout: action: connect to: app id: ABc8sjNMs digit_9: action: '' to: '' id: '' tts_allowed: 'yes' - app_id: VA9dcbao9oi name: Sales Team Voicemail app_type: mailbox shortcode: '*12' sip_address: VA9dcbao9oi@sonetel.net voice: en-fe greeting_prompt: 'no' goodbye_prompt: 'no' deliver_to: email deliver_to_details: sales@example.com tts_allowed: 'yes' - app_id: A9azaxo9o9 name: Support Mailbox app_type: mailbox shortcode: '*12*3' sip_address: A9azaxo9o9@sonetel.net voice: en-fe greeting_prompt: 'no' goodbye_prompt: 'no' deliver_to: user deliver_to_details: '2000000000' tts_allowed: 'yes' - app_id: VA9acdfreoi name: System Prompt app_type: sysprompts error_voice: en error_repeat_voice: en-fe usermailbox_voice: en tts_allowed: 'yes' status: success headers: Content-Type: schema: type: string description: application/json;charset=UTF-8 DataMgrCallRecSettings: description: Example response content: application/json: schema: $ref: '#/components/schemas/AccountDataMgrCallRecSettings' schemas: Create-Prompt: type: object title: Create-Prompt properties: name: type: string description: A descriptive name of the prompt defined by the customer. required: - name Voiceapp: type: object properties: app_type: type: string enum: - ivr - mailbox - sysprompt description: The type of voice app being created. play_menu: type: string description: A flag that indicates if the interactive voice menu function(receive digits from callers to take actions) is active or not. name: type: string description: The name of the voice app voice: type: string enum: - en - swe - spa - hin-fe - tam-fe - tel-fe - en-fe - gr-fe - en-uk-fe - fr-fe - ara-fe description: The set of pre-recorded voice prompts for the voice app play_welcome: type: string enum: - 'yes' - 'no' description: A flag that indicates if the welcome message is played or not. get_extension: type: string enum: - 'yes' - 'no' description: A flag that indicates if the auto-attendant function is active. final_action: type: object description: 'The final action that is taken in case the menu (represented by `play_menu`) is not active. This property can only be set if `play_menu` is set to `no`.' properties: action: type: string enum: - play - connect - call description: The final action to take once the caller has heard the welcome message. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. menu: type: object description: The voice response menu that defines the digits and the actions taken on each digit press properties: digit_0: type: object description: Action to be taken when the caller selects option 0 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action digit_1: type: object description: Action to be taken when the caller selects option 1 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action digit_2: type: object description: Action to be taken when the caller selects option 2 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action digit_3: type: object description: Action to be taken when the caller selects option 3 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action digit_4: type: object description: Action to be taken when the caller selects option 4 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action digit_5: type: object description: Action to be taken when the caller selects option 5 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action digit_6: type: object description: Action to be taken when the caller selects option 6 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action digit_7: type: object description: Action to be taken when the caller selects option 7 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action digit_8: type: object description: Action to be taken when the caller selects option 8 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action digit_9: type: object description: Action to be taken when the caller selects option 9 in the IVR. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action timeout: type: object description: Action to be taken when the caller has not selected any option. properties: action: type: string enum: - play - connect - call description: Action to take when the menu item is selected by the caller. to: type: string enum: - user - other - prompt - app description: The destination type where the call should be connected. For example, user. id: type: string description: A unique ID to identify the destination. For example, if the `to` field is user then `id` will be the user's unique ID. required: - action error_voice: type: string description: The voice that applies for playing system messages. This field applies in case the app_type is `sysprompt`. greeting_prompt: type: string enum: - 'yes' - 'no' description: A flag that indicates if a greeting message is played when a caller reaches the voicemail. This field applies in case the app_type is `mailbox` goodbye_prompt: type: string enum: - 'yes' - 'no' description: A flag that indicates if a goodbye message is played when a caller has left a voicemail message. This field applies in case the app_type is `mailbox`. deliver_to: type: string enum: - user - email description: 'Voicemails are delivered as email attachments. This field can specify either a user or an email address to which the voicemail are delivered. This can take values `user` or `email`. This field applies in case the app_type is `mailbox`.' deliver_to_details: type: string description: 'If `deliver_to` is a user, this field takes the user_id of the user. The email is delivered to the email address of the user configured in the Sonetel account. If `deliver_to` is an email, this field takes the email address to which the voicemail is delivered.' required: - app_type - name examples: - app_type: ivr play_menu: 'yes' name: company main menu voice: en play_welcome: 'yes' get_extension: 'yes' menu: digit_0: action: connect to: app id: cD012dhgaut digit_1: action: call to: user id: '2000000000' digit_2: action: call to: other id: '+12025550000' digit_3: action: play to: prompt id: abcD3456 digit_4: action: '' to: '' id: '' digit_5: action: '' to: '' id: '' digit_6: action: '' to: '' id: '' digit_7: action: '' to: '' id: '' digit_8: action: '' to: '' id: '' digit_9: action: '' to: '' id: '' timeout: action: call to: other id: '+12025550000' - name: Main VoiceMail app_type: mailbox voice: en-fe greeting_prompt: 'yes' goodbye_prompt: 'yes' deliver_to: email deliver_to_details: user@example.com x-examples: example-1: app_type: ivr play_menu: 'yes' name: Sai test menu User-Update: type: object properties: user_fname: type: string description: User's first name minLength: 1 max_conversations: type: number description: The maximum number of customer conversations the user can handle simultaneously phones: type: array description: List of the phones (SIP phones or verified mobile numbers) linked to the user's profile that can used for call forwarding. minItems: 1 uniqueItems: true items: type: object properties: phnum: type: string description: The actual phone number that is used to forward incoming calls. Applied to non-SIP phones. minLength: 1 phone_type: type: string enum: - sip - regular description: 'The type of phone i.e. sip or regular ' minLength: 1 phone_name: type: string description: User's chosen name for the phone number minLength: 1 receive_calls: type: string description: Flag that indicates if incoming calls to the user should be sent to this phone. In case of SIP phones, this field is not applicable. minLength: 1 verified: type: string description: Read only field Flag that indicates if the phone is verified or not minLength: 1 readOnly: true language: type: string description: Three letter ISO code of the user's account language. minLength: 1 language_id: type: number description: An internal numeric code of the user's account language. title: type: string description: The user's job title for example, Sales Engineer, CEO, etc. minLength: 1 type: type: string enum: - admin - regular description: Privilege level of user i.e. admin or regular. minLength: 1 user_lname: type: string description: The last name of the user. minLength: 1 location: type: object description: User's location details such as country, area code and timezone. properties: country: type: string description: The user's country. Has an affect on how the user dials phone numbers. minLength: 1 area_code: type: string description: The user's telephone area code. minLength: 1 timezone: type: string description: The user's timezone. timezone_id: type: number description: An internal numeric identifier for the user's timezone. email: type: string description: The user's email address. format: email minLength: 1 password: type: string description: The user's login password. format: password required: - user_fname - user_lname - email - password x-examples: Example: user_fname: John max_conversations: 2 numbers: - number_type: e.164 number: '13475550000' - number_type: e.164 number: '46852500000' phones: - phnum: '+46708000000' phone_type: regular phone_name: Mobile receive_calls: 'yes' verified: 'yes' is_primary: true language: eng auto_translate: false language_id: 41 title: CEO and Founder type: admin user_lname: Doe tags: phonenumber location: country: SWE area_code: '8' timezone: null timezone_id: 4 email: user@example.com notifications: 0 User-GET: type: object description: User Schema properties: resource: type: string description: Name of the resource accessed status: type: string description: Status of the response i.e. success or failed minLength: 1 response: type: object properties: user_fname: type: string description: The user's first name minLength: 1 max_conversations: type: number description: The maximum number of customer conversations the user can handle simultaneously numbers: type: array description: The "numbers" represents Sonetel numbers assigned to the user including the user's extension. minItems: 1 uniqueItems: true items: type: object properties: number_id: type: string description: Unique Id of the number minLength: 1 number_type: type: string description: 'This can take the following values - "internal": The user''s extension - "phnum": Local number anywhere worldwide from Sonetel connected to the user' minLength: 1 number: type: string description: The E164 phone number. In the case of extension, it is the short number assigned to the user (usually between 3 to 5 digits). minLength: 1 required: - number_id - number_type - number phones: type: array description: List of the phones (SIP phones or verified mobile numbers) linked to the user's profile that can used for answering calls. minItems: 1 uniqueItems: true items: type: object properties: phone_id: type: string description: Unique ID of the phone. minLength: 1 phnum: type: string description: The actual phone number that is used to forward incoming calls. Applied to non-SIP phones. minLength: 1 phone_type: type: string description: The type of phone i.e. sip or regular minLength: 1 phone_name: type: string description: User's chosen name for the phone number minLength: 1 receive_calls: type: string description: Flag that indicates if incoming calls to the user should be sent to this phone. In case of SIP phones, this field is not applicable. minLength: 1 verified: type: string description: Read only field Flag that indicates if the phone is verified or not minLength: 1 readOnly: true is_primary: type: boolean description: Flag that indicates if this number must be used as the default for callback/callthru calls. This field is only applicable for verified mobile numbers. Only verified mobile numbers can be set as primary. sip_details: type: object description: Details of the SIP phones, if connected. properties: registered: type: string description: Flag indicating if the SIP phone is registered registered_since: type: string description: The date/time since when the SIP phone is registered to Sonetel. auto_provision: type: string description: 'Flag that indicates if the SIP phone is automatically provisioned. Sonetel ready phones can be automatically provisioned. In the current version of the API, a phone cannot be added to Sonetel for automatic provisioning.' address: type: string description: The SIP address of the phone. This address is automatically specified by the phone to Sonetel using SIP when it registers to Sonetel. useragent: type: string description: The SIP device information published by the SIP phone while registering to Sonetel. mac: type: string description: The MAC address of the SIP phone. required: - phone_id - phnum - phone_type - phone_name - receive_calls - verified - is_primary language: type: string description: Three letter ISO code of the user's account language. minLength: 1 auto_translate: type: boolean description: Flag to indicate whether automatic translation is turned on for the user. Reserved for future use. language_id: type: number description: An internal numeric code of the user's account language. title: type: string description: The user's job title for example, Sales Engineer, CEO, etc. type: type: string description: Privilege level of user i.e. admin or regular. minLength: 1 user_lname: type: string description: The last name of the user. minLength: 1 password_status: type: string enum: - ok - '1' - '2' - locked description: 'A user''s access via password may be blocked if there are many attempts to use an incorrect password, either while signing in to the web portal or while connecting a SIP phone. This field indicates the current status of the password. It can take the following values. - "ok": Indicates that access via password is OK. - "1" or "2": There has been one(1) or two(2) attempts to connect with an incorrect password. - "locked": The password is locked out and must be reset.' minLength: 1 readOnly: true account_id: type: string description: The Sonetel account ID of the account the user is a part of. minLength: 1 readOnly: true user_jid: type: string description: The User's Jabber Id. minLength: 1 sonetel-id: type: string description: User's unique id in Sonetel. This will be currently @sonetel.com minLength: 1 user_id: type: string description: Unique Id of the Sonetel user. minLength: 1 company_name: type: string description: The name of the company the user is part of. minLength: 1 location: type: object description: User''s location details such as country, area code and timezone. properties: country: type: string description: The user's country. Has an affect on how the user dials phone numbers minLength: 1 area_code: type: string description: The user's telephone area code. minLength: 1 timezone: type: string description: The user's timezone. timezone_id: type: number description: An internal numeric identifier for the user's timezone. required: - country - area_code created_date: type: string description: The date and time the user was created. minLength: 1 email: type: string description: The user's email address. minLength: 1 notifications: type: number description: The number of unread in-app notifications. password: type: string description: The user's login password. format: password required: - user_fname - max_conversations - language - auto_translate - language_id - type - user_lname - password_status - account_id - user_jid - sonetel-id - user_id - company_name - created_date - email - notifications - password required: - status - response examples: - resource: null status: success response: - user_fname: John max_conversations: 3 language: eng auto_translate: false language_id: 41 title: Sales Manager type: regular user_lname: Doe tags: conversations password_status: OK account_id: '0000000' user_jid: 1a1a1a1a-a2a2-4343-a0a0-d0d0d0d0d0d0@eu01.sonetel.com sonetel-id: 1a1a1a1a-a2a2-4343-a0a0-d0d0d0d0d0d0@sonetel.com user_id: '2016383950' company_name: Acme Inc created_date: 20210716T00:00:00Z email: john.doe@example.com notifications: 0 x-examples: example-1: resource: null status: success response: user_fname: John max_conversations: 2 numbers: - number_id: '61709' number_type: e.164 number: '13470000000' - number_id: '61710' number_type: e.164 number: '46852000000' - number_id: '64618' number_type: internal number: '150' - number_id: '137074' number_type: e.164 number: '81300000000' - number_id: '149273' number_type: inum number: '880000000000001' phones: - phone_id: '2001962457' phnum: '+16705550000' phone_type: regular phone_name: Mobile receive_calls: 'yes' verified: 'yes' is_primary: true sip_details: null language: eng auto_translate: false language_id: 41 title: CEO and Founder type: admin user_lname: Smith tags: phonenumber password_status: OK account_id: '20000000' user_jid: 2000000000@eu01.sonetel.com sonetel-id: 2000000000@sonetel.com user_id: '2000000000' company_name: Sonetel location: country: SWE area_code: '8' timezone: null timezone_id: 4 created_date: 20121105T00:00:00Z email: user@example.com notifications: 0 User-Call-Settings: type: object description: The object that defines the user's call settings properties: incoming: type: object description: A collection of properties that define how incoming calls to the user should be handled. properties: second_action: type: object description: The action to take if the call is not handled by the destination defined in the `first_action`. properties: action: type: string description: The action to take when an incoming call reaches the user. minLength: 1 to: type: string enum: - myphones - sipphones - phone - voicemail - phnum - sip - voiceapp description: The type of function on which the action is to be taken. minLength: 3 required: - action - to first_action: type: object description: Defines how an incoming call to the user should be handled. properties: show: type: string description: The caller ID shown when you receive an incoming call. minLength: 1 action: type: string description: The action to take when an incoming call reaches the user. minLength: 1 ring_time: type: string description: The number of seconds that the incoming call should ring. Only applies when the action is `ring` or `forward`. minLength: 1 to: type: string enum: - myphones - sipphones - phone - voicemail - user - phnum - voiceapp - sip description: The type of function on which the action is to be taken. minLength: 3 id: type: string description: The unique id of the destination to which the incoming call should be sent. minLength: 1 required: - show - action - ring_time - to - id standard_action: type: object description: Specifies how WebRTC calls (i.e. calls made using our apps) are handled. properties: action: type: string description: The action to take. minLength: 1 ring_time: type: string description: The number of seconds the call should ring before disconnecting. minLength: 1 to: type: string description: The destination where the call should connect. minLength: 1 required: - action - ring_time - to outgoing: type: object description: A collection of properties that control how outgoing calls are handled. At the moment it is only possible to select the caller ID shown to the person you call. properties: show: type: string description: The caller-id shown when a user makes an outgoing call. Accepts `auto`, `none` or an eligible Sonetel number. minLength: 1 callthru-pin: type: string description: Deprecated property used for our old manual Call Thru service. x-deprecated: true required: - show examples: - incoming: second_action: action: forward to: voicemail first_action: show: caller action: ring ring_time: '25' to: sipphones outgoing: show: auto x-examples: example-1: incoming: second_action: action: forward to: voicemail first_action: show: caller action: forward ring_time: '20' to: phnum id: '+12025550000' standard_action: action: ring ring_time: '10' to: internet_internet outgoing: show: auto callthru-pin: '' Account-GET: type: object title: Account-GET description: Your Sonetel account settings properties: resource: type: string description: Name of the resource accessed status: type: string enum: - success - failed description: The status of the request response: type: object properties: account_id: type: string description: The unique account Id of the company account in Sonetel readOnly: true area_code: type: string description: The telephone area code where the company is located. name: type: string description: The name of the company status: type: string enum: - active - inactive - evaluation - disabled description: The status of the account – “active”, “inactive”, “evaluation” or “disabled” readOnly: true status_desc: type: string description: An additional description of the status of the account. For e.g. this could carry a text describing why the account was disabled readOnly: true currency: type: string enum: - usd - eur - sek description: Currency for the account. The currency, once set, cannot be changed. All billing related transactions for the account are done in this currency. readOnly: true address: type: string description: Company address, line 1. address2: type: string description: Company address, line 2. city: type: string description: Company address, city name. zipcode: type: string description: Company address, postal code. country: type: string description: The country where the company is located. credit_balance: type: string description: The prepaid balance in the account's currency. Specified upto 2 decimal places. readOnly: true timezone: type: string description: Timezone name abbreviation in IANA format language: type: string description: The account's defaut language in ISO language format. priceplan: type: string enum: - premium - business - regular description: Returns the paid plan that applies to this account. Accounts with Premium or Busines plan enabled, have this value set as "premium" or "business". For other accounts, this value is “regular". plan_details: type: string description: JSON block that is added to provide additional information about the current plan subscribed website: type: object description: The URL of the website(s) where the chat widget associated with the customer's account has been detected. properties: website_status: type: string description: Status of the chat widget verification. daily_usage_limit: type: string description: 'The maximum amount of usage allowed in the account in a 24 hour period. This value is in USD and is converted to the account''s currency for calculation. Does not include subscription renewals. To increase this contact suppor' readOnly: true vat_relevant: type: boolean description: Boolean indicating if the concept of VAT is applicable for this account. If the account country is from the European countries then this field is "TRUE". user_count: type: number description: The number of users in the account. language_id: type: number description: 3 character ISO code for language timezone_details: type: object description: Details about the account timezone. properties: zone_name: type: string description: List of major cities to identify the timezone zone_id: type: number description: Internal ID of the timezone account_verified: type: boolean description: Boolean flag to indicate whether the account has been verified by Sonetel or not. current_country: type: string description: The current country set for the account. Affects how phone numbers are dialed in the local format. phnum_count: type: number description: The amount of phone number subscriptions linked to the account. readOnly: true companyNameUpdated: type: boolean description: Boolean flag to indicate whether the company's name has been updated after signup. account_type: type: string enum: - main_account - sub_account description: The type of account. This is set to `main_account` for most users. readOnly: true account_category: type: string enum: - regular - reseller - affiliate description: This is read only field that returns the category of the account. readOnly: true service_settings: $ref: '#/components/schemas/ServiceSettings' examples: - resource: account status: success response: account_id: '20000000' area_code: '' name: Acme Inc status: active status_desc: '' currency: USD address: '' address2: '' city: '' zipcode: '' country: ARE credit_balance: '492.74' timezone: GMT -05:00 language: eng priceplan: regular plan_details: '' website: website_status: unverified daily_usage_limit: '25' vat_relevant: false user_count: 4 language_id: 129 timezone_details: zone_name: (GMT -4:00) Eastern Time (US and Canada), New York, Detroit zone_id: 38 account_verified: false current_country: AFG phnum_count: 4 companyNameUpdated: false account_type: main_account account_category: regular x-examples: example-1: resource: account response: account_id: '2000000007' area_code: '8' name: Sonetel status: active status_desc: '' currency: SEK address: Mailbox 647 address2: test111 city: Stockholm zipcode: '6464' country: SWE credit_balance: '6897.57' timezone: GMT +05:30 language: eng priceplan: regular plan_details: '' website: website_status: verified daily_usage_limit: '3321.31' vat_relevant: true user_count: 56 language_id: 41 timezone_details: zone_name: (GMT +5:30) New Delhi, Kolkata, Mumbai, Chennai zone_id: 12 account_verified: false current_country: SWE phnum_count: 126 companyNameUpdated: false account_type: main_account account_category: regular status: success Account-PUT: type: object title: Account-PUT description: Update your account settings properties: name: type: string description: The new name of your company. language: type: string description: 'The 3 letter ISO language code such as `deu` for German or `swa` for Swahili. Get a list of all the language codes from https://beta-api.sonetel.com/globaldata/language' timezone_details: type: object description: The object containing the updated timezone. properties: zone_id: type: string description: Two digit timezone identifier. required: - zone_id service_settings: $ref: '#/components/schemas/ServiceSettings-PUT' description: Specify values that are changed. Values that are not provided remain un-altered examples: - name: Acme Inc. language: hye timezone_details: zone_id: '45' AccountDataMgrCallRecSettings: type: object title: AccountDataMgrCallRecSettings properties: auto_delete: type: string enum: - none - all - voice-files description: Specifies if `all` data or just `voice-files` must be automatically deleted auto_delete_time: type: string enum: - immediate - 1m - 3m - 1y description: '`immediate`: Delete immediately after the service data is generated `1m`: Delete 1 months after the service data is generated `3m`: Delete 3 months after the service data is generated `1y`: Delete 1 year after the service data is generated' ServiceSettings: type: object title: ServiceSettings description: An account's service settings properties: team_chat: type: boolean description: Specifies if the account has team chat service available and turned on default: false customer_chat: type: boolean description: Specifies if the account has customer chat service available and and turned on default: false ai_helper: type: boolean description: Specifies if the account has AI Helper services available and and turned on default: false free_trial: type: string enum: - inactive - active - used description: 'Specifies the status of free trial of services. Free trial applies to services such as Team chat and Customer chat which are available for free trial for a limited duration `active`: Free trial is currently active `inactive`: Free trial has never been used and is inactive currently `used`: Free trial has been consumed and has expired' readOnly: true ServiceSettings-PUT: type: object title: ServiceSettings-PUT description: Service settings of an account that can be updated properties: team_chat: type: boolean description: Specify if team chat service must be turned on (true) for the account default: false customer_chat: type: boolean description: Specify if customer chat service must be turned on (true) for the account default: false ai_helper: type: boolean description: Specify if AI helper service must be turned on (true) for the account default: false List-PhnumSubscriptions: type: object title: List my phone number subscriptions description: This is a list of subscriptions under an account properties: page_metadata: type: object description: Pagination information in case the results span across more than 1 page. properties: pagination_type: type: string description: Describes the pagination type minLength: 1 count: type: string description: Number of objects in the response minLength: 1 page_count: type: string description: The total number of pages in the result minLength: 1 previous: type: string description: Link to the previous result page. minLength: 1 next: type: string description: Link to the next result page. minLength: 1 page: type: string description: Link to the current page. minLength: 1 first: type: string description: Link to the first page in the results. minLength: 1 last: type: string description: Link to the last page in the results. minLength: 1 sort: type: object description: Sort order of the results properties: property: type: string minLength: 1 ignoreCase: type: boolean nullHandling: type: string minLength: 1 descending: type: boolean ascending: type: boolean resource: type: string description: Name of the resource accessed minLength: 1 status: type: string description: Status of the response minLength: 1 response: type: array description: The response object. minItems: 1 uniqueItems: true items: type: object properties: account_id: type: string description: The account_id is the account to which the number is currently assigned. minLength: 1 country_code: type: string description: The telephony country code as per ITU standards. minLength: 1 area_code: type: string description: The telephone area code of the phone number minLength: 1 country: type: string description: The country where the number is from. minLength: 1 is_part_of_series: type: string description: A Boolean that specifies if the number is a part of a number series minLength: 1 range: type: string description: Applicable if the phone number subscription is of a number that is a part of a phone number series. The value specifies the quantity of phone numbers in the number series of which this phone number is a part of minLength: 1 city: type: string description: Name of the city where the number is. The name is descriptive and does not follow any standard. minLength: 1 type: type: string enum: - national - geographic - tollfree - mobile description: Type of number – This can be either “national”, “geographic”, or “tollfree” minLength: 1 readOnly: true one_time_fee: type: string description: One-time fee for the number/series. Up to 2 decimals. minLength: 1 recurring_fee: type: string description: Current recurring fee for the number/series. Up to 2 decimals minLength: 1 recurrence_interval: type: string description: Current recurrence interval for the recurring fee. Specified in days(e.g. 15d) or months(e.g. 3m). minLength: 1 per_call_fee: type: string description: The per call fee applicable to the number. Up to 2 decimals format: float readOnly: true per_min_fee: type: string description: The charge per minute fee for calls. Up to 2 decimals minLength: 1 charge_interval: type: string description: The charge interval in seconds minLength: 1 per_sms_fee: type: string description: The per SMS receiving fee applicable. Up to 2 decimals minLength: 1 per_fax_fee: type: string description: The per FAX receiving fee applicable. Up to 2 decimals currency: type: string description: The currency in which the fee is specified minLength: 1 price_category: type: string description: The price category of the number/series. The allowed values are 1- regular, 2- gold, 3 - gold+, 4 - gold++, 5 -gold+++ minLength: 1 connect_to_type: type: string enum: - user - phnum - sip - app - csg description: The destination to which this number is connected. The supported values are user, phnum, sip,app, csg minLength: 1 connect_to: type: string description: The id of the connected to entity minLength: 1 activation_date: type: string description: The date/time the number/series was activated. minLength: 1 next_fee_date: type: string description: The date/time that the next recurring fee is to be charged minLength: 1 reclaim_date: type: string description: The date/time an inactive number will be automatically removed from your account if it is inactive due to insufficient balance in the account. minLength: 1 status: type: string description: The number/series status. Can take values “active” or “inactive” minLength: 1 status_desc: type: string description: The text reason specification. Applies in case the number is inactive. freetest: type: string description: Booleanthat specifies if this subscription is currently under free testing. Takes Boolean values. minLength: 1 branded: type: boolean description: Flag that specifies whether the number is a branded number i.e. free with the website chat widget. freeplan: type: boolean description: Flag that specifies whether the number is included for free with [paid plans](https://sonetel.com/plans). sms_enabled: type: string description: Numbers that have SMS enabled. minLength: 1 sms_supported: type: string description: Numbers that support SMS. minLength: 1 phnum: type: string description: The number in E164 format without ‘+’ minLength: 1 free_test_expiry_date: type: string description: The date/time when the free testing period ends. sms_settings: type: object description: SMS delivery settings for the number. properties: delivery_methods: type: array minItems: 1 uniqueItems: true items: type: object properties: dest_type: type: string minLength: 1 required: - dest_type plan_details: type: object description: The plan details of the number. Only the `next_renew_mode` can be updated properties: current_renew_mode: type: string enum: - 1m - 1y - 3y description: This is a readonly property that holds values of 1m,1y,3y. 1m stands for one month, 1y stands for one year and 3y stands for 3 years renewal period minLength: 1 readOnly: true next_renew_mode: type: string enum: - 1m - 1y - 3y description: When the number renews on `next_fee_date` how long should it renew for. minLength: 1 activation_date: type: string description: The date of creation of the phone number subscription. format: date-time minLength: 1 readOnly: true next_fee_date: type: string description: The date on which the next renewal fee is due. minLength: 1 deactivate_date: type: string description: The date on which the number will be deactivated if your account does not have enough credit to apply the `next_recurring_fee`. This date includes a grace period. format: date-time minLength: 1 readOnly: true next_recurring_fee: type: string description: The cost of the next renewal. (upto 2 decimals) minLength: 1 readOnly: true show: type: string enum: - caller - called description: 'This field lists what to show in the CLI if the phone number is not connected to a user. Valid values are "caller", "called". ' minLength: 1 rule_set_id: type: string description: The Id of the rule set if exceptions are defined for call processing. This field is empty if no exceptions are defined. state: type: string description: If the phone number is from USA, then this will hold the name of the state minLength: 1 readOnly: true addr_req: type: string description: Flag indicating whether there are any address requirements for this number. Can take values 'yes', 'no' minLength: 1 readOnly: true addr_proof: type: string description: Flag indicating whether submission of address proof is required for this number. Can take values 'yes', 'no' minLength: 1 readOnly: true access_restrictions: type: string description: Indicates if there are any access restriction from any provider on this number. minLength: 1 readOnly: true restrictions_desc: type: string description: Any additional restrictions applicable on this number. minLength: 1 cli_support: type: string enum: - 'yes' - 'no' - add_on description: 'Indicates whethe the phone number can be shown as caller ID (CLI) in calls. - no → can never be used for CLI - yes → number can be used for CLI - add_on → can be used as CLI with a package' minLength: 1 readOnly: true business_pkg_support: type: string enum: - 'yes' - 'no' description: 'Indicates whether business package is supported on this number. ' minLength: 1 readOnly: true x-deprecated: true package: type: string enum: - regular - standard - business description: Describes the current package on this number. Available values "regular", "standard", "business" minLength: 1 call_recording_allowed: type: string enum: - 'yes' - 'no' - add_on description: This property indicates whether call recording can be enabled on this number. Available values "yes", "no" "add-on". minLength: 1 voiceapp_connect: type: string enum: - 'yes' - 'no' description: Indicates whether this number can be allowed to connect to a voice app minLength: 1 csg_connect: type: string enum: - 'yes' - 'no' description: Indicates whether this number can be allowed to connect to a team. minLength: 1 x-examples: example-1: page_metadata: pagination_type: static count: '126' page_count: '1' previous: NA next: NA page: '1' first: NA last: NA sort: property: activation_date ignoreCase: false nullHandling: client descending: true ascending: false resource: phonenumbersubscription response: - account_id: '20000000' country_code: '46' area_code: '8' country: SWE is_part_of_series: 'no' range: '1' city: Stockholm (8) type: geographic one_time_fee: '0.0' recurring_fee: '52.0' recurrence_interval: 1m per_call_fee: '0.00' per_min_fee: '0.00' charge_interval: '60' per_sms_fee: '' per_fax_fee: '' currency: SEK price_category: regular connect_to_type: user connect_to: '2000000000' activation_date: 20200217T09:36:10Z next_fee_date: 20210717T09:36:10Z reclaim_date: 20210816T09:36:10Z status: active status_desc: '' freetest: 'no' branded: 'no' freeplan: 'no' fax_enabled: 'no' sms_enabled: 'yes' fax_supported: 'no' sms_supported: 'yes' phnum: '46840000000' free_test_expiry_date: '' sms_settings: delivery_methods: - dest_type: auto plan_details: current_renew_mode: 1m next_renew_mode: 1m activation_date: 20200217T09:36:10Z next_fee_date: 20210717T09:36:10Z deactivate_date: 20210816T09:36:10Z next_recurring_fee: '52.00' show: caller rule_set_id: '' addr_req: none addr_proof: 'no' access_restrictions: mobile restrictions_desc: If you are on Premium, City and Mobile numbers can be subscribed for free.
If you want a free number, select a City number and use our free chat function at your website. cli_support: 'yes' business_pkg_support: 'no' package: regular call_recording_allowed: 'yes' voiceapp_connect: 'yes' csg_connect: 'yes' - account_id: '20000000' country_code: '1' area_code: '917' country: USA is_part_of_series: 'no' range: '1' city: New York (917) type: geographic one_time_fee: '0.0' recurring_fee: '33.0' recurrence_interval: 1m per_call_fee: '0.00' per_min_fee: '0.00' charge_interval: '60' per_sms_fee: '0.0' per_fax_fee: '' currency: SEK price_category: regular connect_to_type: user connect_to: '2000000000' activation_date: 20190712T05:13:23Z next_fee_date: 20221212T05:13:23Z reclaim_date: 20230111T05:13:23Z status: active status_desc: '' freetest: 'no' branded: 'no' freeplan: 'no' fax_enabled: 'no' sms_enabled: 'yes' fax_supported: 'no' sms_supported: 'no' phnum: '19175550000' free_test_expiry_date: '' sms_settings: delivery_methods: - dest_type: auto plan_details: current_renew_mode: 3y next_renew_mode: 3y activation_date: 20190712T05:13:23Z next_fee_date: 20221212T05:13:23Z deactivate_date: 20230111T05:13:23Z next_recurring_fee: '736.00' show: caller state: New York addr_req: none addr_proof: 'no' access_restrictions: international restrictions_desc: If you are on Premium, all types of numbers can be subscribed for free.
If you want a free number, select a City number and use our free chat function at your website. cli_support: 'yes' business_pkg_support: 'no' package: regular call_recording_allowed: 'yes' voiceapp_connect: 'yes' csg_connect: 'yes' - account_id: '20000000' country_code: '61' area_code: '29' country: AUS is_part_of_series: 'no' range: '1' city: Sydney (29) type: geographic one_time_fee: '0.0' recurring_fee: '82.0' recurrence_interval: 1m per_call_fee: '0.00' per_min_fee: '0.00' charge_interval: '60' per_sms_fee: '' per_fax_fee: '' currency: SEK price_category: regular connect_to_type: app connect_to: app_type: ivr app_id: VAi6345m4cccc activation_date: 20190529T09:26:24Z next_fee_date: 20221129T09:26:24Z reclaim_date: 20221229T09:26:24Z status: active status_desc: '' freetest: 'no' branded: 'no' freeplan: 'no' fax_enabled: 'no' sms_enabled: 'no' fax_supported: 'no' sms_supported: 'yes' phnum: '61200000000' free_test_expiry_date: '' plan_details: current_renew_mode: 3y next_renew_mode: 3y activation_date: 20190529T09:26:24Z next_fee_date: 20221129T09:26:24Z deactivate_date: 20221229T09:26:24Z next_recurring_fee: '1711.00' show: caller rule_set_id: 5dbc0ec1de11ca111aed3039 addr_req: global addr_proof: 'yes' access_restrictions: international restrictions_desc: Anyone can buy a number in Australia.
Mobile numbers require that you provide your address (anywhere in the world) and other supporting documents.
If you are on Premium, you can select City and Mobile numbers for free.
Free-for-website numbers are not available in Australia. cli_support: 'yes' business_pkg_support: 'no' package: regular call_recording_allowed: 'yes' voiceapp_connect: 'yes' csg_connect: 'yes' - account_id: '20000000' country_code: '46' area_code: '8' country: SWE is_part_of_series: 'no' range: '1' city: Stockholm (8) type: geographic one_time_fee: '0.0' recurring_fee: '65.0' recurrence_interval: 1m per_call_fee: '0.00' per_min_fee: '0.00' charge_interval: '60' per_sms_fee: '' per_fax_fee: '' currency: SEK price_category: regular connect_to_type: app connect_to: app_type: ivr app_id: VAi6345m1aaaaa activation_date: 20100211T21:09:38Z next_fee_date: 20270122T11:35:41Z reclaim_date: 20270221T11:35:41Z status: active status_desc: '' freetest: 'no' branded: 'no' freeplan: 'no' fax_enabled: 'no' sms_enabled: 'yes' fax_supported: 'no' sms_supported: 'yes' phnum: '46800000000' free_test_expiry_date: '' sms_settings: delivery_methods: - dest_type: auto plan_details: current_renew_mode: 1m next_renew_mode: 1m activation_date: 20100211T21:09:38Z next_fee_date: 20270122T11:35:41Z deactivate_date: 20270221T11:35:41Z next_recurring_fee: '65.00' show: caller addr_req: none addr_proof: 'no' access_restrictions: mobile restrictions_desc: If you are on Premium, City and Mobile numbers can be subscribed for free.
If you want a free number, select a City number and use our free chat function at your website. cli_support: 'yes' business_pkg_support: 'no' package: regular call_recording_allowed: 'yes' voiceapp_connect: 'yes' csg_connect: 'yes' status: success Single-phone-number-subscription: type: object title: Phone number subscription description: Represents a single phone number subscribed by an account properties: resource: type: string description: Name of the resource accessed minLength: 1 status: type: string description: Status of the response minLength: 1 response: type: array minItems: 1 uniqueItems: true items: type: object properties: account_id: type: string description: The account_id is the account to which the number is currently assigned. minLength: 1 country_code: type: string description: The telephony country code as per ITU standards. minLength: 1 area_code: type: string description: The telephone area code of the phone number minLength: 1 country: type: string description: The country where the number is from. minLength: 1 is_part_of_series: type: string description: A Boolean that specifies if the number is a part of a number series minLength: 1 range: type: string description: Applicable if the phone number subscription is of a number that is a part of a phone number series. The value specifies the quantity of phone numbers in the number series of which this phone number is a part of minLength: 1 city: type: string description: Name of the city where the number is. The name is descriptive and does not follow any standard. minLength: 1 type: type: string enum: - national - geographic - tollfree - mobile description: Type of number – This can be either “national”, “geographic”, or “tollfree” minLength: 1 readOnly: true one_time_fee: type: string description: One-time fee for the phone number charged when it is purchased. Up to 2 decimals. minLength: 1 recurring_fee: type: string description: Current recurring fee for the phone number. Up to 2 decimals minLength: 1 recurrence_interval: type: string description: Current recurrence interval for the recurring fee. Specified in days(e.g. 15d) or months(e.g. 3m). minLength: 1 per_call_fee: type: string description: The per call fee applicable to the number. Up to 2 decimals format: float readOnly: true per_min_fee: type: string description: The charge per minute fee for calls. Up to 2 decimals minLength: 1 charge_interval: type: string description: The charge interval in seconds minLength: 1 per_sms_fee: type: string description: The per SMS receiving fee applicable. Up to 2 decimals minLength: 1 per_fax_fee: type: string description: The per FAX receiving fee applicable. Up to 2 decimals currency: type: string description: The currency in which the fee is specified minLength: 1 price_category: type: string description: The price category of the number/series. The allowed values are 1- regular, 2- gold, 3 - gold+, 4 - gold++, 5 -gold+++ minLength: 1 connect_to_type: type: string enum: - user - phnum - sip - app - csg description: The destination to which this number is connected. The supported values are user, phnum, sip,app, csg minLength: 1 connect_to: type: string description: The id of the entity the phone number is connected to. For example, if the number is connected to a user then this is the `user_id`. minLength: 1 activation_date: type: string description: The date/time the number/series was activated. minLength: 1 next_fee_date: type: string description: The date/time that the next recurring fee is to be charged minLength: 1 reclaim_date: type: string description: The date/time an inactive number will be automatically removed from your account if it is inactive due to insufficient balance in the account. minLength: 1 status: type: string description: The number/series status. Can take values “active” or “inactive” minLength: 1 status_desc: type: string description: The text reason specification. Applies in case the number is inactive. freetest: type: string description: Booleanthat specifies if this subscription is currently under free testing. Takes Boolean values. minLength: 1 branded: type: boolean description: Flag that specifies whether the number is a branded number i.e. free with the website chat widget. freeplan: type: boolean description: Flag that specifies whether the number is included for free with [paid plans](https://sonetel.com/plans). sms_enabled: type: string description: Numbers that have SMS enabled. minLength: 1 sms_supported: type: string description: Numbers that support SMS. minLength: 1 phnum: type: string description: The number in E164 format without ‘+’ minLength: 1 free_test_expiry_date: type: string description: The date/time when the free testing period ends. sms_settings: type: object description: SMS delivery settings for the number. properties: delivery_methods: type: array minItems: 1 uniqueItems: true items: type: object properties: dest_type: type: string minLength: 1 required: - dest_type plan_details: type: object description: The plan details of the number. Only the `next_renew_mode` can be updated properties: current_renew_mode: type: string enum: - 1m - 1y - 3y description: This is a readonly property that holds values of 1m,1y,3y. 1m stands for one month, 1y stands for one year and 3y stands for 3 years renewal period minLength: 1 readOnly: true next_renew_mode: type: string enum: - 1m - 1y - 3y description: When the number renews on `next_fee_date` how long should it renew for. minLength: 1 activation_date: type: string description: The date of creation of the phone number subscription. format: date-time minLength: 1 readOnly: true next_fee_date: type: string description: The date on which the next renewal fee is due. minLength: 1 deactivate_date: type: string description: The date on which the number will be deactivated if your account does not have enough credit to apply the `next_recurring_fee`. This date includes a grace period. format: date-time minLength: 1 readOnly: true next_recurring_fee: type: string description: The cost of the next renewal. (upto 2 decimals) minLength: 1 readOnly: true show: type: string enum: - caller - called description: 'This field lists what to show in the CLI if the phone number is not connected to a user. Valid values are "caller", "called". ' minLength: 1 rule_set_id: type: string description: The Id of the rule set if exceptions are defined for call processing. This field is empty if no exceptions are defined. state: type: string description: If the phone number is from USA, then this will hold the name of the state minLength: 1 readOnly: true addr_req: type: string description: 'Flag indicating whether there are any address requirements for this number. These are legal requirements that must be met before the number can be used. See the address requirements at https://sonetel.com/phone-number-limitations for more details.' minLength: 1 readOnly: true addr_proof: type: string description: Flag indicating whether submission of address proof is required for this number. Can take values 'yes', 'no' minLength: 1 readOnly: true access_restrictions: type: string description: Indicates if there are any access restriction from any provider on this number. minLength: 1 readOnly: true restrictions_desc: type: string description: Any additional restrictions applicable on this number. minLength: 1 cli_support: type: string enum: - 'yes' - 'no' - add_on description: 'Indicates whethe the phone number can be shown as caller ID (CLI) in calls. - no → can never be used for CLI - yes → number can be used for CLI - add_on → can be used as CLI with a package' minLength: 1 readOnly: true business_pkg_support: type: string enum: - 'yes' - 'no' description: 'Indicates whether business package is supported on this number. ' minLength: 1 readOnly: true x-deprecated: true package: type: string enum: - regular - standard - business description: Describes the current package on this number. Available values "regular", "standard", "business" minLength: 1 call_recording_allowed: type: string enum: - 'yes' - 'no' - add_on description: This property indicates whether call recording can be enabled on this number. Available values "yes", "no" "add-on". minLength: 1 voiceapp_connect: type: string enum: - 'yes' - 'no' description: Indicates whether this number can be allowed to connect to a voice app minLength: 1 csg_connect: type: string enum: - 'yes' - 'no' description: Indicates whether this number can be allowed to connect to a team. minLength: 1 examples: - resource: phonenumbersubscription status: success response: phnum: '14015550000' country: USA range: '1' city: Providence (401) type: geographic status: active account_id: '200000000' country_code: '1' area_code: '401' is_part_of_series: 'no' one_time_fee: '0.00' recurring_fee: '1.99' recurrence_interval: 1m per_call_fee: '0.000' per_min_fee: '0.000' charge_interval: '60' per_sms_fee: '0.0' per_fax_fee: '0.0' currency: USD price_category: regular connect_to_type: nowhere connect_to: '' activation_date: 20210715T10:50:41Z next_fee_date: 20210715T10:50:41Z reclaim_date: 20210715T10:50:41Z freetest: 'no' status_desc: '' branded: 'no' freeplan: 'no' plan_details: current_renew_mode: 1m next_renew_mode: 1m activation_date: 20210715T10:50:41Z next_fee_date: 20210715T10:50:41Z deactivate_date: 20210715T10:50:41Z next_recurring_fee: '1.99' fax_enabled: 'no' sms_enabled: add-on fax_supported: 'no' sms_supported: 'yes' show: caller rule_set_id: '' state: Rhode Island addr_req: none addr_proof: 'no' access_restrictions: international restrictions_desc: '' business_pkg_support: 'yes' package: standard call_recording_allowed: add-on voiceapp_connect: add-on csg_connect: add-on cli_support: add-on x-examples: example-1: page_metadata: pagination_type: static count: '126' page_count: '1' previous: NA next: NA page: '1' first: NA last: NA sort: property: activation_date ignoreCase: false nullHandling: client descending: true ascending: false resource: phonenumbersubscription response: - account_id: '20000000' country_code: '46' area_code: '8' country: SWE is_part_of_series: 'no' range: '1' city: Stockholm (8) type: geographic one_time_fee: '0.0' recurring_fee: '52.0' recurrence_interval: 1m per_call_fee: '0.00' per_min_fee: '0.00' charge_interval: '60' per_sms_fee: '' per_fax_fee: '' currency: SEK price_category: regular connect_to_type: user connect_to: '2001000000' activation_date: 20200217T09:36:10Z next_fee_date: 20210717T09:36:10Z reclaim_date: 20210816T09:36:10Z status: active status_desc: '' freetest: 'no' branded: 'no' freeplan: 'no' fax_enabled: 'no' sms_enabled: 'yes' fax_supported: 'no' sms_supported: 'yes' phnum: '468400000000' free_test_expiry_date: '' sms_settings: delivery_methods: - dest_type: auto plan_details: current_renew_mode: 1m next_renew_mode: 1m activation_date: 20200217T09:36:10Z next_fee_date: 20210717T09:36:10Z deactivate_date: 20210816T09:36:10Z next_recurring_fee: '52.00' show: caller rule_set_id: '' addr_req: none addr_proof: 'no' access_restrictions: mobile restrictions_desc: If you are on Premium, City and Mobile numbers can be subscribed for free.
If you want a free number, select a City number and use our free chat function at your website. cli_support: 'yes' business_pkg_support: 'no' package: regular call_recording_allowed: 'yes' voiceapp_connect: 'yes' csg_connect: 'yes' - account_id: '20000000' country_code: '46' area_code: '8' country: SWE is_part_of_series: 'no' range: '1' city: Stockholm (8) type: geographic one_time_fee: '0.0' recurring_fee: '65.0' recurrence_interval: 1m per_call_fee: '0.00' per_min_fee: '0.00' charge_interval: '60' per_sms_fee: '' per_fax_fee: '' currency: SEK price_category: regular connect_to_type: app connect_to: app_type: ivr app_id: VAi6345maaaaaa activation_date: 20100211T21:09:38Z next_fee_date: 20270122T11:35:41Z reclaim_date: 20270221T11:35:41Z status: active status_desc: '' freetest: 'no' branded: 'no' freeplan: 'no' fax_enabled: 'no' sms_enabled: 'yes' fax_supported: 'no' sms_supported: 'yes' phnum: '468525000000' free_test_expiry_date: '' sms_settings: delivery_methods: - dest_type: auto plan_details: current_renew_mode: 1m next_renew_mode: 1m activation_date: 20100211T21:09:38Z next_fee_date: 20270122T11:35:41Z deactivate_date: 20270221T11:35:41Z next_recurring_fee: '65.00' show: caller rule_set_id: '' addr_req: none addr_proof: 'no' access_restrictions: mobile restrictions_desc: If you are on Premium, City and Mobile numbers can be subscribed for free.
If you want a free number, select a City number and use our free chat function at your website. cli_support: 'yes' business_pkg_support: 'no' package: regular call_recording_allowed: 'yes' voiceapp_connect: 'yes' csg_connect: 'yes' - account_id: '20000000' country_code: '46' area_code: '8' country: SWE is_part_of_series: 'no' range: '1' city: Stockholm (8) type: geographic one_time_fee: '0.0' recurring_fee: '65.0' recurrence_interval: 1m per_call_fee: '0.00' per_min_fee: '0.00' charge_interval: '60' per_sms_fee: '' per_fax_fee: '' currency: SEK price_category: regular connect_to_type: user connect_to: '2000337379' activation_date: 20100211T21:09:38Z next_fee_date: 20270122T11:35:41Z reclaim_date: 20270221T11:35:41Z status: active status_desc: '' freetest: 'no' branded: 'no' freeplan: 'no' fax_enabled: 'no' sms_enabled: 'no' fax_supported: 'no' sms_supported: 'yes' phnum: '468525111111' free_test_expiry_date: '' plan_details: current_renew_mode: 1m next_renew_mode: 1m activation_date: 20100211T21:09:38Z next_fee_date: 20270122T11:35:41Z deactivate_date: 20270221T11:35:41Z next_recurring_fee: '65.00' show: caller rule_set_id: '' addr_req: none addr_proof: 'no' access_restrictions: mobile restrictions_desc: If you are on Premium, City and Mobile numbers can be subscribed for free.
If you want a free number, select a City number and use our free chat function at your website. cli_support: 'yes' business_pkg_support: 'no' package: regular call_recording_allowed: 'yes' voiceapp_connect: 'yes' csg_connect: 'yes' - account_id: '20000000' country_code: '46' area_code: '8' country: SWE is_part_of_series: 'no' range: '1' city: Stockholm (8) type: geographic one_time_fee: '0.0' recurring_fee: '65.0' recurrence_interval: 1m per_call_fee: '0.00' per_min_fee: '0.00' charge_interval: '60' per_sms_fee: '' per_fax_fee: '' currency: SEK price_category: regular connect_to_type: app connect_to: app_type: ivr app_id: VAi6341111aaaa activation_date: 20100211T21:09:38Z next_fee_date: 20270122T11:35:41Z reclaim_date: 20270221T11:35:41Z status: active status_desc: '' freetest: 'no' branded: 'no' freeplan: 'no' fax_enabled: 'no' sms_enabled: 'yes' fax_supported: 'no' sms_supported: 'yes' phnum: '46852500000' free_test_expiry_date: '' sms_settings: delivery_methods: - dest_type: auto plan_details: current_renew_mode: 1m next_renew_mode: 1m activation_date: 20100211T21:09:38Z next_fee_date: 20270122T11:35:41Z deactivate_date: 20270221T11:35:41Z next_recurring_fee: '65.00' show: caller addr_req: none addr_proof: 'no' access_restrictions: mobile restrictions_desc: If you are on Premium, City and Mobile numbers can be subscribed for free.
If you want a free number, select a City number and use our free chat function at your website. cli_support: 'yes' business_pkg_support: 'no' package: regular call_recording_allowed: 'yes' voiceapp_connect: 'yes' csg_connect: 'yes' status: success parameters: Authorization: name: Authorization in: header description: The authorization header contains your access token and is used to authenticate requests. Generate an `access_token` using the `/oauth/token` endpoint. required: true schema: type: string examples: - Bearer securitySchemes: Production: type: oauth2 flows: password: refreshUrl: https://api.sonetel.com/SonetelAuth/beta/oauth/token tokenUrl: https://api.sonetel.com/SonetelAuth/beta/oauth/token scopes: {} x-refined-from: - 5_voice_apps.yaml - 7_users.yaml - account.yaml - phone_numbers.yaml - sonetel-account-openapi.yml - sonetel-phone-numbers-openapi.yml - sonetel-users-openapi.yml - sonetel-voice-apps-openapi.yml