Reference Turnkey Applications Tutorials Visual Designer
    • REST API
      • Overview
      • API Endpoint
      • Authentication
      • Requests
      • Responses
      • Paging
      • Reason Codes Dictionary
    • Management APIs
      • Accounts
      • Applications
      • Clients
        • Create a Client
        • Delete a Client
        • Change Client’s Password
        • Get a List of Available Clients
      • Incoming Phone Numbers
        • IncomingPhoneNumber Instance Resource
        • IncomingPhoneNumbers List Resource
        • Local IncomingPhoneNumber Factory Resource
        • Toll-Free IncomingPhoneNumber Factory Resource
        • Mobile IncomingPhoneNumber Factory Resource
        • Attach a phone number to an application
        • Delete a phone number
        • List of Phone Numbers
        • Incoming Phone Number Regex Support
      • Notifications
      • Usage Records
    • Voice
      • Calls
        • Call List Resource URI
        • Making a Call
        • Modifying Live Calls
        • Examples
        • List Filter
        • Paging Information
      • Conference Management
        • Supported Operations
        • Conference List Resource URI
      • Conference Participants Management
        • Participants List Resource URI
      • Recordings
      • SIP Refer Support
    • SMS
      • Messages
        • Send SMS
        • Get SMS List
        • Get single SMS Information
        • SMS Attributes
      • Email
    • RCML
      • Overview
        • Interacting with Your Application
        • RCML Verbs
      • Dial
        • Client
        • Conference
        • Number
        • SIP
      • Email
      • Gather
      • Say
      • Play
      • SMS
      • Hangup
      • Pause
      • Redirect
      • Record
      • Reject
    • Turnkey Apps APIs
      • Smart 2FA
        • Send OTPs
        • Verify OTPs
        • Control OTPs
        • Limit
          • Create Limit
          • Update Limit
          • Delete Limit
          • Get List of Limits
      • Call Queuing
      • Auto Attendant
        • User
        • Announcement
        • Auto Attendant System
        • Menu
        • Schedule
        • Phone Number
        • RCML
        • Usage Records
      • Number Masking
        • Application
        • Mask Number Pool
        • Context
        • Participants
        • Interactions
        • Usage Records
      • Task Router
      • Campaign Manager
        • Create Campaign
        • Update Campaign
        • Delete Campaign
        • Get List of Campaigns
        • Get Single Campaign
        • Get List of Credits
        • Get Single Credit
docs 1.0
  • docs
    • 1.0
  • docs
  • Enterprise:Management APIs
  • Enterprise:Applications

Applications

Applications

An Application instance resource represents a RCML set of instructions used by a CPaaS interpreter to process an on-going call or SMS.

Restcomm stores only part of the metadata for this Application, which contains as one of its attributes the URL with the address of the application server where the RCML can be retrieved.

Currently there are 3 types of Applications that are supported: Voice and SMS. Each type of Application will be used by its specific interpreter.

Considering the access control executed by multi-tenancy, each Application can be created, read, updated or deleted by its owner solely. Any attempt of access to an Application using an account different than its owner will be denied.

Applications Resource URI

2012-04-24/Accounts/{AccountSid}/Applications/{ApplicationSid}

Supported Operations

HTTP GET Returns the representation of an Application resource, including the properties described on the table "Resource Properties".

HTTP POST and PUT Modifies an Application resource and returns the representation, including the properties described on the table "Resource Properties". The table below describes a list of optional parameters.

Request Parameters

You may specify one or more of the following parameters to update this Application’s respective properties:

PROPERTY

DESCRIPTION

FriendlyName

A friendly name for this Application.

VoiceCallerIdLookup

Look up the caller’s caller-ID name from the CNAM database. Either true or false.

RcmlUrl

The HTTP address that Restcomm will use to get the RCML of this Application.

Kind

The kind of this Application. (Supported values: voice or SMS)

HTTP DELETE

Remove the Application from Restcomm's database. This Application will not be displayed anymore at the list of available applications while using AdminUI, consequently, not possible to be assigned to a Restcomm Number or Client. If successful, returns an HTTP 204 response with no body.

