Evo Voice

<back to all web services

BuyPhoneNumber

Buys the specified phone number

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
POST/endpoints/phone-numbers
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.Endpoints
Imports Voice.Api.Flows.Data
Imports Voice.Api
Imports Voice.Api.Customers
Imports Voice.Api.Scheduling
Imports Voice.Api.Authentication
Imports Voice.Api.Settings
Imports Voice.Api.Integrations

Namespace Global

    Namespace Voice.Api

        Public Partial Class EntityInfo
            '''<Summary>
            '''The ID of the object
            '''</Summary>
            <ApiMember(Description:="The ID of the object")>
            Public Overridable Property Id As String

            '''<Summary>
            '''The date the object was created
            '''</Summary>
            <ApiMember(Description:="The date the object was created")>
            Public Overridable Property DateCreated As String

            '''<Summary>
            '''The date the object was last modified
            '''</Summary>
            <ApiMember(Description:="The date the object was last modified")>
            Public Overridable Property DateLastModified As String

            '''<Summary>
            '''The user that created this object
            '''</Summary>
            <ApiMember(Description:="The user that created this object")>
            Public Overridable Property CreatedBy As String

            '''<Summary>
            '''The user that last modified this object
            '''</Summary>
            <ApiMember(Description:="The user that last modified this object")>
            Public Overridable Property LastModifiedBy As String
        End Class
    End Namespace

    Namespace Voice.Api.Authentication

        Public Enum DashboardPermissions
            ViewFiles
            ViewNotifications
            ViewSessions
            ViewEndpoints
            ViewReports
            ViewCustomers
            ViewFlows
        End Enum
    End Namespace

    Namespace Voice.Api.Customers

        Public Partial Class AppSettings
            Public Overridable Property EnablePhoneNumberManagement As Boolean
            Public Overridable Property EnableDeviceManagement As Boolean
            Public Overridable Property EnableDialer As Boolean
            Public Overridable Property EnableCallHistory As Boolean
            Public Overridable Property ShowFileNameInMessageCenter As Boolean
            Public Overridable Property ChakraTheme As String
            Public Overridable Property CustomCss As String
            Public Overridable Property PageTitle As String
            Public Overridable Property StringMappings As String
            Public Overridable Property LogoutUrl As String
            Public Overridable Property PortMyNumberUrl As String
        End Class

        Public Partial Class CustomerBreadcrumb
            Public Overridable Property Id As String
            Public Overridable Property Name As String
        End Class
    End Namespace

    Namespace Voice.Api.Endpoints

        Public Enum ActionUrlHttpMethods
            GET
            POST
        End Enum

        Public Enum AgentStateReasons
            Unknown
            SetByUser
            MissedCall
            SetBySystem
        End Enum

        Public Enum AgentStates
            Unknown
            Ready
            NotReady
            LoggedOut
            WrapUp
            Outgoing
            Other
        End Enum

        '''<Summary>
        '''Buys the specified phone number
        '''</Summary>
        <Api(Description:="Buys the specified phone number")>
        Public Partial Class BuyPhoneNumber
            Implements IPost
            Public Sub New()
                TagIds = New List(Of String)
            End Sub

            '''<Summary>
            '''The ID of the account to associate the number with
            '''</Summary>
            <ApiMember(Description:="The ID of the account to associate the number with")>
            Public Overridable Property AccountId As String

            '''<Summary>
            '''The ID of the customer to associate this number with
            '''</Summary>
            <ApiMember(Description:="The ID of the customer to associate this number with")>
            Public Overridable Property CustomerId As String

            '''<Summary>
            '''The number to buy/create
            '''</Summary>
            <ApiMember(Description:="The number to buy/create")>
            Public Overridable Property Number As String

            '''<Summary>
            '''Is this number virtual? If so we will not buy but just create an entry
            '''</Summary>
            <ApiMember(Description:="Is this number virtual? If so we will not buy but just create an entry")>
            Public Overridable Property IsVirtualPhoneNumber As Boolean

            '''<Summary>
            '''Is this a fax number?
            '''</Summary>
            <ApiMember(Description:="Is this a fax number?")>
            Public Overridable Property IsFaxNumber As Boolean

            '''<Summary>
            '''The address SID to associate with the phone number
            '''</Summary>
            <ApiMember(Description:="The address SID to associate with the phone number")>
            Public Overridable Property AddressSid As String

            '''<Summary>
            '''The list of tags to associate with the new endpoint
            '''</Summary>
            <ApiMember(Description:="The list of tags to associate with the new endpoint")>
            Public Overridable Property TagIds As List(Of String)

            '''<Summary>
            '''Data values for this endpoint
            '''</Summary>
            <ApiMember(Description:="Data values for this endpoint")>
            Public Overridable Property Data As Struct

            '''<Summary>
            '''Specify the flow to use
            '''</Summary>
            <ApiMember(Description:="Specify the flow to use")>
            Public Overridable Property FlowId As String

            '''<Summary>
            '''The flow params
            '''</Summary>
            <ApiMember(Description:="The flow params")>
            Public Overridable Property FlowParams As Struct
        End Class

        Public Enum CustomerVisibility
            None
            CurrentCustomer
            CurrentAndChildCustomers
        End Enum

        Public Partial Class EndpointActionUrl
            Public Overridable Property Id As String
            Public Overridable Property Url As String
            Public Overridable Property Method As ActionUrlHttpMethods
        End Class

        Public Partial Class EndpointContact
            Public Overridable Property Id As String
            Public Overridable Property DisplayName As String
            Public Overridable Property Address As String
        End Class

        Public Enum EndpointFlowSchedules
            Always
            Scheduled
            Simple
        End Enum

        Public Partial Class EndpointInfo
            Inherits EntityInfo
            Public Sub New()
                CustomerBreadcrumb = New List(Of CustomerBreadcrumb)
                ScheduledFlows = New List(Of ScheduledFlow)
                DashboardPermissions = New List(Of DashboardPermissions)
                Tags = New List(Of Tag)
                ActionUrls = New List(Of EndpointActionUrl)
                TeamMemberIds = New List(Of String)
                Contacts = New List(Of EndpointContact)
            End Sub

            '''<Summary>
            '''The account ID this endpoint is associated with
            '''</Summary>
            <ApiMember(Description:="The account ID this endpoint is associated with")>
            Public Overridable Property AccountId As String

            '''<Summary>
            '''The name of the account this endpoint is associated with
            '''</Summary>
            <ApiMember(Description:="The name of the account this endpoint is associated with")>
            Public Overridable Property AccountName As String

            '''<Summary>
            '''The ID of the customer this endpoint is associated with
            '''</Summary>
            <ApiMember(Description:="The ID of the customer this endpoint is associated with")>
            Public Overridable Property CustomerId As String

            '''<Summary>
            '''The name of the customer this endpoint is associated with
            '''</Summary>
            <ApiMember(Description:="The name of the customer this endpoint is associated with")>
            Public Overridable Property CustomerName As String

            '''<Summary>
            '''The third party reference ID for the endpoint
            '''</Summary>
            <ApiMember(Description:="The third party reference ID for the endpoint")>
            Public Overridable Property ReferenceId As String

            '''<Summary>
            '''The breadcrumb to the customer for this endpoint
            '''</Summary>
            <ApiMember(Description:="The breadcrumb to the customer for this endpoint")>
            Public Overridable Property CustomerBreadcrumb As List(Of CustomerBreadcrumb)

            '''<Summary>
            '''The display name of the endpoint
            '''</Summary>
            <ApiMember(Description:="The display name of the endpoint")>
            Public Overridable Property DisplayName As String

            '''<Summary>
            '''The type of endpoint
            '''</Summary>
            <ApiMember(Description:="The type of endpoint")>
            Public Overridable Property Type As EndpointTypes

            '''<Summary>
            '''Extra info for this endpoint (typically to show in grid)
            '''</Summary>
            <ApiMember(Description:="Extra info for this endpoint (typically to show in grid)")>
            Public Overridable Property ExtraInformation As String

            '''<Summary>
            '''The ID of the flow to use for voice
            '''</Summary>
            <ApiMember(Description:="The ID of the flow to use for voice")>
            Public Overridable Property FlowId As String

            '''<Summary>
            '''The name of the flow to use for voice
            '''</Summary>
            <ApiMember(Description:="The name of the flow to use for voice")>
            Public Overridable Property FlowName As String

            '''<Summary>
            '''The params for the voice flow
            '''</Summary>
            <ApiMember(Description:="The params for the voice flow")>
            Public Overridable Property FlowParams As Struct

            '''<Summary>
            '''Whether to use a single flow always or use scheduled flow system
            '''</Summary>
            <ApiMember(Description:="Whether to use a single flow always or use scheduled flow system")>
            Public Overridable Property FlowSchedule As EndpointFlowSchedules

            '''<Summary>
            '''This endpoint's schedule
            '''</Summary>
            <ApiMember(Description:="This endpoint's schedule")>
            Public Overridable Property Schedule As Schedule

            '''<Summary>
            '''The list of scheduled flows when using scheduling
            '''</Summary>
            <ApiMember(Description:="The list of scheduled flows when using scheduling")>
            Public Overridable Property ScheduledFlows As List(Of ScheduledFlow)

            '''<Summary>
            '''Disable SMS
            '''</Summary>
            <ApiMember(Description:="Disable SMS")>
            Public Overridable Property DisableSms As Boolean

            '''<Summary>
            '''Set this to true to prevent Evo Voice from overriding the 10DLC / SMS settings for this number
            '''</Summary>
            <ApiMember(Description:="Set this to true to prevent Evo Voice from overriding the 10DLC / SMS settings for this number")>
            Public Overridable Property UseExternal10DlcCampaign As Boolean

            '''<Summary>
            '''Is this a virtual phone number?
            '''</Summary>
            <ApiMember(Description:="Is this a virtual phone number?")>
            Public Overridable Property IsVirtualPhoneNumber As Boolean

            '''<Summary>
            '''Is caller ID verified for this virtual number?
            '''</Summary>
            <ApiMember(Description:="Is caller ID verified for this virtual number?")>
            Public Overridable Property IsCallerIdVerified As Boolean

            '''<Summary>
            '''The verification code for this number
            '''</Summary>
            <ApiMember(Description:="The verification code for this number")>
            Public Overridable Property CallerIdVerificationCode As String

            '''<Summary>
            '''The phone number
            '''</Summary>
            <ApiMember(Description:="The phone number")>
            Public Overridable Property PhoneNumber As String

            '''<Summary>
            '''The Sid of the phone number
            '''</Summary>
            <ApiMember(Description:="The Sid of the phone number")>
            Public Overridable Property PhoneNumberSid As String

            '''<Summary>
            '''The caller ID Name (CNAM) for the phone number
            '''</Summary>
            <ApiMember(Description:="The caller ID Name (CNAM) for the phone number")>
            Public Overridable Property CallerIdName As String

            '''<Summary>
            '''The address SID associated with the phone number
            '''</Summary>
            <ApiMember(Description:="The address SID associated with the phone number")>
            Public Overridable Property AddressSid As String

            '''<Summary>
            '''Do not touch this phone number - for BYOA accounts
            '''</Summary>
            <ApiMember(Description:="Do not touch this phone number - for BYOA accounts")>
            Public Overridable Property DoNotTouchPhoneNumber As Boolean

            '''<Summary>
            '''Is this number enrolled in a 10DLC messaging service campaign
            '''</Summary>
            <ApiMember(Description:="Is this number enrolled in a 10DLC messaging service campaign")>
            Public Overridable Property IsEnrolledIn10DlcService As Boolean

            '''<Summary>
            '''Whether we look up caller ID or not
            '''</Summary>
            <ApiMember(Description:="Whether we look up caller ID or not")>
            Public Overridable Property EnableCallerIdLookup As Boolean

            '''<Summary>
            '''The email address of the user
            '''</Summary>
            <ApiMember(Description:="The email address of the user")>
            Public Overridable Property UserEmailAddress As String

            '''<Summary>
            '''The Twilio Region for the SIP endpoint
            '''</Summary>
            <ApiMember(Description:="The Twilio Region for the SIP endpoint")>
            Public Overridable Property SipRegion As TwilioSipRegions

            '''<Summary>
            '''The Twilio Sid of the credentials for Sip
            '''</Summary>
            <ApiMember(Description:="The Twilio Sid of the credentials for Sip")>
            Public Overridable Property SipCredentialSid As String

            '''<Summary>
            '''The Twilio SIP user name
            '''</Summary>
            <ApiMember(Description:="The Twilio SIP user name")>
            Public Overridable Property SipUserName As String

            '''<Summary>
            '''The Twilio SIP password
            '''</Summary>
            <ApiMember(Description:="The Twilio SIP password")>
            Public Overridable Property SipPassword As String

            '''<Summary>
            '''The SIP domain
            '''</Summary>
            <ApiMember(Description:="The SIP domain")>
            Public Overridable Property SipDomain As String

            '''<Summary>
            '''Is emergency calling enabled on this number?
            '''</Summary>
            <ApiMember(Description:="Is emergency calling enabled on this number?")>
            Public Overridable Property EnableEmergencyCalling As Boolean

            '''<Summary>
            '''The SID of the emergency address for this number
            '''</Summary>
            <ApiMember(Description:="The SID of the emergency address for this number")>
            Public Overridable Property EmergencyAddressSid As String

            '''<Summary>
            '''The ID of the phone number to use for emergency dialing
            '''</Summary>
            <ApiMember(Description:="The ID of the phone number to use for emergency dialing")>
            Public Overridable Property EmergencyPhoneNumberId As String

            '''<Summary>
            '''The current agent state of this user endpoint
            '''</Summary>
            <ApiMember(Description:="The current agent state of this user endpoint")>
            Public Overridable Property AgentState As AgentStates

            '''<Summary>
            '''The current agent state reason of this user endpoint
            '''</Summary>
            <ApiMember(Description:="The current agent state reason of this user endpoint")>
            Public Overridable Property AgentStateReason As AgentStateReasons

            '''<Summary>
            '''The mode for this user
            '''</Summary>
            <ApiMember(Description:="The mode for this user")>
            Public Overridable Property UserMode As UserModes

            '''<Summary>
            '''The ID of the file to use for voicemail greeting
            '''</Summary>
            <ApiMember(Description:="The ID of the file to use for voicemail greeting")>
            Public Overridable Property VoicemailGreetingId As String

            '''<Summary>
            '''The endpoint's data
            '''</Summary>
            <ApiMember(Description:="The endpoint's data")>
            Public Overridable Property Data As Struct

            '''<Summary>
            '''The email address for email endpoints
            '''</Summary>
            <ApiMember(Description:="The email address for email endpoints")>
            Public Overridable Property EmailAddress As String

            '''<Summary>
            '''The first name of the user (for user endpoints)
            '''</Summary>
            <ApiMember(Description:="The first name of the user (for user endpoints)")>
            Public Overridable Property UserFirstName As String

            '''<Summary>
            '''The last name of the user (for user endpoints)
            '''</Summary>
            <ApiMember(Description:="The last name of the user (for user endpoints)")>
            Public Overridable Property UserLastName As String

            '''<Summary>
            '''The URL of an image for this user's avatar
            '''</Summary>
            <ApiMember(Description:="The URL of an image for this user's avatar")>
            Public Overridable Property AvatarUrl As String

            '''<Summary>
            '''Does this user have manager role?
            '''</Summary>
            <ApiMember(Description:="Does this user have manager role?")>
            Public Overridable Property ManagerRole As UserManagerRoles

            '''<Summary>
            '''The list of dashboard permissions for when the manager role is custom
            '''</Summary>
            <ApiMember(Description:="The list of dashboard permissions for when the manager role is custom")>
            Public Overridable Property DashboardPermissions As List(Of DashboardPermissions)

            '''<Summary>
            '''The type of visibility this user has to their own fields
            '''</Summary>
            <ApiMember(Description:="The type of visibility this user has to their own fields")>
            Public Overridable Property MyFieldPermissions As UserDataFieldModes

            '''<Summary>
            '''The type of visibility this user has to customer fields
            '''</Summary>
            <ApiMember(Description:="The type of visibility this user has to customer fields")>
            Public Overridable Property CustomerFieldPermissions As UserDataFieldModes

            '''<Summary>
            '''The type of visibility this user has to other user fields
            '''</Summary>
            <ApiMember(Description:="The type of visibility this user has to other user fields")>
            Public Overridable Property OtherUserFieldPermissions As UserDataFieldModes

            '''<Summary>
            '''The type of visibility this user has to other endpoint fields
            '''</Summary>
            <ApiMember(Description:="The type of visibility this user has to other endpoint fields")>
            Public Overridable Property OtherEndpointFieldPermissions As UserDataFieldModes

            '''<Summary>
            '''The name of this endpoint (for bots etc.)
            '''</Summary>
            <ApiMember(Description:="The name of this endpoint (for bots etc.)")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The list of tags for this endpoint
            '''</Summary>
            <ApiMember(Description:="The list of tags for this endpoint")>
            Public Overridable Property Tags As List(Of Tag)

            '''<Summary>
            '''The list of action URLs
            '''</Summary>
            <ApiMember(Description:="The list of action URLs")>
            Public Overridable Property ActionUrls As List(Of EndpointActionUrl)

            '''<Summary>
            '''The list of members in this team
            '''</Summary>
            <ApiMember(Description:="The list of members in this team")>
            Public Overridable Property TeamMemberIds As List(Of String)

            '''<Summary>
            '''Visibility of this user/team in contact lists
            '''</Summary>
            <ApiMember(Description:="Visibility of this user/team in contact lists")>
            Public Overridable Property ContactListVisibility As CustomerVisibility

            '''<Summary>
            '''The list of contacts personal to this user
            '''</Summary>
            <ApiMember(Description:="The list of contacts personal to this user")>
            Public Overridable Property Contacts As List(Of EndpointContact)

            '''<Summary>
            '''The documo ID for this number
            '''</Summary>
            <ApiMember(Description:="The documo ID for this number")>
            Public Overridable Property DocumoId As String

            '''<Summary>
            '''Integration data for this endpoint
            '''</Summary>
            <ApiMember(Description:="Integration data for this endpoint")>
            Public Overridable Property IntegrationData As EntityIntegrationData

            '''<Summary>
            '''Settings for third party phone system
            '''</Summary>
            <ApiMember(Description:="Settings for third party phone system")>
            Public Overridable Property ThirdPartyPhoneSystemSettings As ThirdPartyPhoneSystemSettings

            '''<Summary>
            '''Should this user override the parent customer's app settings
            '''</Summary>
            <ApiMember(Description:="Should this user override the parent customer's app settings")>
            Public Overridable Property OverrideAppSettings As Boolean

            '''<Summary>
            '''App / Portal settings for this user
            '''</Summary>
            <ApiMember(Description:="App / Portal settings for this user")>
            Public Overridable Property AppSettings As AppSettings
        End Class

        Public Enum EndpointTypes
            PhoneNumber
            User
            FaxNumber
            EmailAddress
            Unused_1
            Unused_2
            Unused_3
            Unused_4
            Unused_5
            Team
        End Enum

        Public Partial Class ScheduledFlow
            Public Overridable Property StateName As String
            Public Overridable Property FlowId As String
            Public Overridable Property FlowParams As Struct
        End Class

        Public Partial Class ThirdPartyPhoneSystemSettings
            Public Overridable Property Type As ThirdPartyPhoneSystemTypes
            Public Overridable Property SipSettings As ThirdPartyPhoneSystemSettings.ThirdPartySipSettings
            Public Overridable Property DemoSettings As ThirdPartyPhoneSystemSettings.ThirdPartyDemoSettings

            Public Partial Class ThirdPartyDemoSettings
                Public Overridable Property Extension As String
            End Class

            Public Partial Class ThirdPartySipSettings
                Public Sub New()
                    Accounts = New List(Of ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings)
                End Sub

                Public Overridable Property Accounts As List(Of ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings)

                Public Enum TransportTypes
                    UDP
                    TLS
                    TCP
                    PERS
                End Enum

                Public Enum AudioCodecTypes
                    PCMU = 0
                    GSM = 3
                    PCMA = 8
                    G722 = 9
                    G729 = 18
                    ILBC = 97
                    AMR = 98
                    AMRWB = 99
                    SPEEX = 100
                    DTMF = 101
                    SPEEXWB = 102
                    ISACWB = 103
                    ISACSWB = 104
                    OPUS = 105
                    G7221 = 121
                    NONE = -1
                End Enum

                Public Enum DtmfMethods
                    RFC2833
                    INFO
                End Enum

                Public Partial Class ThirdPartySipAccountSettings
                    Public Sub New()
                        AudioCodecs = New List(Of ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes)
                    End Sub

                    Public Overridable Property Number As String
                    Public Overridable Property Agent As String
                    Public Overridable Property AuthName As String
                    Public Overridable Property UserName As String
                    Public Overridable Property DisplayName As String
                    Public Overridable Property Password As String
                    Public Overridable Property UserDomain As String
                    Public Overridable Property RegistrationExpires As Integer
                    Public Overridable Property TransportType As ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.TransportTypes
                    Public Overridable Property LocalIP As String
                    Public Overridable Property LocalPort As Integer
                    Public Overridable Property SipServer As String
                    Public Overridable Property SipServerPort As Integer
                    Public Overridable Property OutboundServer As String
                    Public Overridable Property OutboundServerPort As Integer
                    Public Overridable Property StunServer As String
                    Public Overridable Property StunPort As Integer
                    Public Overridable Property AudioPlaybackDeviceName As String
                    Public Overridable Property AudioRecordingDeviceName As String
                    Public Overridable Property AudioCodecs As List(Of ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes)
                    Public Overridable Property DTMFMethod As ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.DtmfMethods
                End Class
            End Class
        End Class

        Public Enum ThirdPartyPhoneSystemTypes
            Demo
            Sip
        End Enum

        Public Enum TwilioSipRegions
            NorthAmericaVirginia
            NorthAmericaOregon
            EuropeIreland
            EuropeFrankfurt
            AsiaPacificSingapore
            AsiaPacificTokyo
            AsiaPacificSydney
            SouthAmericaSanPaolo
        End Enum

        Public Enum UserDataFieldModes
            Hidden
            ReadOnly
            ReadWrite
        End Enum

        Public Enum UserManagerRoles
            None
            Manager
            VoicemailAndCallHistory
            Custom
        End Enum

        Public Enum UserModes
            SoftPhone
            Sip
            Flow
            DataOnly
            ThirdParty
        End Enum
    End Namespace

    Namespace Voice.Api.Flows.Data

        Public Partial Class Struct
            Inherits Dictionary(Of String, Value)
        End Class

        Public Partial Class Value
            Public Sub New()
                ListValue = New List(Of Struct)
            End Sub

            Public Overridable Property BoolValue As Nullable(Of Boolean)
            Public Overridable Property StringValue As String
            Public Overridable Property NumberValue As Nullable(Of Double)
            Public Overridable Property ListValue As List(Of Struct)
            Public Overridable Property StructValue As Struct
        End Class
    End Namespace

    Namespace Voice.Api.Integrations

        Public Partial Class EntityIntegrationData
            Inherits Dictionary(Of String, IntegrationData)
        End Class

        Public Partial Class IntegrationData
            Public Overridable Property ThirdPartyId As String
        End Class
    End Namespace

    Namespace Voice.Api.Scheduling

        Public Partial Class Schedule
            Public Sub New()
                Rules = New List(Of SchedulingRule)
            End Sub

            Public Overridable Property TimeZoneId As String
            Public Overridable Property Inherit As Boolean
            Public Overridable Property ForceClosed As Boolean
            Public Overridable Property Rules As List(Of SchedulingRule)
            Public Overridable Property DefaultState As String
        End Class

        Public Partial Class ScheduleDay
            Public Overridable Property Offset As Integer
            Public Overridable Property DayOfWeek As DayOfWeek
        End Class

        Public Partial Class SchedulingRule
            Public Sub New()
                BySetPosition = New List(Of Integer)
                ByMonth = New List(Of Integer)
                ByWeekNo = New List(Of Integer)
                ByYearDay = New List(Of Integer)
                ByMonthDay = New List(Of Integer)
                ByDay = New List(Of ScheduleDay)
                ByHour = New List(Of Integer)
                ByMinute = New List(Of Integer)
            End Sub

            Public Overridable Property Id As String
            Public Overridable Property Name As String
            Public Overridable Property Priority As Integer
            Public Overridable Property State As String
            Public Overridable Property Source As String
            Public Overridable Property Condition As String
            Public Overridable Property SimpleRuleType As SimpleSchedulingRuleTypes
            Public Overridable Property CustomerState As String
            Public Overridable Property FlowId As String
            Public Overridable Property FlowParams As Struct
            Public Overridable Property IsAllDay As Boolean
            Public Overridable Property StartDate As String
            Public Overridable Property StartTime As String
            Public Overridable Property EndTime As String
            Public Overridable Property BySetPosition As List(Of Integer)
            Public Overridable Property ByMonth As List(Of Integer)
            Public Overridable Property ByWeekNo As List(Of Integer)
            Public Overridable Property ByYearDay As List(Of Integer)
            Public Overridable Property ByMonthDay As List(Of Integer)
            Public Overridable Property ByDay As List(Of ScheduleDay)
            Public Overridable Property ByHour As List(Of Integer)
            Public Overridable Property ByMinute As List(Of Integer)
            Public Overridable Property Interval As Integer
            Public Overridable Property Count As Integer
            Public Overridable Property UntilDate As String
            Public Overridable Property Frequency As SchedulingRuleFrequency
        End Class

        Public Enum SchedulingRuleFrequency
            None
            Secondly
            Minutely
            Hourly
            Daily
            Weekly
            Monthly
            Yearly
        End Enum

        Public Enum SimpleSchedulingRuleTypes
            Always
            CustomerState
            Time
        End Enum
    End Namespace

    Namespace Voice.Api.Settings

        Public Partial Class Tag
            Public Overridable Property Id As String
            Public Overridable Property Name As String
            Public Overridable Property Color As TagColors
        End Class

        Public Enum TagColors
            Magenta
            Red
            Volcano
            Orange
            Gold
            Lime
            Green
            Cyan
            Blue
            GeekBlue
            Purple
        End Enum
    End Namespace
