JSON API » outcosts » outcosts/create

Creates a new outbound call cost.

Input parameters

Requires authentication and the system role privilege if specifying a peer or the commerce role privilege if specifying a rate plan.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
outgroup_timeIntegerID of the outgroup_time.Yes
peerIntegerID of peer.Yes, unless plan is specified.None.
planIntegerID of rate plan.Yes, unless peer is specified.None.
connectfeeDecimalA connect fee charged on answer.No0.00
costDecimalThe cost per minute after the included seconds are used.No0.00
descriptionStringDescription.NoEmpty string.
endIntegerThe Unix timestamp after which this cost no longer applies. -1 for never.No-1
includedIntegerThe number of seconds included free with the connectfee.No0
incrementIntegerBilling increment in seconds.No1
messageDecimalThe cost to send a message.No0.00
minimumDecimalAn overall minimum cost for the call if answered.No0.00
priorityIntegerThe priority from 1 to 10.No1
startIntegerThe Unix timestamp from which this cost applies.No-1
validationInteger1 to validate input then return, 0 for full action.No0

Specify peer or plan, but not both.

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.
403Your rate plan not allow this.

Data returned

No data is returned.

Example: With peer, and zero costs

http://enswitch.example.com/api/json/outcosts/create/?auth_username=user;auth_password=password;outgroup_time=123;peer=1

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.13Function added.