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
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Voice.Api.Endpoints;
using Voice.Api.Flows.Data;
using Voice.Api;
using Voice.Api.Customers;
using Voice.Api.Scheduling;
using Voice.Api.Authentication;
using Voice.Api.Settings;
using Voice.Api.Integrations;

namespace Voice.Api
{
    public partial class EntityInfo
    {
        ///<summary>
        ///The ID of the object
        ///</summary>
        [ApiMember(Description="The ID of the object")]
        public virtual string Id { get; set; }

        ///<summary>
        ///The date the object was created
        ///</summary>
        [ApiMember(Description="The date the object was created")]
        public virtual string DateCreated { get; set; }

        ///<summary>
        ///The date the object was last modified
        ///</summary>
        [ApiMember(Description="The date the object was last modified")]
        public virtual string DateLastModified { get; set; }

        ///<summary>
        ///The user that created this object
        ///</summary>
        [ApiMember(Description="The user that created this object")]
        public virtual string CreatedBy { get; set; }

        ///<summary>
        ///The user that last modified this object
        ///</summary>
        [ApiMember(Description="The user that last modified this object")]
        public virtual string LastModifiedBy { get; set; }
    }

}

namespace Voice.Api.Authentication
{
    public enum DashboardPermissions
    {
        ViewFiles,
        ViewNotifications,
        ViewSessions,
        ViewEndpoints,
        ViewReports,
        ViewCustomers,
        ViewFlows,
    }

}

namespace Voice.Api.Customers
{
    public partial class AppSettings
    {
        public virtual bool EnablePhoneNumberManagement { get; set; }
        public virtual bool EnableDeviceManagement { get; set; }
        public virtual bool EnableDialer { get; set; }
        public virtual bool EnableCallHistory { get; set; }
        public virtual bool ShowFileNameInMessageCenter { get; set; }
        public virtual string ChakraTheme { get; set; }
        public virtual string CustomCss { get; set; }
        public virtual string PageTitle { get; set; }
        public virtual string StringMappings { get; set; }
        public virtual string LogoutUrl { get; set; }
        public virtual string PortMyNumberUrl { get; set; }
    }

    public partial class CustomerBreadcrumb
    {
        public virtual string Id { get; set; }
        public virtual string Name { get; set; }
    }

}

namespace Voice.Api.Endpoints
{
    public enum ActionUrlHttpMethods
    {
        GET,
        POST,
    }

    public enum AgentStateReasons
    {
        Unknown,
        SetByUser,
        MissedCall,
        SetBySystem,
    }

    public enum AgentStates
    {
        Unknown,
        Ready,
        NotReady,
        LoggedOut,
        WrapUp,
        Outgoing,
        Other,
    }

    ///<summary>
    ///Buys the specified phone number
    ///</summary>
    [Api(Description="Buys the specified phone number")]
    public partial class BuyPhoneNumber
        : IPost
    {
        public BuyPhoneNumber()
        {
            TagIds = new List<string>{};
        }

        ///<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 virtual string AccountId { get; set; }

        ///<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 virtual string CustomerId { get; set; }

        ///<summary>
        ///The number to buy/create
        ///</summary>
        [ApiMember(Description="The number to buy/create")]
        public virtual string Number { get; set; }

        ///<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 virtual bool IsVirtualPhoneNumber { get; set; }

        ///<summary>
        ///Is this a fax number?
        ///</summary>
        [ApiMember(Description="Is this a fax number?")]
        public virtual bool IsFaxNumber { get; set; }

        ///<summary>
        ///The address SID to associate with the phone number
        ///</summary>
        [ApiMember(Description="The address SID to associate with the phone number")]
        public virtual string AddressSid { get; set; }

        ///<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 virtual List<string> TagIds { get; set; }

        ///<summary>
        ///Data values for this endpoint
        ///</summary>
        [ApiMember(Description="Data values for this endpoint")]
        public virtual Struct Data { get; set; }

        ///<summary>
        ///Specify the flow to use
        ///</summary>
        [ApiMember(Description="Specify the flow to use")]
        public virtual string FlowId { get; set; }

        ///<summary>
        ///The flow params
        ///</summary>
        [ApiMember(Description="The flow params")]
        public virtual Struct FlowParams { get; set; }
    }

    public enum CustomerVisibility
    {
        None,
        CurrentCustomer,
        CurrentAndChildCustomers,
    }

    public partial class EndpointActionUrl
    {
        public virtual string Id { get; set; }
        public virtual string Url { get; set; }
        public virtual ActionUrlHttpMethods Method { get; set; }
    }

