Help & Support

Provisioning API

This page describes how to use the SIP Sorcery provisioning service. The service is implemented using a Representational State Transfer (REST) approach and uses JavaScript Object Notation (JSON) as the data transfer protocol. Using REST and JSON makes the service easier to use from different development platforms and languages compared to alternative approaches such as SOAP.

The base URL for the provisionig service is Future versions of the service will increment the version number in the URL, v0.2 etc, while leaving the older versions in place so as not to break any existing programs using them.

In addition to the provisioning REST service a notifications REST service is also available. It allows programmatic access to the same log messages that are shown in the Silverlight or SSH consoles.

To use the provisioning service you will need to obtain your SIPSorcery API key from your Settings Page.

The types of records that can currently be provisioned using the service are:

Quick Start

The general form of the URL for each record type is base URL / record type, for example In general the methods that are available for each record type are count, get, add, update and delete. The add and update methods require a POST request with the request body being in a JSON format. The remaining methods require a GET request and will return data in a JSON format.

Every request sent to the provisioning service MUST be authenticated by including your SIPSorcery API key in a HTTP request header. The name of the HTTP header must be apikey. In addition for requests that include a JSON payload the Content-Type HTTP request header must be set to application/json; charset=utf-8. An example of sending a request to the service using Ruby is shown below. Depending on your operating systems certificate authorities you may need to explicitly trust the SIPSorcery certificate authority. The certificate authority bundle used in the Ruby script below can be downloaded here gd_bundle-g2.crt.

Every service method will return a JSON response in a specific format with three keys: Success which will be true of false, Error which will contain an error message in the event of a failure and Result which will contain the different types of JSON serialised objects depending on the method. Some exmaple JSON responses show below.

Example JSON response for a count method. Example JSON response for a SIP account get method. Example JSON request body for the add SIP account method.