JSON API » unlimited » unlimited/create

Creates a new unlimited access account.

Input parameters

Requires authentication and the commerce role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
nameStringName.Yes
callerid_externalStringCallerid on external calls. Empty string for unknown.NoEmpty string.
callerid_internalStringCallerid on internal calls. Empty string for unknown.NoEmpty string.
cosIntegerID of class of service. 0 for default. 1 for system COS that allows all calls.No0
currencyStringCurrency prices are in.NoSystem currency.
customerIntegerID of customer to create in.NoCustomer of authentication user.
days_weekStringDays of the week when active, separated by commas. Monday=1, Sunday=7. For example, "1,2,3,4,5" for week days.No"1,2,3,4,5,6,7"
descriptionStringDescription.NoEmpty string.
dialplanStringDial plan for outbound calls. Empty string for default dial plan.NoEmpty string.
endhourIntegerEnd hour from 0 to 23.No23
endminuteIntegerEnd minute from 0 to 59.No59
endsecondIntegerEnd second from 0 to 59No59
lockedInteger1 if account is locked, 0 if not.No0
maximum_connectfeeDecimalMaximum connect fee on outbound call to allow. -1 for no limit.No-1
maximum_costDecimalMaximum cost per minute on outbound call to allow. -1 for no limit.No-1
maximum_secondsIntegerMaximum seconds to let outbound call run for. -1 for no limited.No-1
minimum_percentageDecimalMinimum profit margin as a percentage to allow outbound call.No0.0
minimum_profitDecimalMinimum profit per minute to allow outbound call.No0.00
panelInteger1 to show in control panel, 0 not to.No0
ring_after_answerIntegerSeconds to play ringing for after answering. 0 to disable.No0
starthourIntegerStart hour from 0 to 23.No0
startminuteIntegerStart minute from 0 to 59.No0
startsecondIntegerStart second from 0 to 59.No0
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
200Success.
201Input passed validation. Only returned if validation=1.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.

Data returned

The ID of the created unlimited access account.

Example: With required parameters

http://enswitch.example.com/api/json/unlimited/create/?auth_username=user;auth_password=password;name=example

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123 } }

Change history

VersionChanges
3.14cos input parameter changed to allow 0 for default and 1 to allow all calls.
3.13Function added.