Applications List

Applications List Resource URI

2012-04-24/Accounts/{AccountSid}/Applications

Supported Operations

HTTP GET Returns a list of Applications resource representations, each representing a application given to your account.

List Filters Given the rules of multi-tenancy, the list of applications is automatically filtered using the informed account to authenticate, returning all the applications owned by this account. No additional filters are currently supported.

HTTP POST Create a new Application resource with the information provided by the required and optional parameters described by the tables below.

Required Parameters

Your request must include exactly the following parameters:

PROPERTY

DESCRIPTION

FriendlyName

A friendly name for this Application.

Optional Parameters

Your request may include the following parameters:

PROPERTY

DESCRIPTION

ApiVersion

Version of the API applied to this Application.

HasVoiceCallerIdLookup

Look up the caller’s caller-ID name from the CNAM database. Either true or false.

RcmlUrl

The HTTP address that Restcomm will use to get the RCML of this Application.

Kind

The kind of this Application. (Supported values: voice or SMS)

HTTP PUT Not supported.

HTTP DELETE Not supported.

Create an Application

curl -X POST https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Applications.json  \
   -d 'FriendlyName=ApplicationFooBar' \
   -d 'ApiVersion=2012-04-24' \
   -d 'HasVoiceCallerIdLookup=false' \
   -d 'RcmlUrl=http://mycompany.com/visual-designer/services/apps/foobar/controller' \
   -d 'Kind=voice' \
   -u 'YourAccountSid:YourAuthToken'
const request = require('request');

// Provide your Account Sid and Auth Token from your Console Account page
const ACCOUNT_SID = 'my_ACCOUNT_SID';
const AUTH_TOKEN = 'my_AUTH_TOKEN';

request.({
      method: 'POST',
      url: 'https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Applications.json',
      auth: { 'user': ACCOUNT_SID, 'pass': AUTH_TOKEN },
      form: {
         'FriendlyName': 'ApplicationFooBar',
         'ApiVersion': '2012-04-24',
         'HasVoiceCallerIdLookup': 'false',
         'RcmlUrl': 'http://mycompany.com/visual-designer/services/apps/foobar/controller',
         'Kind': 'voice'
      }
   },
   function (error, response, body) {
      // Add your business logic below; status can be found at 'response.statusCode' and response body at 'body'
      ...
});
from http.client import HTTPSConnection
from base64 import b64encode
from urllib.parse import urlencode

# Provide your Account Sid and Auth Token from your Console Account page
ACCOUNT_SID = 'my_ACCOUNT_SID'
AUTH_TOKEN = 'my_AUTH_TOKEN'

userAndPass = b64encode(bytes(ACCOUNT_SID + ':' + AUTH_TOKEN, 'utf-8')).decode("ascii")
headers = { 'Authorization' : 'Basic %s' %  userAndPass,
    'Content-type': 'application/x-www-form-urlencoded',
    'Accept': 'text/plain' }

# Update POST parameters accordingly
params = urlencode({
   'FriendlyName': 'ApplicationFooBar',
   'ApiVersion': '2012-04-24',
   'HasVoiceCallerIdLookup': 'false',
   'RcmlUrl': 'http://mycompany.com/visual-designer/services/apps/foobar/controller',
   'Kind': 'voice'
})

conn = HTTPSConnection('mycompany.restcomm.com')
conn.request("POST", '/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Applications.json',
      params, headers=headers)
res = conn.getresponse()

# Add your business logic below; status can be found at 'res.status', reason at 'res.reason' and response body can be retrieved with res.read()
...
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import java.io.*;
import java.util.Base64;

public class JavaSampleClass {
   // Provide your Account Sid and Auth Token from your Console Account page
   public static final String ACCOUNT_SID = "my_ACCOUNT_SID";
   public static final String AUTH_TOKEN = "my_AUTH_TOKEN";