    public partial class EndpointContact
    {
        public virtual string Id { get; set; }
        public virtual string DisplayName { get; set; }
        public virtual string Address { get; set; }
    }

    public enum EndpointFlowSchedules
    {
        Always,
        Scheduled,
        Simple,
    }

    public partial class EndpointInfo
        : EntityInfo
    {
        public EndpointInfo()
        {
            CustomerBreadcrumb = new List<CustomerBreadcrumb>{};
            ScheduledFlows = new List<ScheduledFlow>{};
            DashboardPermissions = new List<DashboardPermissions>{};
            Tags = new List<Tag>{};
            ActionUrls = new List<EndpointActionUrl>{};
            TeamMemberIds = new List<string>{};
            Contacts = new List<EndpointContact>{};
        }

        ///<summary>
        ///The account ID this endpoint is associated with
        ///</summary>
        [ApiMember(Description="The account ID this endpoint is associated with")]
        public virtual string AccountId { get; set; }

        ///<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 virtual string AccountName { get; set; }

        ///<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 virtual string CustomerId { get; set; }

        ///<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 virtual string CustomerName { get; set; }

        ///<summary>
        ///The third party reference ID for the endpoint
        ///</summary>
        [ApiMember(Description="The third party reference ID for the endpoint")]
        public virtual string ReferenceId { get; set; }

        ///<summary>
        ///The breadcrumb to the customer for this endpoint
        ///</summary>
        [ApiMember(Description="The breadcrumb to the customer for this endpoint")]
        public virtual List<CustomerBreadcrumb> CustomerBreadcrumb { get; set; }

        ///<summary>
        ///The display name of the endpoint
        ///</summary>
        [ApiMember(Description="The display name of the endpoint")]
        public virtual string DisplayName { get; set; }

        ///<summary>
        ///The type of endpoint
        ///</summary>
        [ApiMember(Description="The type of endpoint")]
        public virtual EndpointTypes Type { get; set; }

        ///<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 virtual string ExtraInformation { get; set; }

        ///<summary>
        ///The ID of the flow to use for voice
        ///</summary>
        [ApiMember(Description="The ID of the flow to use for voice")]
        public virtual string FlowId { get; set; }

        ///<summary>
        ///The name of the flow to use for voice
        ///</summary>
        [ApiMember(Description="The name of the flow to use for voice")]
        public virtual string FlowName { get; set; }

        ///<summary>
        ///The params for the voice flow
        ///</summary>
        [ApiMember(Description="The params for the voice flow")]
        public virtual Struct FlowParams { get; set; }

        ///<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 virtual EndpointFlowSchedules FlowSchedule { get; set; }

        ///<summary>
        ///This endpoint's schedule
        ///</summary>
        [ApiMember(Description="This endpoint's schedule")]
        public virtual Schedule Schedule { get; set; }

        ///<summary>
        ///The list of scheduled flows when using scheduling
        ///</summary>
        [ApiMember(Description="The list of scheduled flows when using scheduling")]
        public virtual List<ScheduledFlow> ScheduledFlows { get; set; }

        ///<summary>
        ///Disable SMS
        ///</summary>
        [ApiMember(Description="Disable SMS")]
        public virtual bool DisableSms { get; set; }

        ///<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 virtual bool UseExternal10DlcCampaign { get; set; }

        ///<summary>
        ///Is this a virtual phone number?
        ///</summary>
        [ApiMember(Description="Is this a virtual phone number?")]
        public virtual bool IsVirtualPhoneNumber { get; set; }

        ///<summary>
        ///Is caller ID verified for this virtual number?
        ///</summary>
        [ApiMember(Description="Is caller ID verified for this virtual number?")]
        public virtual bool IsCallerIdVerified { get; set; }

        ///<summary>
        ///The verification code for this number
        ///</summary>
        [ApiMember(Description="The verification code for this number")]
        public virtual string CallerIdVerificationCode { get; set; }

        ///<summary>
        ///The phone number
        ///</summary>
        [ApiMember(Description="The phone number")]
        public virtual string PhoneNumber { get; set; }

        ///<summary>
        ///The Sid of the phone number
        ///</summary>
        [ApiMember(Description="The Sid of the phone number")]
        public virtual string PhoneNumberSid { get; set; }

        ///<summary>
        ///The caller ID Name (CNAM) for the phone number
        ///</summary>
        [ApiMember(Description="The caller ID Name (CNAM) for the phone number")]
        public virtual string CallerIdName { get; set; }

        ///<summary>
        ///The address SID associated with the phone number
        ///</summary>
        [ApiMember(Description="The address SID associated with the phone number")]
        public virtual string AddressSid { get; set; }

        ///<summary>
        ///Do not touch this phone number - for BYOA accounts
        ///</summary>
        [ApiMember(Description="Do not touch this phone number - for BYOA accounts")]
        public virtual bool DoNotTouchPhoneNumber { get; set; }

        ///<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 virtual bool IsEnrolledIn10DlcService { get; set; }

        ///<summary>
        ///Whether we look up caller ID or not
        ///</summary>
        [ApiMember(Description="Whether we look up caller ID or not")]
        public virtual bool EnableCallerIdLookup { get; set; }

        ///<summary>
        ///The email address of the user
        ///</summary>
        [ApiMember(Description="The email address of the user")]
        public virtual string UserEmailAddress { get; set; }

        ///<summary>
        ///The Twilio Region for the SIP endpoint
        ///</summary>
        [ApiMember(Description="The Twilio Region for the SIP endpoint")]
        public virtual TwilioSipRegions SipRegion { get; set; }

        ///<summary>
        ///The Twilio Sid of the credentials for Sip
        ///</summary>
        [ApiMember(Description="The Twilio Sid of the credentials for Sip")]
        public virtual string SipCredentialSid { get; set; }

        ///<summary>
        ///The Twilio SIP user name
        ///</summary>
        [ApiMember(Description="The Twilio SIP user name")]
        public virtual string SipUserName { get; set; }

        ///<summary>
        ///The Twilio SIP password
        ///</summary>
        [ApiMember(Description="The Twilio SIP password")]
        public virtual string SipPassword { get; set; }

        ///<summary>
        ///The SIP domain
        ///</summary>
        [ApiMember(Description="The SIP domain")]
        public virtual string SipDomain { get; set; }

        ///<summary>
        ///Is emergency calling enabled on this number?
        ///</summary>
        [ApiMember(Description="Is emergency calling enabled on this number?")]
        public virtual bool EnableEmergencyCalling { get; set; }

        ///<summary>
        ///The SID of the emergency address for this number
        ///</summary>
        [ApiMember(Description="The SID of the emergency address for this number")]
        public virtual string EmergencyAddressSid { get; set; }

        ///<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 virtual string EmergencyPhoneNumberId { get; set; }

        ///<summary>
        ///The current agent state of this user endpoint
        ///</summary>
        [ApiMember(Description="The current agent state of this user endpoint")]
        public virtual AgentStates AgentState { get; set; }

        ///<summary>
        ///The current agent state reason of this user endpoint
        ///</summary>
        [ApiMember(Description="The current agent state reason of this user endpoint")]
        public virtual AgentStateReasons AgentStateReason { get; set; }

        ///<summary>
        ///The mode for this user
        ///</summary>
        [ApiMember(Description="The mode for this user")]
        public virtual UserModes UserMode { get; set; }

        ///<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 virtual string VoicemailGreetingId { get; set; }

        ///<summary>
        ///The endpoint's data
        ///</summary>
        [ApiMember(Description="The endpoint's data")]
        public virtual Struct Data { get; set; }

        ///<summary>
        ///The email address for email endpoints
        ///</summary>
        [ApiMember(Description="The email address for email endpoints")]
        public virtual string EmailAddress { get; set; }

        ///<summary>
        ///The first name of the user (for user endpoints)
        ///</summary>
        [ApiMember(Description="The first name of the user (for user endpoints)")]
        public virtual string UserFirstName { get; set; }

        ///<summary>
        ///The last name of the user (for user endpoints)
        ///</summary>
        [ApiMember(Description="The last name of the user (for user endpoints)")]
        public virtual string UserLastName { get; set; }

        ///<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 virtual string AvatarUrl { get; set; }

        ///<summary>
        ///Does this user have manager role?
        ///</summary>
        [ApiMember(Description="Does this user have manager role?")]
        public virtual UserManagerRoles ManagerRole { get; set; }

        ///<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 virtual List<DashboardPermissions> DashboardPermissions { get; set; }

        ///<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 virtual UserDataFieldModes MyFieldPermissions { get; set; }

        ///<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 virtual UserDataFieldModes CustomerFieldPermissions { get; set; }

        ///<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 virtual UserDataFieldModes OtherUserFieldPermissions { get; set; }

        ///<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 virtual UserDataFieldModes OtherEndpointFieldPermissions { get; set; }

        ///<summary>
        ///The name of this endpoint (for bots etc.)
        ///</summary>
        [ApiMember(Description="The name of this endpoint (for bots etc.)")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The list of tags for this endpoint
        ///</summary>
        [ApiMember(Description="The list of tags for this endpoint")]
        public virtual List<Tag> Tags { get; set; }

        ///<summary>
        ///The list of action URLs
        ///</summary>
        [ApiMember(Description="The list of action URLs")]
        public virtual List<EndpointActionUrl> ActionUrls { get; set; }

        ///<summary>
        ///The list of members in this team
        ///</summary>
        [ApiMember(Description="The list of members in this team")]
        public virtual List<string> TeamMemberIds { get; set; }

        ///<summary>
        ///Visibility of this user/team in contact lists
        ///</summary>
        [ApiMember(Description="Visibility of this user/team in contact lists")]
        public virtual CustomerVisibility ContactListVisibility { get; set; }

        ///<summary>
        ///The list of contacts personal to this user
        ///</summary>
        [ApiMember(Description="The list of contacts personal to this user")]
        public virtual List<EndpointContact> Contacts { get; set; }

        ///<summary>
        ///The documo ID for this number
        ///</summary>
        [ApiMember(Description="The documo ID for this number")]
        public virtual string DocumoId { get; set; }

        ///<summary>
        ///Integration data for this endpoint
        ///</summary>
        [ApiMember(Description="Integration data for this endpoint")]
        public virtual EntityIntegrationData IntegrationData { get; set; }

        ///<summary>
        ///Settings for third party phone system
        ///</summary>
        [ApiMember(Description="Settings for third party phone system")]
        public virtual ThirdPartyPhoneSystemSettings ThirdPartyPhoneSystemSettings { get; set; }

        ///<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 virtual bool OverrideAppSettings { get; set; }

        ///<summary>
        ///App / Portal settings for this user
        ///</summary>
        [ApiMember(Description="App / Portal settings for this user")]
        public virtual AppSettings AppSettings { get; set; }
    }

    public enum EndpointTypes
    {
        PhoneNumber,
        User,
        FaxNumber,
        EmailAddress,
        Unused_1,
        Unused_2,
        Unused_3,
        Unused_4,
        Unused_5,
        Team,
    }

    public partial class ScheduledFlow
    {
        public virtual string StateName { get; set; }
        public virtual string FlowId { get; set; }
        public virtual Struct FlowParams { get; set; }
    }

    public partial class ThirdPartyPhoneSystemSettings
    {
        public virtual ThirdPartyPhoneSystemTypes Type { get; set; }
        public virtual ThirdPartyPhoneSystemSettings.ThirdPartySipSettings SipSettings { get; set; }
        public virtual ThirdPartyPhoneSystemSettings.ThirdPartyDemoSettings DemoSettings { get; set; }
        public partial class ThirdPartyDemoSettings
        {
            public virtual string Extension { get; set; }
        }

        public partial class ThirdPartySipSettings
        {
            public ThirdPartySipSettings()
            {
                Accounts = new List<ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings>{};
            }

            public virtual List<ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.ThirdPartySipAccountSettings> Accounts { get; set; }
            public enum TransportTypes
            {
                UDP,
                TLS,
                TCP,
                PERS,
            }

            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,
            }

            public enum DtmfMethods
            {
                RFC2833,
                INFO,
            }

            public partial class ThirdPartySipAccountSettings
            {
                public ThirdPartySipAccountSettings()
                {
                    AudioCodecs = new List<ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes>{};
                }

                public virtual string Number { get; set; }
                public virtual string Agent { get; set; }
                public virtual string AuthName { get; set; }
                public virtual string UserName { get; set; }
                public virtual string DisplayName { get; set; }
                public virtual string Password { get; set; }
                public virtual string UserDomain { get; set; }
                public virtual int RegistrationExpires { get; set; }
                public virtual ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.TransportTypes TransportType { get; set; }
                public virtual string LocalIP { get; set; }
                public virtual int LocalPort { get; set; }
                public virtual string SipServer { get; set; }
                public virtual int SipServerPort { get; set; }
                public virtual string OutboundServer { get; set; }
                public virtual int OutboundServerPort { get; set; }
                public virtual string StunServer { get; set; }
                public virtual int StunPort { get; set; }
                public virtual string AudioPlaybackDeviceName { get; set; }
                public virtual string AudioRecordingDeviceName { get; set; }
                public virtual List<ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.AudioCodecTypes> AudioCodecs { get; set; }
                public virtual ThirdPartyPhoneSystemSettings.ThirdPartySipSettings.DtmfMethods DTMFMethod { get; set; }
            }

        }

    }

