Creating/adding new resources will always use the HTTP POST
verb, and will follow the same pattern:
Populate the appropriate JSON object with valid data and set the ID to zero.
Call the URL, with the object in the body of the message.
The ID of the new resource will be returned in the result.
For example, to create a new Class Of Service:
POST ivrapi/ClassesOfService
[
{
"CosId": 0,
"Cos": "My New Class Of Service",
"Options": "",
"OptionsArray":
[
"NFP",
"ALIAS",
"@AUTODIALER"
],
"ExpireDate": "2020-02-09",
"GmtOffset": 0,
"CurrencyId": 0,
"Currency": "",
"LanguageId": 0,
"Language": "",
"RateScheduleId": 106,
"RateSchedule": "",
"SalesGroupId": 0,
"SalesGroup": "",
"TaxGroupId": 0,
"TaxGroup": "",
"PublicCos": true
}
]
Result
{
"status":"success",
"message":"",
"data":{
"CosId":50
}
}