   public static void main(String[] args) throws Exception {
      String userAndPass = ACCOUNT_SID + ':' + AUTH_TOKEN;
      String encoded = Base64.getEncoder().encodeToString(userAndPass.getBytes());

      URL url = new URL(("https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/" + ACCOUNT_SID + "/Applications.json");
      HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
      conn.setRequestProperty("Authorization", "Basic " + encoded);
      conn.setRequestMethod("POST");
      conn.setDoOutput(true);
      DataOutputStream os = new DataOutputStream(conn.getOutputStream());

      // Update POST parameters accordingly
      os.writeBytes("FriendlyName=ApplicationFooBar&" +
        "ApiVersion=2012-04-24&" +
        "HasVoiceCallerIdLookup=false&" +
        "RcmlUrl=http://mycompany.com/visual-designer/services/apps/foobar/controller&" +
        "Kind=voice");
      os.close();

      // Add your business logic below; response code can be obtained from 'conn.getResponseCode()' and input stream from 'conn.getInputStream()'
      ...
  }
}

The output of the command will be similar to the one below

[
  {
    "sid": "AP83bb8e14fa394ff8937b0bf7a444ba6d",
    "date_created": "Mon, 16 Nov 2015 06:26:55 +0000",
    "date_updated": "Sat, 30 Apr 2016 13:43:45 +0000",
    "friendly_name": "ABCauto",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "api_version": "2012-04-24",
    "voice_caller_id_lookup": false,
    "uri": "/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
    "rcml_url": "/visual-designer/services/apps/APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/controller",
    "kind": "voice"
  }
]

Update a Application

curl -X POST https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Applications/APPLICATION_SID.json  \
   -d 'FriendlyName=Application X' \
   -u 'YourAccountSid:YourAuthToken'
const request = require('request');

// Provide your Account Sid and Auth Token from your Console Account page
const ACCOUNT_SID = 'my_ACCOUNT_SID';
const AUTH_TOKEN = 'my_AUTH_TOKEN';
// Provide additional path parameters if applicable
const APPLICATION_SID = 'my_APPLICATION_SID'

request.({
      method: 'POST',
      url: 'https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Applications/' + APPLICATION_SID + '.json',
      auth: { 'user': ACCOUNT_SID, 'pass': AUTH_TOKEN },
      form: {
         'FriendlyName': 'Application X'
      }
   },
   function (error, response, body) {
      // Add your business logic below; status can be found at 'response.statusCode' and response body at 'body'
      ...
});
from http.client import HTTPSConnection
from base64 import b64encode
from urllib.parse import urlencode

# Provide your Account Sid and Auth Token from your Console Account page
ACCOUNT_SID = 'my_ACCOUNT_SID'
AUTH_TOKEN = 'my_AUTH_TOKEN'
// Provide additional path parameters if applicable
APPLICATION_SID = 'my_APPLICATION_SID'

userAndPass = b64encode(bytes(ACCOUNT_SID + ':' + AUTH_TOKEN, 'utf-8')).decode("ascii")
headers = { 'Authorization' : 'Basic %s' %  userAndPass,
    'Content-type': 'application/x-www-form-urlencoded',
    'Accept': 'text/plain' }

# Update POST parameters accordingly
params = urlencode({
   'FriendlyName': 'Application X'
})

conn = HTTPSConnection('mycompany.restcomm.com')
conn.request("POST", '/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Applications/' + APPLICATION_SID + '.json',
      params, headers=headers)
res = conn.getresponse()

# Add your business logic below; status can be found at 'res.status', reason at 'res.reason' and response body can be retrieved with res.read()
...
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import java.io.*;
import java.util.Base64;

public class JavaSampleClass {
   // Provide your Account Sid and Auth Token from your Console Account page
   public static final String ACCOUNT_SID = "my_ACCOUNT_SID";
   public static final String AUTH_TOKEN = "my_AUTH_TOKEN";
   // Provide additional path parameters if applicable
   public static final String APPLICATION_SID = "my_APPLICATION_SID"

