Skip to main content
An Application is a set of Answer, Hangup, and Message URLs that help you control your incoming calls and messages. API Endpoint

The Application Object

Attributes

app_id
string
Unique identifier for the application.
app_name
string
A friendly name for your Plivo application.
answer_url
string
URL requested when an incoming call is received. Must return valid Plivo XML.
answer_method
string
HTTP method for the answer_url. Values: GET or POST.
hangup_url
string
URL notified when the call hangs up.
hangup_method
string
HTTP method for the hangup_url.
fallback_answer_url
string
URL requested when answer_url fails or returns invalid XML.
fallback_method
string
HTTP method for the fallback_answer_url.
message_url
string
URL notified when an inbound SMS is received.
message_method
string
HTTP method for the message_url.
default_app
boolean
Whether this is the default app.
enabled
boolean
Whether the application is enabled.
public_uri
boolean
Whether the app can be called from external SIP services.
sip_uri
string
SIP URI of the application.
sip_auth_type
string
SIP authentication mode for inbound calls to the application. Values: ip_acl, credential, ip_acl_and_credential, or "" (empty, no authentication). Inbound auth applies only when the SIP INVITE Request-URI is sip:{app_id}@app.plivo.com. Changing to a mode that does not use a credential or IP ACL automatically clears the corresponding credential_uuid / ip_acl_uuid on the application (e.g., setting to ip_acl clears any previously set credential_uuid). See SIP Authentication.
ip_acl_uuid
string
UUID (36 characters) of the IP Access Control List assigned to this application. Required when sip_auth_type is ip_acl or ip_acl_and_credential. Create via SIP Authentication API.
credential_uuid
string
UUID (36 characters) of the SIP credential assigned to this application. Required when sip_auth_type is credential or ip_acl_and_credential. Create via SIP Authentication API.
sub_account
string
Subaccount associated with the application. Null if main account.
log_incoming_messages
boolean
Whether incoming message content is logged. Default: true.
resource_uri
string
URI of the application resource.

Example Object

Answer URL Parameters

When a call is received, Plivo sends these parameters to your answer_url:

Hangup URL Parameters

Message URL Parameters


Create an Application

Creates a new application.

Arguments

app_name
string
required
Application name. Allowed: alphanumeric, hyphen (-), underscore (_).
answer_url
string
required
URL fetched when a call executes this application.
answer_method
string
HTTP method for answer_url. Default: POST.
hangup_url
string
URL notified when call hangs up. Default: answer_url.
hangup_method
string
HTTP method for hangup_url. Default: POST.
fallback_answer_url
string
Fallback URL if answer_url fails.
fallback_method
string
HTTP method for fallback_answer_url. Default: POST.
message_url
string
URL notified for inbound messages.
message_method
string
HTTP method for message_url. Default: POST.
default_number_app
boolean
Make this the default app for new numbers.
default_endpoint_app
boolean
Make this the default app for new endpoints.
subaccount
string
Subaccount ID to associate with this application.
log_incoming_messages
boolean
Log incoming message content. Default: true.

Example

Response

message
string
Status of the request. Returns created on a successful creation.
app_id
string
Unique identifier for the application.
api_id
string
Unique identifier for the API request.

Retrieve an Application

Get details of a specific application.

Arguments

No arguments required.

Example

Response

answer_method
string
HTTP method for the answer_url. Values: GET or POST.
answer_url
string
URL requested when an incoming call is received. Must return valid Plivo XML.
app_id
string
Unique identifier for the application.
app_name
string
A friendly name for your Plivo application.
default_app
boolean
Whether this is the default app.
enabled
boolean
Whether the application is enabled.
fallback_answer_url
string
URL requested when answer_url fails or returns invalid XML.
fallback_method
string
HTTP method for the fallback_answer_url.
hangup_method
string
HTTP method for the hangup_url.
hangup_url
string
URL notified when the call hangs up.
message_method
string
HTTP method for the message_url.
message_url
string
URL notified when an inbound SMS is received.
public_uri
boolean
Whether the app can be called from external SIP services.
resource_uri
string
URI of the application resource.
sip_uri
string
SIP URI of the application.
sub_account
string
Subaccount associated with the application. Null if main account.
log_incoming_messages
boolean
Whether incoming message content is logged. Default: true.

List All Applications

Returns all applications sorted by creation date.

Arguments

subaccount
string
Filter by subaccount ID.
app_name
string
Filter by app name prefix.
limit
integer
Results per page. Maximum 20.
offset
integer
Pagination offset.

Example

Response

api_id
string
Unique identifier for the API request.
meta
object
Pagination metadata: limit (results per page), offset (items skipped), total_count (total matching applications).
objects
array
Array of application objects — see The Application Object.

Update an Application

Modify an existing application.

Arguments

answer_url
string
URL fetched when a call executes this application.
answer_method
string
HTTP method for answer_url.
hangup_url
string
URL notified when call hangs up.
hangup_method
string
HTTP method for hangup_url.
fallback_answer_url
string
Fallback URL if answer_url fails.
fallback_method
string
HTTP method for fallback_answer_url.
message_url
string
URL notified for inbound messages.
message_method
string
HTTP method for message_url.
default_number_app
boolean
Make this the default app for new numbers.
default_endpoint_app
boolean
Make this the default app for new endpoints.
subaccount
string
Subaccount ID to associate.
log_incoming_messages
boolean
Log incoming message content.
sip_auth_type
string
SIP authentication mode for inbound calls. Values: ip_acl, credential, ip_acl_and_credential, or "" (empty to disable). See SIP Authentication.
ip_acl_uuid
string
UUID of the IP Access Control List to assign. Required when sip_auth_type includes ip_acl. Create one via the SIP Authentication API.
credential_uuid
string
UUID of the SIP credential to assign. Required when sip_auth_type includes credential. Create one via the SIP Authentication API.
You cannot delete a credential or IP ACL that is currently assigned to an application. Remove the assignment first by setting sip_auth_type to empty.

Example

Response

message
string
Status of the request. Returns changed on a successful update.
api_id
string
Unique identifier for the API request.

Delete an Application

Permanently deletes an application.

Arguments

cascade
boolean
Delete associated endpoints. Default: true.
new_endpoint_application
string
App ID to reassign endpoints to when cascade is false.

Example

Response