    public enum ThirdPartyPhoneSystemTypes
    {
        Demo,
        Sip,
    }

    public enum TwilioSipRegions
    {
        NorthAmericaVirginia,
        NorthAmericaOregon,
        EuropeIreland,
        EuropeFrankfurt,
        AsiaPacificSingapore,
        AsiaPacificTokyo,
        AsiaPacificSydney,
        SouthAmericaSanPaolo,
    }

    public enum UserDataFieldModes
    {
        Hidden,
        ReadOnly,
        ReadWrite,
    }

    public enum UserManagerRoles
    {
        None,
        Manager,
        VoicemailAndCallHistory,
        Custom,
    }

    public enum UserModes
    {
        SoftPhone,
        Sip,
        Flow,
        DataOnly,
        ThirdParty,
    }

}

namespace Voice.Api.Flows.Data
{
    public partial class Struct
        : Dictionary<string, Value>
    {
    }

    public partial class Value
    {
        public Value()
        {
            ListValue = new List<Struct>{};
        }

        public virtual bool? BoolValue { get; set; }
        public virtual string StringValue { get; set; }
        public virtual double? NumberValue { get; set; }
        public virtual List<Struct> ListValue { get; set; }
        public virtual Struct StructValue { get; set; }
    }

}

namespace Voice.Api.Integrations
{
    public partial class EntityIntegrationData
        : Dictionary<string, IntegrationData>
    {
    }

