The Mobenzi API consists of 3 core components:

  1. Server-side endpoints that allow you to programmatically do most of what is possible via the console
  2. A set of submission event hooks that you can use to drive custom workflow
  3. A JavaScript API that allows you to interact with a form that is in progress using a custom widget

Overview of the server-side endpoints

The server-side API utilises Microsoft's WCF Data Services (formerly known as "ADO.NET Data Services"). This enables you to execute queries using familiar .NET Framework programming patterns, including using language integrated query (LINQ).

The server-side API is accessed via a set of endpoints that allow you to interact with the various entities within the system. Using these endpoints, you are are able to write code to:

Terminology differences between the console and server-side API

For backward compatibility the API uses slightly different terminology to the console:

  • Handsets (console) -> Devices (API)
  • Projects (console) -> Studies (API)
  • Forms (console) -> Surveys (API)

Authentication and permissions

The API must be accessed via the SSL/HTTPS URL - This ensures that any data accessed through the API is encrypted while being transferred. The API supports basic HTTPAuthentication. 

To access the API programmatically, you will need to set the "Authorization" HTTP header when executing the web request to the relevant API endpoint. Please note that the credentials used should be that of a valid user setup in your console. We recommend creating a new user and specifying the permissions that you wish to use via the API and only for the projects you want to grant access to.

Please note that if the user account used to access the API is linked to more than one console, a custom HTTP header ("AccountID") must be set. The value of this header should be set to the unique identifier for the account you are targeting. If you are unsure what your unique console/account ID is, please contact support.