mesibo Server-side (REST) APIs

The mesibo REST API allows you to administer your account, manage apps, manage users and groups, send messages etc.

mesibo API URL

For maintaining privacy and security, the mesibo REST API can only be accessed over HTTPS.

Authentication

Every REST request will have minimum two POST parameters

1) operation (op), identifies the operation requested.
2) depending on the operation, either the API key (key) or the Application token (token).

API key is a unique alphanumeric identifier associated with your account. You can view API key from the mesibo Console. You can anytime change or regenerate the API key from the console.

Similarly, Application Token is a unique alphanumeric identifier with one of your application. You can view and change the app token from the mesibo Console.

regenerate-app-token

Sample API Request & Response

The response is a JSON object with at least following fields, and other fields depending on the operation.

  • op, operation
  • result, true if successful, false otherwise
  • error, error code if request failed

An example of a successful JSON response is as follows:

{"account":{"uid":"10","oid":"9","msgs":"0","users":"0","groups":"0","conns":"0","apps":"0","storage":"0","pid":"1","billday":"1","
status":"0","flag":"0","expiry":"2020-09-01 22:38:45","issuetime":"2017-09-01 22:38:45"}, "op":"appadd","result":true}

An example of a failed JSON response is as follows:

{"op":"someop","result":false,"error":"BADOP"}

PHP Helper SDK

A PHP helper class for mesibo REST API is available at < link >.

Rest APIs

API Description and Parameters
Add an Application POST Parameters
  • op = appadd
  • key = API Key
  • name = App Name
Response Fields
  • response[‘token’] = Application Token
Delete an Application POST Parameters
  • op = appdel
  • token = Application Token
  • name = App Name
Edit an Application POST Parameters
  • op = appset
  • token = Application Token
  • name = App Name [Optional]
  • url = Webhook URL [Optional]
  • hooks = Webhooks Flag [Optional]
  • users = Maximum users [Optional]
  • groups = Maximum Groups [Optional]
Add a User or re-generate access token POST Parameters
  • op = useradd
  • token = Application Token
  • addr = User Address (e.g phone number, email etc)
  • appid = Android app id or iOS Bundle id.
  • expiry = in minutes, default 1 year [Optional]
  • active = enable user, default 1 (active) [Optional]
  • groups = Maximum Groups [Optional]
Response Fields
  • response[‘user’][‘uid’] = User ID
  • response[‘user’][‘token’] = User Access Token
Edit a User POST Parameters
  • op = userset
  • token = Application Token
  • uid = User ID
  • flag = Flags
  • active = enable user, deault 1 (active) [Optional]
Delete a user POST Parameters
  • op = userdel
  • token = Application Token
  • uid = User ID
Delete a user token POST Parameters
  • op = deltoken
  • token = Application Token
  • uid = User ID
Get Users POST Parameters
  • op = usersget
  • token = Application Token
  • addr = get users marching address. Wildcard (*) allowed.
  • count = max number of users to get. Max 20
Response Fields
  • response[‘users’] = users array
Add a group POST Parameters
  • op = groupadd
  • token = Application Token
  • name = Group name [Optional]
  • flag = Group Flags [Optional]
  • expiry = in seconds, default 1 year [Optional]
  • expiryext = auto extend expiry on activity, in seconds, default disabled [Optional]
  • active = enable group, default 1 (active) [Optional]
Response Fields
  • response[group][‘gid’] = Group ID
Edit a group POST Parameters
  • op = groupset
  • token = Application Token
  • gid = Group ID
  • name = Group name [Optional]
  • flag = Group Flags [Optional]
  • expiry = in seconds, default 1 year [Optional]
  • expiryext = auto extend expiry on activity, in seconds, default disabled [Optional]
  • active = enable group, default 1 (active) [Optional]
Response Fields
  • response[group][‘gid’] = Group ID
Delete a group POST Parameters
  • op = groupdel
  • token = Application Token
  • gid = Group ID
Add or remove group members POST Parameters
  • op = groupeditmembers
  • token = Application Token
  • gid = Group ID
  • m = comma separated list of members to add or delete
  • delete = if 1, delete members, add otherwise
Get group members POST Parameters
  • op = groupgetmembers
  • token = Application Token
  • gid = Group ID
  • count = max number of users to get. Max 20
Response Fields
  • response[‘members’] = group members