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
Unique identifier for the application.
A friendly name for your Plivo application.
URL requested when an incoming call is received. Must return valid Plivo XML.
HTTP method for the answer_url. Values:
GET or POST.URL notified when the call hangs up.
HTTP method for the hangup_url.
URL requested when answer_url fails or returns invalid XML.
HTTP method for the fallback_answer_url.
URL notified when an inbound SMS is received.
HTTP method for the message_url.
Whether this is the default app.
Whether the application is enabled.
Whether the app can be called from external SIP services.
SIP URI of the application.
Subaccount associated with the application. Null if main account.
Whether incoming message content is logged. Default:
true.URI of the application resource.
Example Object
Answer URL Parameters
When a call is received, Plivo sends these parameters to your answer_url:| Parameter | Description |
|---|---|
| CallUUID | Unique identifier for this call |
| From | Caller’s phone number with country code |
| To | Called phone number with country code |
| CallStatus | Call status: ringing, in-progress, or completed |
| Direction | Call direction: inbound or outbound |
| ForwardedFrom | Present only for forwarded calls |
| ALegUUID | First leg UUID for outbound calls |
| ALegRequestUUID | Request UUID for API-initiated outbound calls |
Hangup URL Parameters
| Parameter | Description |
|---|---|
| CallUUID | Unique identifier for this call |
| From | Caller’s phone number |
| To | Called phone number |
| CallStatus | Final call status |
| Direction | Call direction |
| Duration | Call duration in seconds |
| BillDuration | Billed duration in seconds |
| HangupCauseName | Reason for hangup |
| HangupCauseCode | Hangup cause code |
| HangupSource | Entity that triggered hangup |
Message URL Parameters
| Parameter | Description |
|---|---|
| From | Source number of incoming message |
| To | Your Plivo number that received the message |
| Type | Always sms |
| Text | Message content |
| MessageUUID | Unique message identifier |
Create an Application
Creates a new application.Arguments
Application name. Allowed: alphanumeric, hyphen (-), underscore (_).
URL fetched when a call executes this application.
HTTP method for answer_url. Default:
POST.URL notified when call hangs up. Default: answer_url.
HTTP method for hangup_url. Default:
POST.Fallback URL if answer_url fails.
HTTP method for fallback_answer_url. Default:
POST.URL notified for inbound messages.
HTTP method for message_url. Default:
POST.Make this the default app for new numbers.
Make this the default app for new endpoints.
Subaccount ID to associate with this application.
Log incoming message content. Default:
true.Example
Response
Retrieve an Application
Get details of a specific application.Arguments
No arguments required.
Example
Response
List All Applications
Returns all applications sorted by creation date.Arguments
Filter by subaccount ID.
Filter by app name prefix.
Results per page. Maximum 20.
Pagination offset.
Example
Response
Update an Application
Modify an existing application.Arguments
URL fetched when a call executes this application.
HTTP method for answer_url.
URL notified when call hangs up.
HTTP method for hangup_url.
Fallback URL if answer_url fails.
HTTP method for fallback_answer_url.
URL notified for inbound messages.
HTTP method for message_url.
Make this the default app for new numbers.
Make this the default app for new endpoints.
Subaccount ID to associate.
Log incoming message content.
Example
Response
Delete an Application
Permanently deletes an application.Arguments
Delete associated endpoints. Default:
true.App ID to reassign endpoints to when cascade is
false.