   public static void main(String[] args) throws Exception {
      String userAndPass = ACCOUNT_SID + ':' + AUTH_TOKEN;
      String encoded = Base64.getEncoder().encodeToString(userAndPass.getBytes());

      URL url = new URL(("https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/" + ACCOUNT_SID + "/Applications/" + APPLICATION_SID + ".json");
      HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
      conn.setRequestProperty("Authorization", "Basic " + encoded);
      conn.setRequestMethod("POST");
      conn.setDoOutput(true);
      DataOutputStream os = new DataOutputStream(conn.getOutputStream());

      // Update POST parameters accordingly
      os.writeBytes("FriendlyName=Application X");
      os.close();

      // Add your business logic below; response code can be obtained from 'conn.getResponseCode()' and input stream from 'conn.getInputStream()'
      ...
  }
}

The output of the command will be similar to the one below

{
  "sid": "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "date_created": "Wed, 27 Apr 2016 21:38:59 +0000",
  "date_updated": "Sat, 30 Apr 2016 13:43:44 +0000",
  "friendly_name": "Jane's Bridge",
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "api_version": "2012-04-24",
  "voice_caller_id_lookup": false,
  "uri": "/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
  "rcml_url": "/visual-designer/services/apps/APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/controller",
  "kind": "voice"
}

Delete a Application

curl -X DELETE https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Applications/APPLICATION_SID.json  \
   -u 'YourAccountSid:YourAuthToken'
const request = require('request');

// Provide your Account Sid and Auth Token from your Console Account page
const ACCOUNT_SID = 'my_ACCOUNT_SID';
const AUTH_TOKEN = 'my_AUTH_TOKEN';
// Provide additional path parameters if applicable
const APPLICATION_SID = 'my_APPLICATION_SID'

request({
      method: 'DELETE',
      url: 'https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Applications/' + APPLICATION_SID + '.json',
      auth: { 'user': ACCOUNT_SID, 'pass': AUTH_TOKEN }
   },
   function (error, response, body) {
      // Add your business logic below; status can be found at 'response.statusCode' and response body at 'body'
      ...
   }
);
from http.client import HTTPSConnection
from base64 import b64encode

# Provide your Account Sid and Auth Token from your Console Account page
ACCOUNT_SID = 'my_ACCOUNT_SID'
AUTH_TOKEN = 'my_AUTH_TOKEN'
// Provide additional path parameters if applicable
APPLICATION_SID = 'my_APPLICATION_SID'

userAndPass = b64encode(bytes(ACCOUNT_SID + ':' + AUTH_TOKEN, 'utf-8')).decode("ascii")
headers = { 'Authorization' : 'Basic %s' %  userAndPass }

conn = HTTPSConnection('mycompany.restcomm.com')
conn.request("DELETE", '/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Applications/' + APPLICATION_SID + '.json',
      headers=headers)
res = conn.getresponse()

# Add your business logic below; status can be found at 'res.status', reason at 'res.reason' and response body can be retrieved with res.read()
...
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import java.io.*;
import java.util.Base64;

public class JavaSampleClass {
   // Provide your Account Sid and Auth Token from your Console Account page
   public static final String ACCOUNT_SID = "my_ACCOUNT_SID";
   public static final String AUTH_TOKEN = "my_AUTH_TOKEN";
   // Provide additional path parameters if applicable
   public static final String APPLICATION_SID = "my_APPLICATION_SID"

