Docs

Create application

https://api.apifonica.com/v2/accounts/{accountSID}/applications

Overview

Applications are created by making POST requests to /accounts/{accountSID}/applications.

The table below lists parameters specified while making this request.

Required parameters:

ParameterDescription
controller

URL which will be used to make a request for an XML controller file (for voice calls) or application file (for messaging events).

method

Method which will be used to make a request.

Optional parameters:

ParameterDescriptionDefault
name

Application name.

account_sid
events

The call progress events that Apifonica will send webhooks on. Can be none (default), all (for all events) or selected events divided by vertical line (f.e. answered|completed)

none

Request example

curl –X POST https://api.apifonica.com/v2/accounts/{accountSID}/applications \
-H 'Content-Type: application/json' \
-d '{
      "controller": "http://172.16.102.175:8082/messages/events",
      "method": "GET",
      "name": "MyApp1"
    }' \
-u {accountSID}:{authToken}

Response example

{
  "status_code": 201,
  "status_message": "CREATED",
  "uri": "/v2/accounts/{accountSID}/applications/{applicationSID}"
}