Modify an application using this API.

API Endpoint

POST
https://api.plivo.com/v1/Account/{auth_id}/Application/{app_id}/

Arguments

NameTypeDescription
answer_urlstringThe URL invoked when a call executes this application.
answer_methodstringThe method used to call the answer_url. Defaults to POST.
hangup_urlstringThe URL notified when the call hangs up.
hangup_methodstringThe method used to call the hangup_url. Defaults to POST.
fallback_answer_urlstringInvoked by Plivo only if answer_url is unavailable or the XML response is invalid. Should contain a XML response.
fallback_methodstringThe method used to call the fallback_answer_url. Defaults to POST.
message_urlstringThe URL that is notified by Plivo when an inbound message is received.
message_methodstringThe method used to call the message_url. Defaults to POST.
default_number_appbooleanIf set to true, associates all newly created Plivo numbers that have not specified an app_id to this application.
Takes a value of True or False.
default_endpoint_appbooleanIf set to true, associates all newly created Plivo endpoints that have not specified an app_id to this application.
Takes a values of True or False.
subaccountstringID of the subaccount with which this application is associated.
log_incoming_messagesbooleanThis flag controls whether incoming messages to phone numbers associated with the Application are logged in Plivo systems or not.
When set to false, message content is not logged in any Plivo system, including the debug logs visible on the console.
Additionally, the last three digits of the from number are redacted in all system logs and in the Message Detail Record (MDR). The default value of this parameter is true.

Request

import plivo

client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.applications.update(
    app_id='21686794894743506',
    answer_url='https://updated.answer.url', )
print(response)

# You can updated an application directly using the application object
application = client.applications.get('21686794894743506')
application.update(
    answer_url='https://updated.answer.url', )
print(response)

Response

HTTP Status Code: 202
{
"message": "changed",
"api_id": "5a9fcb68-582d-11e1-86da-6ff39efcb949"
}