   public static void main(String[] args) throws Exception {
      String userAndPass = ACCOUNT_SID + ':' + AUTH_TOKEN;
      String encoded = Base64.getEncoder().encodeToString(userAndPass.getBytes());

      URL url = new URL("https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/" + ACCOUNT_SID + "/Applications/" + APPLICATION_SID + ".json");
      HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
      conn.setRequestProperty("Authorization", "Basic " + encoded);
      conn.setRequestMethod("DELETE");

      // Add your business logic below; response code can be obtained from 'conn.getResponseCode()' and input stream from 'conn.getInputStream()'
      ...
  }
}

No output for DELETE operation.

Get a List of available Applications

curl -X GET https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Applications.json  \
   -u 'YourAccountSid:YourAuthToken'
const request = require('request');

// Provide your Account Sid and Auth Token from your Console Account page
const ACCOUNT_SID = 'my_ACCOUNT_SID';
const AUTH_TOKEN = 'my_AUTH_TOKEN';

request({
      method: 'GET',
      url: 'https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Applications.json',
      auth: { 'user': ACCOUNT_SID, 'pass': AUTH_TOKEN }
   },
   function (error, response, body) {
      // Add your business logic below; status can be found at 'response.statusCode' and response body at 'body'
      ...
   }
);
from http.client import HTTPSConnection
from base64 import b64encode

# Provide your Account Sid and Auth Token from your Console Account page
ACCOUNT_SID = 'my_ACCOUNT_SID'
AUTH_TOKEN = 'my_AUTH_TOKEN'

userAndPass = b64encode(bytes(ACCOUNT_SID + ':' + AUTH_TOKEN, 'utf-8')).decode("ascii")
headers = { 'Authorization' : 'Basic %s' %  userAndPass }

conn = HTTPSConnection('mycompany.restcomm.com')
conn.request("GET", '/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Applications.json',
      headers=headers)
res = conn.getresponse()

# Add your business logic below; status can be found at 'res.status', reason at 'res.reason' and response body can be retrieved with res.read()
...
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import java.io.*;
import java.util.Base64;

public class JavaSampleClass {
   // Provide your Account Sid and Auth Token from your Console Account page
   public static final String ACCOUNT_SID = "my_ACCOUNT_SID";
   public static final String AUTH_TOKEN = "my_AUTH_TOKEN";


   public static void main(String[] args) throws Exception {
      String userAndPass = ACCOUNT_SID + ':' + AUTH_TOKEN;
      String encoded = Base64.getEncoder().encodeToString(userAndPass.getBytes());

      URL url = new URL("https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/" + ACCOUNT_SID + "/Applications.json");
      HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
      conn.setRequestProperty("Authorization", "Basic " + encoded);
      conn.setRequestMethod("GET");

      // Add your business logic below; response code can be obtained from 'conn.getResponseCode()' and input stream from 'conn.getInputStream()'
      ...
  }
}

The output of the command will be similar to the one below

[
  {
    "sid": "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "date_created": "Wed, 23 Sep 2015 06:56:04 -0300",
    "date_updated": "Wed, 23 Sep 2015 06:56:04 -0300",
    "friendly_name": "vdCollectVerbDemo",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "api_version": "2012-04-24",
    "voice_caller_id_lookup": false,
    "uri": "/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Applications/AP73926e7113fa4d95981aa96b76eca854.json",
    "rcml_url": "/visual-designer/services/apps/PR7addb947898443329cf50913103f77a2/controller",
    "kind": "voice"
  },
  {
    "sid": "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "date_created": "Wed, 23 Sep 2015 06:56:17 -0300",
    "date_updated": "Wed, 23 Sep 2015 06:56:17 -0300",
    "friendly_name": "vdESDemo",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "api_version": "2012-04-24",
    "voice_caller_id_lookup": false,
    "uri": "/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Applications/AP81cf45088cba4abcac1261385916d582.json",
    "rcml_url": "/visual-designer/services/apps/PR2cbed2a2a56947cdbeaa8b0af8a6c02d/controller",
    "kind": "voice"
  }
 ]

Applications Attributes

PROPERTY

DESCRIPTION

Sid

A string that uniquely identifies this Application.

DateCreated

The date when this Application was created.

DateUpdated

The date wher this Application was last updated.

FriendlyName

A friendly name for this Application.

AccountSid

The unique ID of the Account that owns this Application.

ApiVersion

Version of the API applied to this Application.

HasVoiceCallerIdLookup

Look up the caller’s caller-ID name from the CNAM database. Either true or false.

Uri

The URI for this Application, relative to https://$DOMAIN/restcomm/2012-04-24/.

RcmlUrl

The HTTP address that Restcomm will use to get the RCML of this Application.

Kind

The kind of this Application. (Supported values: voice or SMS)

Platform

Programmable Voice

Programmable SMS

Turnkey Applications

Smart 2FA

Call Queue

Auto Attendant

Number Masking

Task Router

Campaign Manager

Learn

Terms And Conditions

About

ABOUT

CONTACT US

© 2020, All rights reserved.