Update Application
Makes changes to an application. POST a new JSON representation with the property values you desire to the URL that you got back in the "Location" header when you first created it.
Request URL
POST
https://api.catapult.inetwork.com/v1/users/{userId}/applications/{applicationId}
Supported Parameters
Parameter | Description | Mandatory |
---|---|---|
name | A name you choose for this application. | Yes |
incomingCallUrl | A URL where call events will be sent for an inbound call. | No |
incomingCallUrlCallbackTimeout | Determine how long should the platform wait for incomingCallUrl's response before timing out in milliseconds. Default Time: 10000 (10s) Maximum Time: 10000 (10s) |
No |
incomingCallFallbackUrl | The URL used to send the callback event if the request to incomingCallUrl fails. | No |
incomingMessageUrl | A URL where message events will be sent for an inbound SMS message. | No |
incomingMessageUrlCallbackTimeout | Determine how long should the platform wait for incomingMessageUrl's response before timing out in milliseconds. Default Time: 10000 (10s) Maximum Time: 10000 (10s) |
No |
incomingMessageFallbackUrl | The URL used to send the callback event if the request to incomingMessageUrl fails. | No |
callbackHttpMethod | Determine if the HTTP callback event should be sent via GET or POST. Default is POST. | No |
autoAnswer | Determines whether or not an incoming call should be automatically answered. Default value is 'true'. | No |
Example 1 of 1: Update Application
curl -v -X POST https://api.catapult.inetwork.com/v1/users/{userId}/applications/{applicationId} -u {token}:{secret} -H "Content-type: application/json" -d
'
{
"incomingCallUrl": "http://different.example.com/calls.php"
}
'
// Promise
client.Application.update('a-j4f2j6vjmqz53mq', {
name: 'Rename App1',
autoAnswer: false
})
.then(function (response) {
console.log(response);
});
// Callback
client.Application.update('a-zudcfzzrbea',
{
name: 'Rename App2',
autoAnswer: false
},
function (err, response) {
if (err) {
console.log(err);
}
else {
console.log(response);
}
});
await client.Application.UpdateAsync("a-zuwwfzzrbea", new UpdateApplicationData{
Name = "Rename App2",
AutoAnswer = false
});
app.update({:name => "Rename App2", :auto_answer => false})