    public partial class IntegrationData
    {
        public virtual string ThirdPartyId { get; set; }
    }

}

namespace Voice.Api.Scheduling
{
    public partial class Schedule
    {
        public Schedule()
        {
            Rules = new List<SchedulingRule>{};
        }

        public virtual string TimeZoneId { get; set; }
        public virtual bool Inherit { get; set; }
        public virtual bool ForceClosed { get; set; }
        public virtual List<SchedulingRule> Rules { get; set; }
        public virtual string DefaultState { get; set; }
    }

    public partial class ScheduleDay
    {
        public virtual int Offset { get; set; }
        public virtual DayOfWeek DayOfWeek { get; set; }
    }

    public partial class SchedulingRule
    {
        public SchedulingRule()
        {
            BySetPosition = new List<int>{};
            ByMonth = new List<int>{};
            ByWeekNo = new List<int>{};
            ByYearDay = new List<int>{};
            ByMonthDay = new List<int>{};
            ByDay = new List<ScheduleDay>{};
            ByHour = new List<int>{};
            ByMinute = new List<int>{};
        }

        public virtual string Id { get; set; }
        public virtual string Name { get; set; }
        public virtual int Priority { get; set; }
        public virtual string State { get; set; }
        public virtual string Source { get; set; }
        public virtual string Condition { get; set; }
        public virtual SimpleSchedulingRuleTypes SimpleRuleType { get; set; }
        public virtual string CustomerState { get; set; }
        public virtual string FlowId { get; set; }
        public virtual Struct FlowParams { get; set; }
        public virtual bool IsAllDay { get; set; }
        public virtual string StartDate { get; set; }
        public virtual string StartTime { get; set; }
        public virtual string EndTime { get; set; }
        public virtual List<int> BySetPosition { get; set; }
        public virtual List<int> ByMonth { get; set; }
        public virtual List<int> ByWeekNo { get; set; }
        public virtual List<int> ByYearDay { get; set; }
        public virtual List<int> ByMonthDay { get; set; }
        public virtual List<ScheduleDay> ByDay { get; set; }
        public virtual List<int> ByHour { get; set; }
        public virtual List<int> ByMinute { get; set; }
        public virtual int Interval { get; set; }
        public virtual int Count { get; set; }
        public virtual string UntilDate { get; set; }
        public virtual SchedulingRuleFrequency Frequency { get; set; }
    }

    public enum SchedulingRuleFrequency
    {
        None,
        Secondly,
        Minutely,
        Hourly,
        Daily,
        Weekly,
        Monthly,
        Yearly,
    }

    public enum SimpleSchedulingRuleTypes
    {
        Always,
        CustomerState,
        Time,
    }

}

namespace Voice.Api.Settings
{
    public partial class Tag
    {
        public virtual string Id { get; set; }
        public virtual string Name { get; set; }
        public virtual TagColors Color { get; set; }
    }

    public enum TagColors
    {
        Magenta,
        Red,
        Volcano,
        Orange,
        Gold,
        Lime,
        Green,
        Cyan,
        Blue,
        GeekBlue,
        Purple,
    }

}

C# 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"}