End Namespace

VB.NET BuyPhoneNumber DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /endpoints/phone-numbers HTTP/1.1 
Host: evovoice.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"accountId":"String","customerId":"String","number":"String","isVirtualPhoneNumber":false,"isFaxNumber":false,"addressSid":"String","tagIds":["String"],"data":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}}},"flowId":"String","flowParams":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}}}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"accountId":"String","accountName":"String","customerId":"String","customerName":"String","referenceId":"String","customerBreadcrumb":[{"id":"String","name":"String"}],"displayName":"String","type":"PhoneNumber","extraInformation":"String","flowId":"String","flowName":"String","flowParams":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}}},"flowSchedule":"Always","schedule":{"timeZoneId":"String","inherit":false,"forceClosed":false,"rules":[{"id":"String","name":"String","priority":0,"state":"String","source":"String","condition":"String","simpleRuleType":"Always","customerState":"String","flowId":"String","flowParams":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}}},"isAllDay":false,"startDate":"String","startTime":"String","endTime":"String","bySetPosition":[0],"byMonth":[0],"byWeekNo":[0],"byYearDay":[0],"byMonthDay":[0],"byDay":[{"offset":0,"dayOfWeek":"Sunday"}],"byHour":[0],"byMinute":[0],"interval":0,"count":0,"untilDate":"String","frequency":"None"}],"defaultState":"String"},"scheduledFlows":[{"stateName":"String","flowId":"String","flowParams":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}}}}],"disableSms":false,"useExternal10DlcCampaign":false,"isVirtualPhoneNumber":false,"isCallerIdVerified":false,"callerIdVerificationCode":"String","phoneNumber":"String","phoneNumberSid":"String","callerIdName":"String","addressSid":"String","doNotTouchPhoneNumber":false,"isEnrolledIn10DlcService":false,"enableCallerIdLookup":false,"userEmailAddress":"String","sipRegion":"NorthAmericaVirginia","sipCredentialSid":"String","sipUserName":"String","sipPassword":"String","sipDomain":"String","enableEmergencyCalling":false,"emergencyAddressSid":"String","emergencyPhoneNumberId":"String","agentState":"Unknown","agentStateReason":"Unknown","userMode":"SoftPhone","voicemailGreetingId":"String","data":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}],"structValue":{"String":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]}}}}}},"emailAddress":"String","userFirstName":"String","userLastName":"String","avatarUrl":"String","managerRole":"None","dashboardPermissions":["ViewFiles"],"myFieldPermissions":"Hidden","customerFieldPermissions":"Hidden","otherUserFieldPermissions":"Hidden","otherEndpointFieldPermissions":"Hidden","name":"String","tags":[{"id":"String","name":"String","color":"Magenta"}],"actionUrls":[{"id":"String","url":"String","method":"GET"}],"teamMemberIds":["String"],"contactListVisibility":"None","contacts":[{"id":"String","displayName":"String","address":"String"}],"documoId":"String","integrationData":{"String":{"thirdPartyId":"String"}},"thirdPartyPhoneSystemSettings":{"type":"Demo","sipSettings":{"accounts":[{"number":"String","agent":"String","authName":"String","userName":"String","displayName":"String","password":"String","userDomain":"String","registrationExpires":0,"transportType":"UDP","localIP":"String","localPort":0,"sipServer":"String","sipServerPort":0,"outboundServer":"String","outboundServerPort":0,"stunServer":"String","stunPort":0,"audioPlaybackDeviceName":"String","audioRecordingDeviceName":"String","audioCodecs":["PCMU"],"dtmfMethod":"RFC2833"}]},"demoSettings":{"extension":"String"}},"overrideAppSettings":false,"appSettings":{"enablePhoneNumberManagement":false,"enableDeviceManagement":false,"enableDialer":false,"enableCallHistory":false,"showFileNameInMessageCenter":false,"chakraTheme":"String","customCss":"String","pageTitle":"String","stringMappings":"String","logoutUrl":"String","portMyNumberUrl":"String"},"id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}