Ushur is an AI-powered platform that combines process automation and conversational interfaces to automate enterprise workflows. In doing so Ushur delivers great value to those enterprises by eliminating manual work and freeing up human capital for higher valued business needs.
Ushur’s platform offers a template-based approach to solving specific use-cases for companies. The platform offers a state-of-the-art linguistics engine, together with a drag and drop process and conversation builder, invisible apps that deliver app-like experiences without asking customers to download an app and integration hooks into standard and proprietary systems of record. Along with this infrastructure, Ushur offers real-time monitoring, audit capabilities and a powerful analytics engine.
This is the initial API that would take in the credentials email and password for the account and return back token id which will be used in various other API calls. When other API fails to access the account because token id had expired, the application is expected to initiate this sign-in process again to retrieve the new token for further interactions with Ushur.
| Parameter | Description |
|---|---|
| Users can login to their account using this email identifier they originally signed-up with. | |
| password | Password for the account. |
Method: POST
URL: https://community.ushur.me/rest/login
Content-Type: application/json
{
<EMAIL_ADDRESS>"password":"testushur"
}
{
"status": "success",
"respCode": "200",
"tokenId": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiYmQzMjIyNy0zMTY0LTRmNGEtYmNjYy1jMzdjZTg1MjlmMzYiLCJpYXQiOjE1NTkyNzYxNDEsInN1YiI6IkFjY291bnRBdXRoIiwiaXNzIjoiVVNIVVIiLCJhY2NvdW50RW5hYmxlZCI6IlkiLCJ1c2VyQWNjb3VudCI6IkdVUlVSQUpBLktPU0lHSUBVU0hVUi5DT00iLCJleHAiOjE1NTkyODMzNDF9.m_AQBIoUPdLMqrrBZ2S7pTAnsrkDLVpAGyLif2dQR9M",
"emailId"<EMAIL_ADDRESS>"nickName": "test4ushur",
"tokenLeaseTime": "120",
"tokenRenewThreshold": "3"
}
{
"status": "failure",
"respCode": "403",
"data": null,
"infoText": "Account not found",
}
{
"status": "failure",
"respCode": "200",
"infoText": "You are not a valid user",
"emailId"<EMAIL_ADDRESS>}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. See here for all codes. |
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services.
For security reasons, Ushur has some mechanisms whereby it can internally regenerate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| emailId | The submitted email identifier is returned back for correlation purposes. If there are multiple outstanding requests, this helps the caller of the APIs to correlate requests and responses. |
| nickName | The nick Name in the account is returned back. |
| tokenLeaseTime | The lease duration is time to live value: the time in seconds for which the token is valid |
| tokenRenewThreshold | The maximum number of times the token can be renewed |
This is the API that would be required to renew the token which was given by system during login procedure , it takes the current exisiting token as input and returns the new token with new lease time
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services.
For security reasons, Ushur has some mechanisms whereby it can internally regenerate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
Method: POST
URL: https://community.ushur.me/rest/authtoken/renew
Content-Type: application/json
{
"tokenId": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiYmQzMjIyNy0zMTY0LTRmNGEtYmNjYy1jMzdjZTg1MjlmMzYiLCJpYXQiOjE1NTkyNzYxNDEsInN1YiI6IkFjY291bnRBdXRoIiwiaXNzIjoiVVNIVVIiLCJhY2NvdW50RW5hYmxlZCI6IlkiLCJ1c2VyQWNjb3VudCI6IkdVUlVSQUpBLktPU0lHSUBVU0hVUi5DT00iLCJleHAiOjE1NTkyODMzNDF9.m_AQBIoUPdLMqrrBZ2S7pTAnsrkDLVpAGyLif2dQR9M"
}
{
"status": "success",
"respCode": "200",
"tokenId": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyYjY0MmIzYi1iYTcyLTQ2OWEtYTExNy1lZWIxOTRjZDU3N2MiLCJpYXQiOjE1NjA0MDY3NzksInN1YiI6IkFjY291bnRBdXRoIiwiaXNzIjoiVVNIVVIiLCJhY2NvdW50RW5hYmxlZCI6IlkiLCJ1c2VyQWNjb3VudCI6IlNIVUJIQURBLlBBVEhBS0BVU0hVUi5DT00iLCJleHAiOjE1NjA0MTM5Nzl9.cT14SSCdossIzMMtupVhgTAhI9Dr3oogFoTAqb4h7ck",
"tokenLeaseTime": "120",
"tokenRenewThreshold": "3"
}
{
"status": "failure",
"respCode": "401",
"data": null,
"infoText": "You are not a valid user",
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. See here for all codes. |
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services.
For security reasons, Ushur has some mechanisms whereby it can internally regenerate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| tokenLeaseTime | The lease duration is time to live value: the time in seconds for which the token is valid |
| tokenRenewThreshold | The maximum number of times the token can be renewed |
This is to retrieve the DoNotDisturb Status settings for the Ushur Account. An Account can represent an enterprise.
| Parameter | Description |
|---|---|
| userName | This should be email address which Users used to login to their account when they originally signed-up with. |
| token | The credential for identifying the account. This is the token that was sent by Ushur as part of login response |
A GET Form is shown for a login:
https://community.ushur.me/rest/doNotDisturb/getStatus?userName={{email}}&token={{token}}
{
"status": "success",
"respCode": 200,
"data": {
"dndDateStatus": "Y",
"dndTimeStatus": "Y"
},
"infoText": "DND status retrieved successfully."
}
{
"status": "failure",
"respCode": "404",
"data":null,
"infoText": "Account not found",
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | A JSON Array of date status and time status. A response can be a null array when there are no DND Settings. |
| infoText | A description of the response for the submitted request. |
This is to retrieve the DoNotDisturb settings for the Ushur Account. An Account can represent an enterprise.
| Parameter | Description |
|---|---|
| userName | This should be email address which Users used to login to their account when they originally signed-up with. |
| token | The credential for identifying the account. This is the token that was sent by Ushur as part of login response |
A GET Form is shown for a login:
https://community.ushur.me/rest/doNotDisturb/get?userName={{email}}&token={{token}}
{
"status": "success",
"respCode": 200,
"data": [
{
"time": "20:30,6:00",
"day": "mon,tue"
},
{
"time": "22:00,6:00",
"day": "weekends"
}
],
"infoText": "DND schedule retrieved successfully."
}
{
"status": "failure",
"respCode": "404",
"data":null,
"infoText": "Account not found",
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | A JSON Array of time and day. A response can be a null array when there are no DND Settings. The time is in 24 hour format. Day values can be weekdays, weekends, list of days or a single day. |
| infoText | A description of the response for the submitted request. |
This is to set the DoNotDisturb Status for the Ushur Account. An Account can represent an enterprise.
| Parameter | Description |
|---|---|
| userName | Users can access their account using the email identifier they originally signed-up with. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| raw json data | [ { "dndTimeStatus": "Y", "dndDateStatus": "Y" } ] |
A POST Form is shown:
https://community.ushur.me/rest/doNotDisturb/setStatus?token={{tokenId}}&userName={{username}}
Raw Json Data in POST:
[
{
"dndTimeStatus": "Y",
"dndDateStatus": "Y"
}
]
{
"status": "success",
"respCode": 200,
"data": null,
"infoText": "DND status updated successfully."
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | No relevance today. |
| infoText | A description of the response for the submitted request. |
This is to set the DoNotDisturb Schedule for the Ushur Account. An Account can represent an enterprise.
| Parameter | Description |
|---|---|
| userName | Users can access their account using the email identifier they originally signed-up with. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| raw json data | [ { "day": "mon,wed,fri", "time": "20:30,5:30" }, { "day": "weekends", "time": "22:00,5:00" } ] |
A POST Form is shown:
https://community.ushur.me/rest/doNotDisturb/set?token={{tokenId}}&userName={{username}}
Raw Json Data in POST:
[
{
"day": "Wednesday",
"time": "10:00 AM",
"date": "2019-04-10",
"comment": "Dont want"
}
]
{
"status": "success",
"respCode": 200,
"data": null,
"infoText": "DND schedule added successfully."
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | No relevance today. |
| infoText | A description of the response for the submitted request. |
This infoquery provides list of all the accounts in a given instance The API returns records which are present after the last record ID.
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| lastRecordId | The last account ID is the record number stored in the DB. If null value is passed, it return all the records for the instance |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoQuery/accountListQuery
Content-Type:application/json
{
"cmd":"accountListQuery",
"lastRecordId":null,
"tokenId":"{{currentValidToken}}",
"apiVer":"2.1"
}
{
{
"accounts":[
"10@USHURDUMMY.ME","11@USHURDUMMY.ME","1@USHURDUMMY.ME","2@USHURDUMMY.ME","7@USHURDUMMY.ME",........
],
"totalCount":85,
"lastRecordId":85
}
}
| Parameter | Description |
|---|---|
| accounts | Response returns the list of accounts for a specific instance |
This infoquery provides a list of all the sub accounts that an admin account has. The response will be based on the filter command passed
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| filterCmd | The filter parameter that passed as input. For the specific example, Role details of the sub accounts passed as filter |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoQuery/subAccountList
Content-Type:application/json
{
"cmd":"subAccountList",
"filterCmd":"getRoleInfo",
"tokenId":"{{currentValidToken}}",
"apiVer":"2.1"
}
{
{
"accounts":[
{
<EMAIL_ADDRESS>"accountStatus":"active",
"roleType":"SuperUser",
"roleId":"SuperUser"
},
{
<EMAIL_ADDRESS>"accountStatus":"inactive",
"roleType":"NormalUser",
"roleId":"NormalUser"
}
],
"totalCount":1,
"lastRecordId":1
}
}
| Parameter | Description |
|---|---|
| userName | The account ID which is the email ID of the sub account |
| accountStatus | Response returns whether the account is active or inactive |
| roleType | Returns whether the user is a normal user or Superuser |
| roleId | Returns the role Id which is based on whether the user is a normal user or SuperUser |
Get RoleInfo for User( privileges)
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| userName | The user name whose role details needs to be captured |
| apiVer | The version of the API being used which is by default set to 2.2 for this API |
Method : POST
https://community.ushur.me/infoQuery/getUserRoleInfo
Content-Type:application/json
{
"cmd":"getUserRoleInfo",
<EMAIL_ADDRESS>"tokenId":"{{currentValidToken}}",
"apiVer":"2.2"
}
{
{
"userName"<EMAIL_ADDRESS>"roleType": "AdminUser",
"roleId": "xxxxAdmin"
}
}
| Parameter | Description |
|---|---|
| userName | The user name whose role details needs to be captured |
| roleType | returns whether the user role is Admin, Superuser, Normal or custom |
| roleId | The roleId that is configured for the specific username |
Setting role (privileges) for a sub useraccount
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| userName | The user name for whom role details needs to be set |
| roleType | set the user role as Admin, Superuser, Normal or custom |
| roleId | The roleId that is configured for the specific username | apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoSet/setUserRoleInfo
Content-Type:application/json
{
"tokenId":"{{token}}",
"roleId":"SuperUser",
"roleType":"SuperUser",
<EMAIL_ADDRESS>"apiVer":"2.1"
}
{
200 OK
{
"status":"success",
"respText":"Updated role successfully"
}
}
| Parameter | Description |
|---|---|
| status | Returns whether the specified privilesges was set for the user or not |
| respText | Returns the text message on whether the specified privileges was set or not |
This API is called to edit role (privileges) for a given custom role for an account.
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| roleId | The roleId created for a specific custome role in the account |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoQuery/getRoleInfo
Content-Type:application/json
{
"cmd":"getRoleInfo",
"roleId":"customerRoleId",
"tokenId":"{{currentValidToken}}",
"apiVer":"2.1"
}
{
{
"roleId":"customrole",
"roleType":"AdminUser",
"roleData":{
"xxx-convo":"write",
"xxx-edit-language":"write",
"xxx-settings":"write",
"xxx-app-context":"write",
"xxx-app-context-new":"write",
"xxx-keys":"write",
"xxx-add-variable":"write",
"xxx-variable-table":"write",
"xxx-variable-operations":"write",
"xxx-meta-data":"write",
"xxx-meta-data-bulk-upload":"write",
"xxx-meta-data-table":"write",
"xxx-meta-data-add":"write",
"xxx-meta-data-operations":"write",
"xxx-routing":"write",
"xxx-stats":"write",
"xxx-templates":"write",
"xxx-tag-info":"write",
"xxx-user-admin":"write",
"xxx-user-admin-add":"write",
"xxx-user-admin-edit":"write",
"xxx-user-admin-roles":"write",
"xxx-user-admin-roles-buttons":"write",
"xxx-api-access":"on",
"xxx-activities":"write",
"xxx-faq-tab":"write",
"xxx-faq-tab-edit":"write",
"xxx-social-tab":"write",
"xxx-social-pages-edit":"write",
"xxx-social-ushur-edit":"write",
"xxx-create-new-ushur":"allow",
"xxx-clone-ushur":"allow",
"xxx-delete-ushur":"allow",
"xxx-change-ushur-structure":"allow",
"xxx-edit-ushur-module-contents":"allow",
"xxx-ushur-activation":"allow",
"xxx-ushur-list":"all",
"xxx-settings-basics-tab":"write",
"xxx-settings-availability-tab":"write",
"xxx-settings-appearance-tab":"write",
"xxx-settings-privacy-tab":"write",
"xxx-settings-links-tab":"write",
"xxx-settings-billing-tab":"write",
"xxx-settings-contacts-tab":"write",
"xxx-settings-languages-tab":"write",
"xxx-settings-access-control-tab":"write",
"xxx-responses-tab":"write",
"xxx-responses-content":"write",
"xxx-li-freeze":"write"
}
}
| Parameter | Description |
|---|---|
| roleId | The roleId created for a specific custome role in the account |
| roleType | Returns the response privileges for the user |
| roleData | Returns the actions possible for the role type across the different ushur modules |
This API returns all the custom roles for a given user.
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoQuery/getAllRoles
Content-Type:application/json
{
"cmd":"getAllRoles",
"tokenId":"{{currentValidToken}}",
"apiVer":"2.1"
}
{
{
"roles":[
{
"roleId":"customrole",
"roleType":"AdminUser"
}
],
"count":1
}
}
| Parameter | Description |
|---|---|
| roleId | The roleId created for a specific custome role in the account |
| roleType | Returns the response privileges for the user |
This API is to initiate an Ushur (also called as Campaign) to a specific phone number if this is a single campaign but if a bulk campaign the Ushur will be launched to all the users in the enterprise and hence the userPhoneNo parameter will be ignored if present.
| Parameter | Description |
|---|---|
| cmd | A mandatory parameter. This is the command to indicate the action taken on the server. Possible values are initCampaign, initBulkCampaign.
initCampaign will launch the campaign indicated by the campaignId to the userPhoneNo indicated in the message. initBulkCampaign will launch the campaign to all the users in the user db associated with the enterprise indicated by the tokenId. In this case the userPhoneNo is not needed in the API call. |
| campaignId | A mandatory parameter. This is an identifier for an Ushur structured message that will be sent out upon this request when successfully completed.
This identifier will be published to the API caller as part of the documentation process. |
| tokenId | A mandatory parameter. The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| callBackNumber | An optional parameter. This is the phone number of the business that Ushur will connect the user to for a voice call. |
| userPhoneNo | Mandatory for a single destination user and not necessary for a bulk campaign. This is the destination phone number to where this message is directed. |
| userMsg | An optional parameter. This message will replace if there are any contents in the initial Welcome module of the campaign/Ushur being initiated. This message will be used when the initial Welcome module is empty as well. |
| apiVer | API Version of value 2.1 or greater as value would return a more detailed response. Recommended to be used. |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"tokenId": "{{token}}",
"userPhoneNo": "+16614187487",
"campaignId": "NetPromoterScore",
"apiVer":"2.1"
}
{
"status": "success",
"respCode": 200,
"respText": "Success",
"activityId": "ffe96950-140a-445c-834c-dcc3b22017cb-1493284061475"
}
{
"status": "failure",
"respCode": "404",
"respText": "Invalid Ushur Id",
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | The response code which is 200 for success. |
| respText | A textual description of the response |
| activityId | The activity identifier that reflects the activity pertaining to the initiated request. This can be used in other APIs to track and operate (say even cancel) on the ongoing activity. |
A Sample invocation is shown below:
var initSessionEndpoint = 'https://community.ushur.me/initUshur'
var jsonStringLogin = convertTOjsonData(menuId, username, callbacknum, usernum, message);
$.ajax({
type: 'POST',
contentType: 'application/json',
url: initSessionEndpoint,
dataType: "text",
data: jsonStringLogin,
success: function(response) {
callbackvalue(response);
console.log("Successfully delivered message")
},
error: function(jqXHR, textStatus, errorThrown) {
console.log("Message Delivery Error:", textStatus)
}
});
var convertTOjsonData = function(menuId, username, callbacknum, usernum, message) {
return JSON.stringify({
"cmd": "initCampaign",
"callBackNumber": callbacknum,
"tokenId": tokenId,
"userPhoneNo": usernum,
"userMsg": message,
"campaignId": menuId
});
};
API can be invoked with curl like the following:
curl -H "Content-Type: application/json; charset=UTF-8" --data @push.json https://community.ushur.me/initUshur
push.json:
{"cmd":"initCampaign",callBackNumber":"12092078446",
"tokenId":"d5dbab0d-1251-4a2f-b5eb-8c0f752e997b",
"userPhoneNo":"12098746734","userMsg":"Hi Test,
This is a reminder for your upcoming appointment on 10/31/2014 at 1:00 PM.","campaignId":"UshurIssEnterpriseMenu"}
A sample java code illustrates the direct form:
try {
JSONObject json = new JSONObject();
json.put("cmd": "initCampaign");
json.put("callBackNumber", "12092078446");
json.put("tokenId", "d5dbab0d-1251-4a2f-b5eb-8c0f752e997b");
json.put("userPhoneNo","12098746734");
json.put("userMsg","Hi Test, This is a reminder for your upcoming appointment on 10/31/2014 at 1:00 PM.");
json.put("campaignId","UshurIssEnterpriseMenu");
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
try {
HttpPost request = new HttpPost("https://community.ushur.me/initUshur");
StringEntity jsonParams = new StringEntity(json.toString());
request.addHeader("Content-type", "application/json");
request.addHeader("Accept","application/json");
request.setEntity(jsonParams);
CloseableHttpResponse response = httpClient.execute(request);
System.out.println(response.toString());
}
catch (Exception ex) {
// handle exception here
}
finally {
httpClient.close();
}
}
catch (Exception e) {
e.printStackTrace();
}
HTTP/1.1 200 OK [Date: Thu, 23 Oct 2014 03:30:01 GMT, Content-Type: text/html;charset=ISO-8859-1, Content-Length: 7, Server: naju server 2.51]
A negative (non-200) HTTP response will indicate that the send message failed.
This API is to notify a message via an Ushur (also called as Campaign) to a specific phone number if this is a single campaign but if a bulk campaign the Ushur (hence the message) will be launched to all the users in the enterprise and hence the userPhoneNo parameter will be ignored if present.
| Parameter | Description |
|---|---|
| cmd | A mandatory parameter. This is the command to indicate the action taken on the server. Possible values are initCampaign, initBulkCampaign.
initCampaign will launch the campaign indicated by the campaignId to the userPhoneNo indicated in the message. initBulkCampaign will launch the campaign to all the users in the user db associated with the enterprise indicated by the tokenId. In this case the userPhoneNo is not needed in the API call. |
| campaignId | A mandatory parameter. This is an identifier for an Ushur structured message that will be sent out upon this request when successfully completed.
This identifier will be published to the API caller as part of the documentation process. Although this can be any Ushur that has a (empty or not) welcome and this message in the API will go to a mobile phone number, if the need is to just send a message then existing template NotifyMsg Ushur can be used. |
| tokenId | A mandatory parameter. The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| userPhoneNo | Mandatory for a single destination user and not necessary for a bulk campaign. This is the destination phone number to where this message is directed. |
| userMsg | An optional parameter. This message will replace if there are any contents in the initial Welcome module of the campaign/Ushur being initiated. This message will be used when the initial Welcome module is empty as well. |
| apiVer | API Version of value 2.1 or greater as value would return a more detailed response. Recommended to be used. |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"tokenId": "{{acmetokenid}}",
"userPhoneNo": "+16614187487",
"campaignId": "NotifyMsg",
"userMsg":"Hello World! This is Ushur!",
"apiVer":"2.1"
}
{
"status": "success",
"respCode": 200,
"respText": "Success",
"activityId": "0792c664-df05-47d0-9032-eb5e1c4ccaa5-1493285425824"
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | The response code which is 200 for success. |
| respText | A textual description of the response |
| activityId | The activity identifier that reflects the activity pertaining to the initiated request. This can be used in other APIs to track and operate (say even cancel) on the ongoing activity. |
This API is similar to the previous Initiate Campaign but here the remote system sends a requestId which is a unique id in the remote system and hence treated as such in Ushur as well. For example the requestId can be an incident Id of the remote system or a concatenation of multiple identities such as an AccountId:CustomerId wherein a specific customer can be in different accounts with the enterprise. With the requestId the Ushur platform can retrieve enterprise records which has this requestId value as the unique key.
| Parameter | Description |
|---|---|
| cmd | This is the command to indicate the action taken on the server. Possible values are initCampaign, initBulkCampaign.
initCampaign will launch the campaign indicated by the campaignId to the userPhoneNo indicated in the message. initBulkCampaign will launch the campaign to all the users in the user db associated with the enterprise indicated by the tokenId. In this case the userPhoneNo is not needed in the API call. |
| requestId | This is a unique request identifier from the enterprise system. An incident id from a remote service management system is an example. |
| campaignId | This identifies the Ushur that will be sent out upon this request when successfully completed. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| callBackNumber | This is the phone number of the business that Ushur will connect the user to for a voice call. |
| userPhoneNo | This is the destination phone number to where this message is directed. |
| userMsg | This is the message that is sent by the remote caller entity. Ushur, if necessary will append the structured information indicated by the campaignId to this message and then forward it to the user indicated by the UserPhoneNumber. |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"requestId" : "INC700001",
"callBackNumber": "12092078446",
"tokenId": "{{token}}",
"userPhoneNo": "12098746734",
"userMsg": "my domain has issues in setup",
"campaignId": "ResConfV2_Ushur"
}
{
"status": "success",
"respCode": 200,
"respText": "Success",
"activityId": "0792c664-df05-47d0-9032-eb5e1c4ccaa5-1493285425824"
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | The response code which is 200 for success. |
| respText | A textual description of the response |
| activityId | The activity identifier that reflects the activity pertaining to the initiated request. This can be used in other APIs to track and operate (say even cancel) on the ongoing activity. |
This is a query API to retrieve detailed responses on initiation of campaigns using the requestId.
| Parameter | Description |
|---|---|
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| cmd | responseForReqId is the command that needs to be passed for this. |
| requestId | The request identifier for which responses are being retrieved. |
| campaignId | This is the Ushur that was initiated for which responses is being requested here. |
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId" :"INC700001",
"tokenId":"{{token}}",
"campaignId":"ResConfV2_Ushur"
}
{
"stats": {
"optId_1": 1,
"menu.sent": 2,
"menu.resp": 1
},
"result": [
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 19:58:49 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 19:58:49 EST 2016",
"location": "",
"response": {
"menuId": "ResConfV2_Ushur",
"campaignId": "ResConfV2_Ushur",
"visual": "false",
"type": "menu.disabled.sent",
"dispStr": "Message Sent",
"content": "[entspdev]:my domain has issues in setup"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 19:58:49 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 19:58:49 EST 2016",
"location": "",
"response": {
"menuId": "ResConfV2_Ushur_child_section_91a8b4d9-d614-47fd-8666-2ce5935470a1",
"campaignId": "ResConfV2_Ushur",
"visual": "false",
"type": "menu.sent",
"dispStr": "Menu Sent",
"meta": {
"topic": "Is your issue resolved now?\nPlease respond with a number",
"menuOptions": {
"1": "Yes",
"2": "No"
}
}
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:01:09 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:01:09 EST 2016",
"location": "",
"response": {
"menuId": "ResConfV2_Ushur_child_section_91a8b4d9-d614-47fd-8666-2ce5935470a1",
"campaignId": "ResConfV2_Ushur",
"type": "menu.response",
"optionId": "1",
"dispStr": "Yes"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:01:09 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:01:09 EST 2016",
"location": "",
"response": {
"visual": "false",
"type": "menu.disabled.sent",
"dispStr": "Message Sent"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:01:09 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:01:09 EST 2016",
"location": "",
"response": {
"visual": "false",
"type": "menu.disabled.sent",
"dispStr": "Message Sent"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:01:09 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:01:09 EST 2016",
"location": "",
"response": {
"menuId": "ResConfV2_Ushur_child_section_5a68999d-130c-46d1-bef7-1303223bc64f",
"campaignId": "ResConfV2_Ushur",
"visual": "false",
"type": "menu.prompt",
"dispStr": "Prompt Sent",
"meta": {
"topic": "How satisfied were you with the service provided by EntSpDev on a scale from 10 (completely) to 1 (not at all)?"
}
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:02:30 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:02:30 EST 2016",
"location": "",
"response": {
"menuId": "ResConfV2_Ushur_child_section_5a68999d-130c-46d1-bef7-1303223bc64f",
"campaignId": "ResConfV2_Ushur",
"type": "routine.response",
"dispStr": "9"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:02:30 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:02:30 EST 2016",
"location": "",
"response": {
"visual": "false",
"type": "menu.disabled.sent",
"dispStr": "Message Sent"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:02:30 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:02:30 EST 2016",
"location": "",
"response": {
"menuId": "ResConfV2_Ushur_child_section_bcff8ac7-df09-431d-8435-ff55ecaa7dc2",
"campaignId": "ResConfV2_Ushur",
"visual": "false",
"type": "menu.prompt",
"dispStr": "Prompt Sent",
"meta": {
"topic": "How likely are you to recommend EntSpDev products to a friend on a scale from 10 (definitely) to 1 (definitely not)?"
}
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:02:43 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:02:43 EST 2016",
"location": "",
"response": {
"menuId": "ResConfV2_Ushur_child_section_bcff8ac7-df09-431d-8435-ff55ecaa7dc2",
"campaignId": "ResConfV2_Ushur",
"type": "routine.response",
"dispStr": "8"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:02:43 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:02:43 EST 2016",
"location": "",
"response": {
"visual": "false",
"type": "menu.disabled.sent",
"dispStr": "Message Sent"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:02:43 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:02:43 EST 2016",
"location": "",
"response": {
"menuId": "ResConfV2_Ushur_child_section_c5323bd2-bcc9-47fd-88a7-7d4622b41bfa",
"campaignId": "ResConfV2_Ushur",
"visual": "false",
"type": "menu.prompt",
"dispStr": "Prompt Sent",
"meta": {
"topic": "Please share any additional comments that can help us serve you better :"
}
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:03:59 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:03:59 EST 2016",
"location": "",
"response": {
"menuId": "ResConfV2_Ushur_child_section_c5323bd2-bcc9-47fd-88a7-7d4622b41bfa",
"campaignId": "ResConfV2_Ushur",
"type": "routine.response",
"dispStr": "thank you for your service"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:03:59 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:03:59 EST 2016",
"location": "",
"response": {
"visual": "false",
"type": "menu.disabled.sent",
"dispStr": "Message Sent"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"date": "Thu Feb 25 20:03:59 EST 2016",
"sid": "45fbb019-627e-40e5-88b4-7217577e25f0-uxidxyz-c69d812f-d360-42a9-8775-eab16e440dde",
"timestamp": "Thu Feb 25 20:03:59 EST 2016",
"location": "",
"response": {
"menuId": "**ENDCAMPAIGN**",
"campaignId": "",
"visual": "false",
"type": "menu.sent",
"dispStr": "Menu Sent",
"meta": {
"menuOptions": {}
}
},
"requestId": "INC700001"
}
]
}
| Parameter | Description |
|---|---|
| name | The name of the party to whom the message was sent out and from whom this response is coming from. |
| phone | The phone number of the party to whom the message was sent out and from where this reponse is coming from. |
| date | This is the time at which message was sent or response received. |
| sid | This is the identifier for correlating the responses with every message that was sent out. |
| timestamp | This is the time at which this response arrived. |
| location | This is the location information |
| response | The actual response text from the remote party to whom the message was sent out. The data also includes the id of the menu, campaignId, visual, the type of menu, display string and actual content of the response. |
| requestId | The request identifier for which responses are being retrieved |
Instead of getting all the detailed information as part of the query, here we get the responses for specific tags which implies responses on specific micro-engagement.
| Parameter | Description |
|---|---|
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| cmd | responseForReqId is the command that needs to be passed for this. |
| requestId | The request identifier for which responses are being retrieved. |
| campaignId | This is the Ushur that was initiated for which responses is being requested here. |
| UeTag | This is the Ushur Micro-Engagement Tag for which a specific response is given back. These tags are campaign specific and is expected to be known by the requestor who is aware of the campaign and the tags associated. Some of the tags for a Resolution Confirmation are: UeTag_StatusCheck, UeTag_RecommendationRating, UeTag_SatisfactionRating, UeTag_FeedbackComment" There can be one or more tag for this parameter according to which responses are given. |
| lastRecordId | This has the value of the last record that was returned in the previous responses. Having this will make the server send out records only after this record id. |
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId":"INC700001",
"tokenId":"{{token}}",
"campaignId":"ResConfV2_Ushur",
"UeTag" : "UeTag_StatusCheck,UeTag_RecommendationRating,UeTag_SatisfactionRating,UeTag_FeedbackComment"
}
{
"result": [
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 19:58:49 EST 2016",
"response": {
"UeTag": "UeTag_StatusCheck",
"dispStr": "Menu Sent",
"topic": "Is your issue resolved now?\nPlease respond with a number"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 20:01:09 EST 2016",
"response": {
"UeTag": "UeTag_StatusCheck",
"optionId": "1",
"dispStr": "Yes"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 20:01:09 EST 2016",
"response": {
"UeTag": "UeTag_SatisfactionRating",
"dispStr": "Prompt Sent",
"topic": "How satisfied were you with the service provided by EntSpDev on a scale from 10 (completely) to 1 (not at all)?"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 20:02:30 EST 2016",
"response": {
"UeTag": "UeTag_SatisfactionRating",
"dispStr": "9"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 20:02:30 EST 2016",
"response": {
"UeTag": "UeTag_RecommendationRating",
"dispStr": "Prompt Sent",
"topic": "How likely are you to recommend EntSpDev products to a friend on a scale from 10 (definitely) to 1 (definitely not)?"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 20:02:43 EST 2016",
"response": {
"UeTag": "UeTag_RecommendationRating",
"dispStr": "8"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 20:02:43 EST 2016",
"response": {
"UeTag": "UeTag_FeedbackComment",
"dispStr": "Prompt Sent",
"topic": "Please share any additional comments that can help us serve you better :"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 20:03:59 EST 2016",
"response": {
"UeTag": "UeTag_FeedbackComment",
"dispStr": "thank you for your service"
},
"requestId": "INC700001"
}
]
}
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId":"INC700001",
"tokenId":"{{token}}",
"campaignId":"ResConfV2_Ushur",
"UeTag" : "UeTag_FeedbackComment"
}
{
"result": [
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 20:02:43 EST 2016",
"response": {
"UeTag": "UeTag_FeedbackComment",
"dispStr": "Prompt Sent",
"topic": "Please share any additional comments that can help us serve you better :"
},
"requestId": "INC700001"
},
{
"name": "",
"phone": "+12098746734",
"timestamp": "Thu Feb 25 20:03:59 EST 2016",
"response": {
"UeTag": "UeTag_FeedbackComment",
"dispStr": "thank you for your service"
},
"requestId": "INC700001"
}
]
}
| Parameter | Description |
|---|---|
| name | The name of the party to whom the message was sent out and from whom this response is coming from. |
| phone | The phone number of the party to whom the message was sent out and from where this reponse is coming from. |
| timestamp | This is the time at which this response arrived. |
| response | The actual response text from the remote party to whom the message was sent out. The data also includes UeTag, display string, topic information |
| requestId | The request identifier for which responses are being retrieved. |
This request enables additional set of parameters to be introduced so as to act as filters in the response that usually contains a lot of information. One example is, if an application is only interested in the number of counts and not the actual contents then a specific filter parameter can be sent in the request and responses are sent accordingly. Multiple query parameters can be combined.
| Parameter | Description |
|---|---|
| filterCmd | This can contain a single or a list of commands executing on top of the actual query. The currently supported filter commands are: getSids,getCounts,LastEngagement,LastFirst,getRecordIds
getSids: Displays along with other parameters the actual session identifier so that when there are multiple responses for the query, the client of this API can gather together sets of responses based on the session identifier (sid). getCounts: Currently this command will exclusively only return the counts for each of the UeTag but the counts are for the final responses based on the query. For example, LastEngagement might return a few set and the getCounts is on this result. LastEngagement: In cases when a single query can result in multiple engagements and the application needs only the last then we use this filter. Look at the response samples below where the getSids yielded two different sessions and with LastEngagement only the latest engagement is returned. LastFirst: For the resulting query responses, this one will return in the reverse chronological order which is the last occurred will come first and the first occurred will be at the last. getRecordIds: Queries typically returns multiple records of one or more engagements. The "sid" parameter itself identifies an engagement and hence will be the same for all records within that engagement. In some cases the remote client needs a unique identifier for each of the records across engagements itself. Sending this parameter as part of the filterCmd will send an identifier that will be globally unique in the namespace belonging to the corresponding query. The parameter that gets sent in the response is |
| delivered | Values are true or false. This filter is to retrieve entries where the Ue were delivered or not. This hence applies only to outgoing Ue and hence corresponding messages. If there is no delivered status then those entries will not be returned. Only those that are explicitly marked as true or false will be returned as per the query.
true:Return entries that indicate the Ue was successfully delivered. false:Return entries that indicate the Ue was not delivered. |
| deliveryStatus | Specific values indicating the nature of the delivery. Most common values are delivered, undelivered and sent. This filter is to retrieve entries with specific delivery status regardless of the outcome of the delivery. In most cases this parameter should go without the delivered else there could be conflict and hence return null values.
delivered:Return entries that indicate the Ue was successfully delivered. undelivered:Return entries that indicate the Ue was not delivered. sent:An upstream carrier has confirmed the receipt of the message. |
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId":"INC0010117",
"filterCmd":"getSids",
"tokenId":"{{ven1177token}}",
"campaignId": "UshurResolutionConfirmation",
"UeTag": "UeTag_927455,UeTag_881809,UeTag_382867,UeTag_253937,UeTag_457543,UeTag_635124,UeTag_847034,UeTag_End"
}
{
"result": [
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-03T00:44:12.156Z",
"response": {
"UeTag": "UeTag_927455",
"dispStr": "Menu Sent",
"topic": "Has your issue been resolved?\nPlease respond with a number"
},
"requestId": "INC0010117",
"sid": "4db06b91-1ed0-43a9-af8d-c7d822082d9f-uxidxyz-35457f74-0f4d-490a-9990-5fe4bd44b89a"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-03T00:44:28.581Z",
"response": {
"optionId": "2",
"UeTag": "UeTag_881809",
"dispStr": "No"
},
"requestId": "INC0010117",
"sid": "4db06b91-1ed0-43a9-af8d-c7d822082d9f-uxidxyz-35457f74-0f4d-490a-9990-5fe4bd44b89a"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-03T00:44:28.619Z",
"response": {
"dispStr": "Prompt Sent",
"UeTag": "UeTag_847034",
"topic": "Sorry to hear that. Please enter your comments as to why it is unresolved."
 Please enter your comments as to why it is unresolved."
 Please enter your comments as to why it is unresolved."
},
"requestId": "INC0010117",
"sid": "4db06b91-1ed0-43a9-af8d-c7d822082d9f-uxidxyz-35457f74-0f4d-490a-9990-5fe4bd44b89a",
"ushurRecordId": "5727f46ce9513852305bb488"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-03T00:44:28.581Z",
"response": {
"campaignId": "UshurResolutionConfirmation",
"optionId": "2",
"UeTag": "UeTag_881809",
"dispStr": "No"
},
"requestId": "INC0010117",
"sid": "4db06b91-1ed0-43a9-af8d-c7d822082d9f-uxidxyz-35457f74-0f4d-490a-9990-5fe4bd44b89a",
"ushurRecordId": "5727f46ce9513852305bb487"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-03T00:44:12.156Z",
"response": {
"campaignId": "UshurResolutionConfirmation",
"UeTag": "UeTag_927455",
"dispStr": "Menu Sent",
"topic": "Has your issue been resolved?\nPlease respond with a number"
},
"requestId": "INC0010117",
"sid": "4db06b91-1ed0-43a9-af8d-c7d822082d9f-uxidxyz-35457f74-0f4d-490a-9990-5fe4bd44b89a",
"ushurRecordId": "5727f45ce9513852305bb486"
}
],
"counts": 4,
"totalRecords": 4,
"lastRecordId": "5727f45ce9513852305bb486"
}
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"tokenId":"{{ven1177token}}",
"requestId": "INC0010433",
"campaignId":"UshurResolutionConfirmation",
"UeTag":"UeTag_927455",
"delivered":true
}
{
"result": [
{
"name": "",
"phone": "+16614187487",
"date": "2016-09-26T01:31:56.430Z",
"response": {
"UeTag": "UeTag_927455",
"dispStr": "Menu Sent",
"topic": "Has your issue been resolved?\nPlease respond with a number.",
"delivered": "true",
"delStatus": "delivered"
},
"requestId": "INC0010433"
}
],
"counts": 1,
"totalRecords": 1,
"lastRecordId": "57e87a8cb9ea8cec6afc7ce9"
}
This query will fetch all responses without any filters and with much details. Such queries are provided so that enterprises can design their own applications accordingly or adopt any of these Ushur APIs to fit their existing applications. It is important to note that such queries can be expensive and generally used for report creation purposes.
| Parameter | Description |
|---|---|
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| startDate | The date of request sent or responses received. |
| endDate | The ending date for which responses are to be retrieved. |
| userPhoneNo | This is an optional parameter. If this is not sent then all engagements are retrieved for this account indicated by the tokenId. If this parameter is passed then the engagements with this specific phone number is retrieved. The startDate, endDate and userPhoneNo can be combined in all the other discussed requests here. |
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"tokenId":"{{token}}",
"startDate":"2016-02-02T12:26:12.791Z",
"endDate":"2016-02-28T12:26:12.791Z",
"userPhoneNo":"14088987788"
}
A Sample invocation is shown below:
var queryEndpoint = 'https://community.ushur.me/infoQuery';
var jsonStringLogin = convertTOjsonData(tokenId, enterprise, startdate, enddate);
$.ajax({
type: 'POST',
contentType: 'application/json',
url: queryEndpoint,
dataType: "text",
data: jsonStringLogin,
success: function(response) {
onComplete(response)
},
error: function(jqXHR, textStatus, errorThrown) {}
});
var convertTOjsonData = function(tokenId, enterprise, startdate, enddate) {
return JSON.stringify({
"tokenId": tokenId,
"startDate": startdate,
"endDate":endDate
});
};
API can be invoked with curl like the following:
curl -H "Content-Type: application/json; charset=UTF-8" --data @retrieve.json https://community.ushur.me/infoQuery
retrieve.json:
{"tokenId":"c2bb6fd6-7a9c-4561-ace0-0cb947a59ba3","startDate" : "2014-10-10T12:26:12.791Z","endDate" : "2014-10-24T12:26:12.791Z"}
A sample java code illustrates the direct form:
try {
JSONObject json = new JSONObject();
json.put("tokenId", "c2bb6fd6-7a9c-4561-ace0-0cb947a59ba3");
json.put("startDate", "2014-10-10T12:26:12.791Z");
json.put("endDate", "2014-10-24T12:26:12.791Z");
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
try {
HttpPost request = new HttpPost("https://community.ushur.me/infoQuery");
StringEntity jsonParams = new StringEntity(json.toString());
request.addHeader("Content-type", "application/json");
request.addHeader("Accept","application/json");
request.setEntity(jsonParams);
CloseableHttpResponse response = httpClient.execute(request);
System.out.println(response.toString());
String jsonResp = EntityUtils.toString(response.getEntity(), "UTF-8");
System.out.println(jsonResp);
return true;
}
catch (Exception ex) {
// handle exception here
}
finally {
httpClient.close();
}
}
catch (Exception e) {
e.printStackTrace();
}
{
"result": [
{
"date": "Tue Mar 10 00:50:51 EDT 2015",
"location": "",
"name": "Henry G",
"phone": "+12098746734",
"response": {
"content": "[Ushur]:hi henry how are you?",
"dispStr": "Message Sent",
"menuId": "",
"type": "menu.disabled.sent"
},
"sid": "ec7bb83a-79ff-4c3d-939d-0ab0391d4b6f-uxidxyz-a418bf65-41aa-4171-a951-93d82eb7cda8",
"timestamp": "Tue Mar 10 00:50:51 EDT 2015"
},
{
"date": "Tue Mar 10 00:51:00 EDT 2015",
"location": "",
"name": "Henry G",
"phone": "+12098746734",
"response": {
"content": "[Henry]:got this now",
"dispStr": "got this now",
"menuId": "",
"type": "menu.disabled.response"
},
"sid": "ec7bb83a-79ff-4c3d-939d-0ab0391d4b6f-uxidxyz-a418bf65-41aa-4171-a951-93d82eb7cda8",
"timestamp": "Tue Mar 10 00:51:00 EDT 2015"
},
{
"date": "Mon Mar 30 23:41:02 EDT 2015",
"location": "",
"name": "",
"phone": "+12098746734",
"response": {
"content": "[Ushur]:msg only on 033015 tested Now_0",
"dispStr": "Message Sent",
"menuId": "",
"type": "menu.disabled.sent"
},
"sid": "233a3748-1b46-4c2a-9df5-1cf97c582a90-uxidxyz-02611318-d445-4393-86e9-feb77ca7dbdd",
"timestamp": "Mon Mar 30 23:41:02 EDT 2015"
},
{
"date": "Mon Mar 30 23:41:02 EDT 2015",
"location": "",
"name": "",
"phone": "+12098746734",
"response": {
"content": "[Ushur]:msg only on 033015 tested Now_1",
"dispStr": "Message Sent",
"menuId": "",
"type": "menu.disabled.sent"
},
"sid": "c918cb3f-5275-42c0-ae7e-3265623c5f17-uxidxyz-389f5d1e-2e0b-4e27-9e35-cfbd7e14b0a4",
"timestamp": "Mon Mar 30 23:41:02 EDT 2015"
},
{
"date": "Mon Mar 30 23:41:03 EDT 2015",
"location": "",
"name": "",
"phone": "+12098746734",
"response": {
"content": "[Ushur]:msg only on 033015 tested Now_2",
"dispStr": "Message Sent",
"menuId": "",
"type": "menu.disabled.sent"
},
"sid": "9ca7121f-987e-4570-b5f5-d58df99cb315-uxidxyz-54ab3ed3-883b-4383-a6a4-cd82e49294be",
"timestamp": "Mon Mar 30 23:41:03 EDT 2015"
},
{
"date": "Mon Mar 30 23:50:17 EDT 2015",
"location": "",
"name": "Henry G",
"phone": "+12098746734",
"response": {
"content": "[Ushur]:hi henry there",
"dispStr": "Message Sent",
"menuId": "",
"type": "menu.disabled.sent"
},
"sid": "1bb0d49b-fea5-4d17-8d35-b5c414b68277-uxidxyz-ee2b51c9-c2a7-4970-bf14-cd0074e5ab84",
"timestamp": "Mon Mar 30 23:50:17 EDT 2015"
},
{
"date": "Tue Mar 31 01:59:46 EDT 2015",
"location": "",
"name": "Henry G",
"phone": "+12098746734",
"response": {
"content": "[Ushur]:hi henry2",
"dispStr": "Message Sent",
"menuId": "",
"type": "menu.disabled.sent"
},
"sid": "c3d3c0df-e6c9-43c6-83dc-579d978cb301-uxidxyz-4be6385b-f412-4c16-adfd-85d09d729c6a",
"timestamp": "Tue Mar 31 01:59:46 EDT 2015"
},
{
"date": "Tue Mar 31 01:59:57 EDT 2015",
"location": "",
"name": "Henry G",
"phone": "+12098746734",
"response": {
"content": "[Henry]:got it Ushur2",
"dispStr": "got it Ushur2",
"menuId": "",
"type": "menu.disabled.response"
},
"sid": "c3d3c0df-e6c9-43c6-83dc-579d978cb301-uxidxyz-4be6385b-f412-4c16-adfd-85d09d729c6a",
"timestamp": "Tue Mar 31 01:59:57 EDT 2015"
},
{
"date": "Tue Mar 31 16:18:44 EDT 2015",
"location": "",
"name": "",
"phone": "+12098746734",
"response": {
"content": "[Ushur]:msg only on 033015 tested Now_0",
"dispStr": "Message Sent",
"menuId": "",
"type": "menu.disabled.sent"
},
"sid": "610fb50f-070d-4211-8fff-7a401aaf0ce7-uxidxyz-8942e182-d842-4b7f-a220-a7b10ec1fe36",
"timestamp": "Tue Mar 31 16:18:44 EDT 2015"
}
],
"stats": {
"menu.resp": 0,
"menu.sent": 0
}
}
| Parameter | Description |
|---|---|
| date | This is the time at which message was sent or response received. |
| location | This is the location information |
| name | The name of the party to whom the message was sent out and from whom this response is coming from. |
| phone | The phone number of the party to whom the message was sent out and from where this reponse is coming from. |
| response | The actual response text from the remote party to whom the message was sent out. The data also includes the id of the menu, the type of menu, the chosen option id and the actual display string of the response. |
| sid | This is the identifier for correlating the responses with every message that was sent out. |
| timestamp | This is the time at which this response arrived. |
These queries are pointed at a specific or multiple Ushur Micro-Engagements. Applications on the enterprise that are focused on specific micro-engagements can use these and build very powerful business applications. These applications can act as monitors of these micro-engagements and in turn take actions which can very well invoke Ushurs to the users.
| Parameter | Description |
|---|---|
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur
as part of login response. (*) WARNING: Querying only with this tokenId will result in a very huge response! Recommendation is to have queries based on campaignId, UeTag and other combinations. If the entire records is necessary then consider using with nRecords and lastRecordId to retrieve records in a batch. |
| filterCmd | Single or list of filter commands mentioned earlier in this document. |
| campaignId | The Ushur for which the responses are being retrieved. |
| UeTag | One or more UeTag for which queries are being made here. |
| lastRecordId | This has the value of the last record that was returned in the previous responses. Having this will make the server send out records only after this record id. |
| nRecords | There can be large data in responses and this parameter can get this many items in one response and can get further records in new queries that leverages lastRecordId parameter. Sample: "nRecords ":"10" in the query will result getting back 10 records. In the responses there will be "counts" parameter that reflect the actual number of records returned and "totalRecords " indicates the overall records for the query out of which we are retrieving nRecords at a time. |
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"filterCmd":"getSids,LastEngagement",
"tokenId":"{{ven1177token}}",
"campaignId": "UshurResolutionConfirmation",
"UeTag": "UeTag_927455,UeTag_881809,UeTag_382867,UeTag_253937,UeTag_457543,UeTag_635124,UeTag_847034,UeTag_End"
}
{
"result": [
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-05T04:48:54.688Z",
"response": {
"UeTag": "UeTag_927455",
"dispStr": "Menu Sent",
"topic": "Has your issue been resolved?\nPlease respond with a number"
},
"requestId": "INC0010126",
"sid": "9f4f377a-55a3-4f9d-8ae5-191244a28ec9-uxidxyz-8c7cc526-9967-4bec-b8c1-5a3102a9683b"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-05T04:52:11.323Z",
"response": {
"optionId": "1",
"UeTag": "UeTag_382867",
"dispStr": "Yes"
},
"requestId": "INC0010126",
"sid": "9f4f377a-55a3-4f9d-8ae5-191244a28ec9-uxidxyz-8c7cc526-9967-4bec-b8c1-5a3102a9683b"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-05T04:52:11.381Z",
"response": {
"dispStr": "Prompt Sent",
"UeTag": "UeTag_253937",
"topic": "How satisfied were you with the service provided by $u_EnterpriseDisplay$ on a scale from 10 (completely) to 1 (not at all)?"
},
"requestId": "INC0010126",
"sid": "9f4f377a-55a3-4f9d-8ae5-191244a28ec9-uxidxyz-8c7cc526-9967-4bec-b8c1-5a3102a9683b"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-05T04:52:25.833Z",
"response": {
"UeTag": "UeTag_253937",
"dispStr": "7"
},
"requestId": "INC0010126",
"sid": "9f4f377a-55a3-4f9d-8ae5-191244a28ec9-uxidxyz-8c7cc526-9967-4bec-b8c1-5a3102a9683b"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-05T04:52:25.861Z",
"response": {
"dispStr": "Prompt Sent",
"UeTag": "UeTag_457543",
"topic": "How likely are you to recommend $u_EnterpriseDisplay$ products to a friend on a scale from 10 (definitely) to 1 (definitely not)?"
},
"requestId": "INC0010126",
"sid": "9f4f377a-55a3-4f9d-8ae5-191244a28ec9-uxidxyz-8c7cc526-9967-4bec-b8c1-5a3102a9683b"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-05T04:52:39.756Z",
"response": {
"UeTag": "UeTag_457543",
"dispStr": "7"
},
"requestId": "INC0010126",
"sid": "9f4f377a-55a3-4f9d-8ae5-191244a28ec9-uxidxyz-8c7cc526-9967-4bec-b8c1-5a3102a9683b"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-05T04:52:39.786Z",
"response": {
"dispStr": "Prompt Sent",
"UeTag": "UeTag_635124",
"topic": "Please share any additional comments that can help us serve you better :"
},
"requestId": "INC0010126",
"sid": "9f4f377a-55a3-4f9d-8ae5-191244a28ec9-uxidxyz-8c7cc526-9967-4bec-b8c1-5a3102a9683b"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-05T04:53:24.437Z",
"response": {
"UeTag": "UeTag_635124",
"dispStr": "The incident is resolved now..Show all comments on the ticker"
},
"requestId": "INC0010126",
"sid": "9f4f377a-55a3-4f9d-8ae5-191244a28ec9-uxidxyz-8c7cc526-9967-4bec-b8c1-5a3102a9683b"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-05T04:53:24.476Z",
"response": {
"UeTag": "UeTag_End",
"dispStr": "EndOfUshur"
},
"requestId": "INC0010126",
"sid": "9f4f377a-55a3-4f9d-8ae5-191244a28ec9-uxidxyz-8c7cc526-9967-4bec-b8c1-5a3102a9683b"
}
],
"counts": 9,
"lastRecordId": "572ad1c43e653d3d57bee6a0"
}
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"tokenId":"{{ven1177token}}",
"nRecords":"5",
"lastRecordId": "54b8a4bd6bc0dce0189b090e"
}
{
"stats": {
"menu.sent": 2,
"menu.resp": 0
},
"result": [
{
"name": "Bob",
"phone": "+16614187487",
"date": "2015-01-17T00:17:16.824Z",
"sid": "d7c89d7f-b3d0-4508-aa8c-c9e291f6adf7-uxidxyz-e225b35b-31dc-4fb7-9e04-8223ec85dcad",
"timestamp": "2015-01-17T00:17:16.824Z",
"location": "",
"response": {
"menuId": "visualMenu",
"type": "menu.sent",
"dispStr": "Menu Sent",
"visual": "false",
"campaignId": "visualMenu"
}
},
{
"name": "Bob",
"phone": "+16614187487",
"date": "2015-01-17T00:18:57.234Z",
"sid": "fdaa683a-070f-4aa7-a0d3-0d4aa37e8b1b-uxidxyz-7dfeb4d6-fc86-47ab-a126-fa083ebc5d7d",
"timestamp": "2015-01-17T00:18:57.234Z",
"location": "",
"response": {
"menuId": "visualMenu",
"type": "menu.sent",
"dispStr": "Menu Sent",
"visual": "false",
"campaignId": "visualMenu"
}
},
{
"phone": "+16614187487",
"sid": "67081802-74e9-4ed7-b1cb-50878089348b-uxidxyz-37ed39db-a149-4e06-b46e-8dedaa38dc88",
"timestamp": "2015-01-17T20:19:45.876Z",
"date": "2015-01-17T20:19:45.876Z"
},
{
"phone": "+16614187487",
"sid": "e7df8e73-ccb9-457b-bb17-b25291cfbd69-uxidxyz-d1e74f48-de2f-482e-bd67-70ca20cba5e5",
"timestamp": "2015-01-17T20:19:54.562Z",
"date": "2015-01-17T20:19:54.562Z"
},
{
"phone": "+16614187487",
"sid": "e7df8e73-ccb9-457b-bb17-b25291cfbd69-uxidxyz-d1e74f48-de2f-482e-bd67-70ca20cba5e5",
"timestamp": "2015-01-17T20:20:00.585Z",
"date": "2015-01-17T20:20:00.585Z"
}
],
"counts": 5,
"lastRecordId": "54bac3f09809436f2c7c2989",
"totalRecords": 2518
}
The callback number is used to reach back to the administrator on the enterprise and the Ushur basis. This api allows dynamic setting of such a callback number. This number can be used for connecting over voice or texting back from the user or even system generated messages to the admin.
| Parameter | Description |
|---|---|
| userName | Users can access their account using this email identifier they originally signed-up with. |
| token | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| campaignId | The campaign ID of the campaign. |
| callbackNum | The call back number that you want to set for the campaign. When the campaign involves the user having the ability to reach back say via voice this callback phone number will be used to establish the connection. |
Method: PUT
URL: https://community.ushur.me/rest/campaign/{{campaignId}}/callbackNo/{{callbackNum}}
Content-Type: application/json
{
"userName":"{{userName}}",
"token":"{{token}}"
}
{
"status": "success",
"respCode": 200,
"data": null,
"infoText": "Call back number updated successfully."
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | The texts vary depending on the API request. |
| infoText | A description of the response for the submitted request. |
This API onIncomingEmailProcessing is used to process incoming email and send the response to the email address given in the API
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| uniqueIncEmailId | This is the Ushur/Campaign name for the email Classification |
| emailServiceId | The is the Pull email key word configured on the system to trigger email processing |
| emailSubject | The subject line of Email |
| emailBody | The contents of the Email Body |
| replyTo | This is the email address to which Ushur platform will reply after successful processing of email | apiVer | The version of the API being used which is by default set to 3.1 for this API |
Method : POST
https://community.ushur.me/onIncomingEmail
Content-Type:application/json
{
"tokenId": {{currentValidToken}},
"uniqueIncEmailId": "emailClassification",
"emailServiceId"<EMAIL_ADDRESS>"emailSubject": "new account",
"emailBody": "Hello, my name is Michael and my contact number is +44 8992 8122 and can someone please help me how do i get my new account created ? what is the process for registration ?",
"replyTo"<EMAIL_ADDRESS>"apiVer": "3.1"
}
{
200 OK
{
SUCCESS: Email submitted for Data Extraction and Categorization!
}
}
| Parameter | Description |
|---|---|
| SUCCESS | Email submitted for Data Extraction and Categorization! |
Checks if the phone number specified is blacklisted or not for the given account
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| userPhoneNo | The phone number that needs to be checked as blacklisted or not |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoQuery/getBlackListInfo
Content-Type:application/json
{
"cmd":"getBlackListInfo",
"userPhoneNo":"+1xxxxxxxxxx",
"tokenId":"{{token}}",
"apiVer":"2.1"
}
{
200 OK
{
"blackListed": "no"
}
{
"blackListed": "yes",
"blackListInfo": "{
"acctUserName"<EMAIL_ADDRESS>,
"acctUserFullName" : "" ,
"isOperInit" : true ,
"userName" : "user+91xxxxxxxxxx" ,
"userPhoneNo" : "+91xxxxxxxxxx" ,
"id" : "5df9ab1e9e8e9b3ba6b8df48" ,
"updatedDate" : "2019-12-18T04:29:18.732Z"}"
}
}
| Parameter | Description |
|---|---|
| blackListed | Response whether the user phone number is blacklisted or not |
| blackListInfo | Details of the blacklist phone is returned |
Blacklist the number present in the request param for the given account
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| userPhoneNo | The phone number that needs to be blacklisted |
| accountUserName | The email id or account where the phone number is present |
| AccountUserFullName | The account user's full name. this is not a mandatory parameter |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoSet/blackListPhone
Content-Type:application/json
{
"userPhoneNo":"+1xxxxxxxxxx",
"tokenId":"{{token}}",
"acctUserName":"{{email}}",
"acctUserFullName":"",
"apiVer":"3.1"
}
{
200 OK
{
"status":"success",
"blackListed":true,
"userPhoneNo":"+91xxxxxxxxxx"
}
OR
{
"status": "success",
"AlreadyBlackListed": true,
"userPhoneNo": "+91xxxxxxxxxx"
}
}
| Parameter | Description |
|---|---|
| status | Returns the whether the phone was blackListedlisted or not |
| blackListed | Response will return either true or false, true is phone is blacklisted or already blacklisted |
| userPhoneNo | User phone number that was blacklisted or already blacklisted |
Removes a phone number present in blacklist for the given account
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| userPhoneNo | The phone number that needs to be removed from blacklist |
| accountUserName | The email id or account where the phone number is present |
| AccountUserFullName | The account user's full name. this is not a mandatory parameter |
| EnterpriseOverride | If number is blacklisted ( or whitelisted ) by user doing Optout/STOP/optin),then it can be removed from the respective list only if the SuppEntOverridingUserOptout flag is YES. If this is NO, phone can not be removed from WhiteList/BlackList |
| apiVer | The version of the API being used for this API |
Method : POST
https://community.ushur.me/infoSet/removePhoneFromBlackList
Content-Type:application/json
{
"userPhoneNo":"+1xxxxxxxxxx",
"tokenId":"{{token}}",
"acctUserName":"{{email}}",
"acctUserFullName":"",
"enterpriseOverride":"yes",
"apiVer":"3.1"
}
{
200 OK
{
"status":"success",
"userPhoneNo":"+91xxxxxxxxxx",
"removed":true,
"userInitiatedOptout":false
}
OR
{
"status": "failure",
"respCode": 404,
"respText": "Not in blacklist",
"userPhoneNo": "+91xxxxxxxxxx",
"removed": false
}
OR
{
"status": "failure",
"respCode": 404,
"respText": "Failed to remove from blacklist",
"userPhoneNo": "+91xxxxxxxxxxx",
"userInitiatedOptout":false
"removed": false
}
}
| Parameter | Description |
|---|---|
| status | Returns the whether the API returns a success or failure |
| removed | Response will return either true or false, true if phone is removed from blacklist and false if the phone number is not in blacklist or falied to remove from blacklist |
| userPhoneNo | User phone number that was blacklisted or already blacklisted |
| respText | A textual description of the response |
Checks if a given number is present in whitelist or not for a given account
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| userPhoneNo | The phone number that needs to be blacklisted | apiVer | The version of the API being used for this API |
Method : POST
https://community.ushur.me/infoQuery/getWhiteListInfo
Content-Type:application/json
{
"cmd":"getWhiteListInfo",
"userPhoneNo":"+1xxxxxxxxx",
"tokenId":"{{token}}",
"apiVer":"2.1"
}
{
200 OK
{
"whiteListed": "no"
}
OR
{
"whiteListed": "yes",
"whiteListInfo": "{
"isOperInit":false,
"userName" : "user+xxxxxxxxxxxxx" ,
"userPhoneNo" : "+91xxxxxxxxxx" ,
"id" : "5df9e3f79e8e9b3ba6b8e378" ,
"updatedDate" : "2019-12-18T08:31:51.462Z"
}"
}
}
| Parameter | Description |
|---|---|
| status | Returns the whether the API returns a success or failure |
| whiteListed | Response will return either true or false, true if phone is whitelisted and false if the phone number is not in whitelisted |
| userPhoneNo | User phone number that was whitelisted |
| isOperInit | Whether initiated by Operator or User ( by sending #optin or pull to any Ushur) |
| id | Internal Id of the whitelisted number - to query record based on Id |
| updatedDate | Date when the phone number was whitelisted |
WhiteList the number present in the request param for the given account
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| userPhoneNo | The phone number that needs to be whitelisted |
| accountUserName | The email id or account where the phone number is present |
| AccountUserFullName | The account user's full name. this is not a mandatory parameter |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoSet/whiteListPhone
Content-Type:application/json
{
"userPhoneNo":"{{phone}}",
"tokenId":"{{token}}",
"acctUserName":"{{email}}",
"acctUserFullName":"",
"apiVer":"3.1"
}
{
200 OK
{
"status": "success",
"gbSuccess": true,
"whiteListed": true,
"userPhoneNo": "+91xxxxxxxxxx"
}
or
{
"status": "success",
"AlreadyWhiteListed": true,
"userPhoneNo": "+91xxxxxxxxxx"
}
}
| Parameter | Description |
|---|---|
| status | Returns the whether the phone was whitelisted or not |
| whiteListed | Response will return either true or false, true is phone is whiteListed or already whiteListed |
| userPhoneNo | User phone number that was whiteListed or already whiteListed |
Removes a phone number present in Whitelist for the given account
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| userPhoneNo | The phone number that needs to be removed from whitelist |
| accountUserName | The email id or account where the phone number is present |
| AccountUserFullName | The account user's full name. this is not a mandatory parameter | apiVer | The version of the API being used for this API |
Method : POST
https://community.ushur.me/infoSet/removePhoneFromWhiteList
Content-Type:application/json
{
"userPhoneNo":"+1xxxxxxxxx",
"tokenId":"{{token}}",
"acctUserName":"{{email}}",
"acctUserFullName":"",
"apiVer":"3.1"
}
{
200 OK
{
"status":"success",
"userPhoneNo":"+91xxxxxxxxxx",
"removed":true,
"userInitiatedOptout":false
}
OR
{
"status": "failure",
"respCode": 404,
"respText": "Not in whitelist",
"userPhoneNo": "+91xxxxxxxxxx",
"removed": false
}
OR
{
"status": "failure",
"respCode": 404,
"respText": "Failed to remove from whitelist",
"userPhoneNo": "+91xxxxxxxxxxx",
"userInitiatedOptout":false
"removed": false
}
}
| Parameter | Description |
|---|---|
| status | Returns the whether the API returns a success or failure |
| removed | Response will return either true or false, true if phone is removed from whitelist and false if the phone number is not in whitelist or falied to remove from whitelist |
| userPhoneNo | User phone number that was whitelisted or already whitelisted |
| respText | A textual description of the response |
It provides a list of all the numbers which are moved from blacklist to whitelist for a given account.
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| apiVer | The version of the API being used for this API |
Method : POST
https://community.ushur.me/infoQuery/getBlackToWhiteListed
Content-Type:application/json
{
"tokenId":"{{token}}",
"apiVer":"2.1"
}
{
200 OK
{
"1":"{
"userName" : "user+91xxxxxxxxxx" ,
"userPhoneNo" : "+91xxxxxxxxxx" ,
"enterpriseInitiated" : false ,
"id" : "5df9ad839e8e9b3ba6b8df58" ,
"updatedDate" : "2019-12-18T04:39:31.395Z" ,
"createdDate" : "2019-12-18T04:39:31.395Z"
}",
"2":"{
"userName" : "user+91xxxxxxxxxx" ,
"userPhoneNo" : "+91xxxxxxxxxx" ,
"enterpriseInitiated" : false ,
"id" : "5df9e19f9e8e9b3ba6b8e2c9" ,
"updatedDate" : "2019-12-18T08:21:51.577Z" ,
"createdDate" : "2019-12-18T08:21:51.577Z"
}",
"3":"{
"userName" : "user+91xxxxxxxxxx" ,
"userPhoneNo" : "+91xxxxxxxxxx" ,
"enterpriseInitiated" : false ,
"id" : "5dfa023b9e8e9b2e2e69909d" ,
"updatedDate" : "2019-12-18T10:40:59.256Z" ,
"createdDate" : "2019-12-18T10:40:59.256Z"
}"
}
}
| Parameter | Description |
|---|---|
| userName | Returns the user name | userPhoneNo | User phone number that was moved from BlackList to WhiteList |
| respText | A textual description of the response |
| enterpriseInitiated | If number is moved to whitelist by Operator or by User opting in |
| id | Internal Id of the whitelisted number - to query record based on Id |
| updatedDate | Date this record is updated |
| createdDate | Date this record is created |
This API returns the list and count of UeTags for a specific campaign /UshurID
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| campaignId | The Campaign for which the ue_tags are being requested. |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoQuery/getUeTagList
Content-Type:application/json
{
"cmd":"getUeTagList",
"campaignId":"ResponseTabUpdation",
"tokenId":"{{currentValidToken}}",
"apiVer":"2.1"
}
{
200 OK
{
"ushurId": "ResponseTabUpdation",
"result": [
{
"message": "",
"UeTag": "UeTag_003196"
},
{
"message": "To continue, use secure link: $u_SessionUrl$",
"UeTag": "UeTag_250011"
},
{
"message": "test question",
"UeTag": "UeTag_667573"
},
{
"message": "asdafadf",
"UeTag": "UeTag_987162"
},
{
"message": "$c_uVar_testmail$",
"UeTag": "UeTag_550547"
},
{
"message": "test 2",
"UeTag": "UeTag_112790"
},
{
"message": "$c_uVar_testmail$ ",
"UeTag": "UeTag_939033"
},
{
"message": "$c_uVar_testmail$ test2",
"UeTag": "UeTag_267944"
},
{
"message": "dfsfd",
"UeTag": "UeTag_016067"
}
],
"tagCount": 9
}
}
| Parameter | Description |
|---|---|
| ushurID | The Campaign ID whose Ue_tag details are being returned |
| result | Returns the list of UeTags for the specific UshurID / campaign |
| tagCount | Returns the count of UeTags for a secific UshurID / Campaign |
This API is used to cancel schedule ushurs / campaigns
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| activityId | |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoQuery/cancelUshur
Content-Type:application/json
{
"cmd":"cancelUshur",
"activityId":"{{"id"}}",
"tokenId":"{{currentValidToken}}",
"apiVer":"2.2
}
{
200 OK
{
"success: "true",
"respText": "Canceled Ushur activity/activities successfully",
}
| Parameter | Description |
|---|---|
| success | Returns the status of whether the scheduled ushur was successfully cancelled or not |
| respText | A textual description of the response |
This request is used to either add or update one or multiple sets of enterprise data on the Ushur. The Ushur platform supports various modes of uploading the data so that the Ushurs with their micro-engagements can use these. There is support for secure ftp, uploading of files via the Ushur Front-End Interface or via API like these.
| Parameter | Description |
|---|---|
| content | Enterprise specific data set that either be a single set or a list of data set. |
| token | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
The content can be an array of data.
Method: POST
URL: https://community.ushur.me/uneda/data/add
Content-Type: application/json
{
"content": [
{
"phone":"12098746734",
"status": "shipping in progress",
"prescriptionId":"PId8888",
"orderId": "order-842918888"
},
{
"phone":"16614187487",
"status": "processing",
"prescriptionId":"PId8978",
"orderId": "order-967888884"
}
],
"tokenId": "{{xtoken}}"
}
The response will indicate the total number of records that were added or updated as well.
{
"success": true,
"respText": "Uneda Data update successful",
"respCount": 2
}
| Parameter | Description |
|---|---|
| success | A textual indication of success or failure. |
| respText | A textual description of the response |
| respCount | Number of data sets that were added or updated. |
This API is used to fetch the enterprise data from the Ushur Platform. As shown there can be multiple sets of queries and responses are sent accordingly.
| Parameter | Description |
|---|---|
| content | List of key set where each set can contain one or more keys that pertains to one or more enterprise data. |
| token | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
The content can be an array of data.
Method: POST
URL: https://community.ushur.me/uneda/data/get
Content-Type: application/json
{
"content": [
{
"prescriptionId":"PId8888",
"orderId": "order-842918888"
},
{
"prescriptionId":"PId8978"
}
],
"tokenId": "{{token}}"
}
The response will contain all the records that matched the keys.
{
"data": [
{
"orderId": "order-842918888",
"phone": "12098746734",
"prescriptionId": "PId8888",
"status": "shipping in progress"
},
{
"orderId": "order-967888884",
"phone": "16614187487",
"prescriptionId": "PId8978",
"status": "processing"
}
]
}
(OR)
{
"data": []
}
| Parameter | Description |
|---|---|
| data | Empty or a list of data corresponding to the keys |
Similar to the setting of enterprise data this API enables deletion of the enterprise from the Ushur Platform.
| Parameter | Description |
|---|---|
| content | Enterprise specific data set that either be a single set or a list of data set that all needs to be deleted. |
| token | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
The content can be an array of data.
Method: POST
URL: https://community.ushur.me/uneda/data/delete
Content-Type: application/json
{
"content": [
{
"phone":"12098746734",
"status": "shipping in progress",
"prescriptionId":"PId8888",
"orderId": "order-842918888"
},
{
"phone":"16614187487",
"status": "processing",
"prescriptionId":"PId8978",
"orderId": "order-967888884"
}
],
"tokenId": "{{xtoken}}"
}
The response will indicate the total number of records that were deleted.
{
"success": true,
"respText": "Uneda Data deletion successful",
"respCount": 2
}
| Parameter | Description |
|---|---|
| success | A textual indication of success or failure. |
| respText | A textual description of the response |
| respCount | Number of data sets that were added or updated. |
As can be seen in this document there are API to initiate Ushurs and there are APIs to set the enterprise data, however at times enterprise applications need to send both the enterprise data and the Ushur invocation in a single API and this is what this API does. The enterprise data is first attempted to be set and if there are any failures the Ushur is not launched. When the enterprise data setting is successful then the Ushur is launched which may or may not necessarily use the data that was set with this API. It is up to the enterprise application to decide whether to send the data in the same API that needs to be used by Ushur that is being launched but that is the normal case.
| Parameter | Description |
|---|---|
| cmd | This is the command to indicate the action taken on the server. Possible values are initCampaign, initBulkCampaign.
initCampaign will launch the campaign indicated by the campaignId to the userPhoneNo indicated in the message. initBulkCampaign will launch the campaign to all the users in the user db associated with the enterprise indicated by the tokenId. In this case the userPhoneNo is not needed in the API call. This command along with the enterprise data in "content" parameter will result in the data being set and then the Ushur (campaign) being initiated. If there is failure in setting of data then a error response is sent back without initiating the Ushur. Only upon successful setting of enterprise data will the Ushur be launched. With certain parameters the initiation of Ushur can be scheduled at a later time although the enterprise data is updated immediately. |
| campaignId | This is an identifier for an Ushur structured message that will be sent out upon this request when successfully completed.
This identifier will be published to the API caller as part of the documentation process. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| callBackNumber | This is the phone number of the business that Ushur will connect the user to for a voice call. |
| userPhoneNo | This is the destination phone number to where this message is directed. |
| userMsg | This is the message that is sent by the remote caller entity. Ushur, if necessary will append the structured information indicated by the campaignId to this message and then forward it to the user indicated by the UserPhoneNumber. |
| content | Enterprise specific data set that can either be a single set or a list of data set. |
| apiVer | 2.1 or greater as value would return a more detailed response. |
| sendDate | A scheduled send. At this UTC (Coordinated Universal Time) date the Ushur will be initiated. The enterprise data when present in the initial request will be updated with immediately. |
The content in this context is relevant to the user to whom the Ushur is being initiated but still it can be an array of data just like it is being used in the provisioning of the enterprise data.
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"callBackNumber": "12092078446",
"tokenId": "{{token}}",
"userPhoneNo": "12098746734",
"userMsg":"hello there",
"campaignId": "OrderTracking",
"content":[
{
"phone":"12098746734",
"status": "shipping in progress",
"prescriptionId":"PId8888",
"orderId": "order-842918888"
}
]
}
HTTP/1.1 200 OK
A negative (non-200) HTTP response will indicate that the send message failed.
The content in this context is relevant to the user to whom the Ushur is being initiated but still it can be an array of data just like it is being used in the provisioning of the enterprise data. While the content is used to update enterprise data immediately the Ushur itself will be launched based on the sendDate.
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"callBackNumber": "12092078446",
"tokenId": "{{token}}",
"userPhoneNo": "12098746734",
"userMsg":"hello there",
"campaignId": "OrderTracking",
"apiVer":"2.1",
"sendDate":"2016-09-21T16:52:00.000Z",
"content":[
{
"phone":"12098746734",
"status": "shipping in progress",
"prescriptionId":"PId8888",
"orderId": "order-842918888"
}
]
}
HTTP/1.1 200 OK
Unless the request itself is not handled by the system most of the responses even for a failure condition of the application is going to be 200 OK. After getting the 200 OK the client is still suggested to look into the parameters to identify success or failure. Here below is a sample for the apiVersion of 2.1 or more at this time.
{
"status": "success",
"respCode": 200,
"respText": "Success",
"activityId": "d3fe70c7-a402-4802-bc99-fa0de7d626f5-1484327128601"
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | The response code which is 200 for success. |
| respText | A textual description of the response |
| activityId | The activity identifier that reflects the activity pertaining to the initiated request. This can be used in other APIs to track and operate (say even cancel) on the ongoing activity. |
There are many ways contacts are added into the Ushur Platform on an enterprise and even Ushur basis. When a user texts in a keyword (for example, #signmein ), this pull mechanism automatically adds the users phonenumber into the specific Ushur belonging to the keyword as well as into the enterprise in which this Ushur is being executed. The contacts can be uploaded via file on the Ushur Front-End Interface. The contacts can be set via API as indicated here.
| Parameter | Description |
|---|---|
| cmd | addUser: The command that adds or updates a contact to the enterprise. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| campaignId | An optional id for which the contact is added to this campaign. If no mention of this parameter then contact is added to the enterprise. |
| userPhoneNo | This mandatory parameter is the phone number of the contact. Phone number is unique in the campaign and enterprise and will be used as the primary key in adds and updates. |
| userName | This mandatory parameter is the name of the contact being added. Username can be updated for existing phone numbers. |
| userEmail | This optional parameter is the Email of the contact being added. |
| address | This optional parameter is the address of the contact being added. |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd":"addUser",
"tokenId":"{{xtoken}}",
"campaignId":"ContactTesting",
"userPhoneNo": "12098746734",
"userName": "Henry Peter G",
"userEmail"<EMAIL_ADDRESS>"address": "112 st, anywhere, CA 95131"
}
{
"success": true,
"respText": "Store succeeded",
"tokenId":"{{xtoken}}",
"userName":"Henry Peter G",
"userPhoneNo":"12098746734"
}
| Parameter | Description |
|---|---|
| success | A textual indication of success or failure. |
| respText | A textual description of the response |
| tokenId | The tokenId of the account is sent back for correlation purposes. |
| userName | The name of the Contact for correlation purposes. |
| userPhoneNo | The phone number of the Contact for correlation purposes. |
This API would retrieve all the contacts on the enterprise or on the specific Ushur within the enterprise.
| Parameter | Description |
|---|---|
| cmd | The command of getUserInfo implying that retrieval is for user information. |
| campaignId | The optional campaign id for which the contacts are returned. When this parameter is not present then the contacts for the entire enterprise is returned. |
| tokenId | The token id of the enterprise account. |
| userPhoneNo | Optional phone number of the user for which information needs to be retrieved. |
| reachParams | Optional parameter indicating to return reachability information for the phone number. If query is to return information for all phone numbers this can still be sent without the userPhoneNo. |
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"getUserInfo",
"campaignId":"ContactTesting",
"tokenId":"{{xtoken}}"
}
The response will contain all the enterprise contacts and can be scoped for an optional campaignId parameter.
[
{
"userName": "Henry Peter M",
"userPhoneNo": "+12092078446",
"address": "111 st, anywhere, CA 95391",
"userEmail"<EMAIL_ADDRESS>"Method": "api"
},
{
"userName": "Henry Peter G",
"userPhoneNo": "+12098746734",
"address": "112 st, anywhere, CA 95131",
"userEmail"<EMAIL_ADDRESS>"Method": "api"
},
{
"userName": "Henry Peter V",
"userPhoneNo": "+12098355992",
"address": "987 st, anywhere, CA 94538",
"userEmail"<EMAIL_ADDRESS>"Method": "api"
}
]
(OR)
[]
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"getUserInfo",
"tokenId":"{{xtoken}}",
"userPhoneNo": "+xyz",
"reachParams":"Yes"
}
The response contains specifically reachability information along with usual contact information.
{
"Cause": "Unroutable message - rejected",
"SMSReach": "No",
"userName": "user+xyz",
"userPhoneNo": "+xyz",
"Landline": "Yes"
}
(or)
{
"SMSReach": "Yes",
"userName": "user+xyz",
"userPhoneNo": "+xyz",
"RspFromUser": "Yes",
"RspMode": "Browser",
"Verified": "Yes",
"address": "actual st, state",
"userEmail"<EMAIL_ADDRESS>}
| Parameter | Description |
|---|---|
| userName | Name of the Contact |
| userPhoneNo | Phone number of the Contact |
| address | Address of the Contact, if present |
| userEmail | Email address of the Contact, if present |
| Method | The method by which the Contact was added to the system. The possible values are api or pull_sms which indicates the actual mechanism by which this user was first gotten into the system. |
| Cause | The last cause responsible for non-reachability on the phone number |
| SMSReach | This indicates if the phone number is reachable via SMS. If value is "Yes" then it is reachable else if "No" it is not reachable via SMS. |
| Landline | If value is "Yes" indicates that the phone number is landline. If "No" or not present then no indication that it is a landline number. |
| RspFromUser | If value is "Yes" then that indicates the user actually responded. |
| RspMode | Possible values are "SMS" or "Browser" indicating how the user last responded. |
| Verified | If value is "Yes" then it indicates that this phone number was verified via authentication. Example: a 2FA (Factored Authention) has been done successfully. If "No" or not present then such verification has not been done. |
This API is to delete the specific enterprise contact.
| Parameter | Description |
|---|---|
| cmd | deleteUser: The command that deletes a contact from the enterprise. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| campaignId | An optional id for which the contact is delete from this campaign. If no mention of this parameter then contact is delete from the enterprise. |
| userPhoneNo | This mandatory parameter is the phone number of the contact. Phone number is unique in the campaign and enterprise and will be used as the primary key in the delete operation. |
| userName | This mandatory parameter is the name of the contact being deleted. This serves as a verification of the record that is being deleted. |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd":"deleteUser",
"tokenId":"{{xtoken}}",
"campaignId":"ContactTesting",
"userPhoneNo": "12098746734",
"userName": "Henry Peter G"
}
The response will indicate whether deletion of contact was successful or not with some explanation.
{
"success": true,
"respText": "Contact deletion successful"
}
| Parameter | Description |
|---|---|
| success | A textual indication of success or failure. |
| respText | A textual description of the response |
This is to set the DoNotDisturb settings for a Contact in an enterprise.
| Parameter | Description |
|---|---|
| cmd | addContactDND: The command that adds or updates the DND settings for a contact in the enterprise. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| campaignId | An optional id for which the contact's DND is added to this campaign. If no mention of this parameter then contact's DND is added to the enterprise. |
| userPhoneNo | This mandatory parameter is the phone number of the contact. Phone number is unique in the campaign and enterprise and will be used as the primary key in adds and updates. The DND applies to the phone number. |
| userName | This mandatory parameter is added for cross-verification purposes. |
| dndSetting | This mandatory parameter has the DND settings. |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd":"addContactDND",
"tokenId":"{{xtoken}}",
"campaignId":"ContactTesting",
"userPhoneNo": "12098746734",
"userName": "Henry Peter G",
"dndSetting":[
{
"day": "mon,wed,fri",
"time": "20:30,5:30"
},
{
"day": "weekends",
"time": "22:00,5:00"
}
]
}
{
"success": true,
"respText": "DND Update succeeded",
"tokenId":"{{xtoken}}",
"userPhoneNo":"12098746734",
"userName": "Henry Peter G"
}
| Parameter | Description |
|---|---|
| success | A textual indication of success or failure. |
| respText | A textual description of the response |
| tokenId | The tokenId of the account is sent back for correlation purposes. |
| userName | The name of the Contact for correlation purposes. |
| userPhoneNo | The phone number of the Contact for correlation purposes. |
This is to retrieve the DoNotDisturb settings for a contact in the Ushur Account. An Account can represent an enterprise.
| Parameter | Description |
|---|---|
| Context | The context of userDNDInfo implying that retrieval is for user DND information. |
| campaignId | The optional campaign id for which the contact's DND are returned. When this parameter is not present then the contact's DND for the entire enterprise is returned. |
| userPhoneNo | The mandatory user phone number corresponding to the Contact for which the DND setting is being retrieved. |
| userName | The mandatory parameter for cross-verification purposes. |
| tokenId | The token id of the enterprise account. |
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"Context":"userDNDInfo",
"campaignId":"ContactTesting",
"userPhoneNo":"+12098746734",
"userName":"Henry Peter G",
"tokenId":"{{xtoken}}"
}
The response will contain the DND information for the contact being retrieved.
{
"success": true,
"respText":"Retrieved DND setting for contact successfully",
"userName": "Henry Peter M",
"userPhoneNo": "+12092078446",
"dndSetting": [
{
"day": "mon,wed,fri",
"time": "20:30,5:30"
},
{
"day": "weekends",
"time": "22:00,5:00"
}
]
}
(OR)
{}
| Parameter | Description |
|---|---|
| userName | Name of the Contact |
| userPhoneNo | Phone number of the Contact |
| dndSetting | DND Setting for the contact. |
| success | Indicates if retrieval is successful. When failed the respText indicates explanation of it. |
| respText | Textual indication of what went right or wrong. |
This API initiates a 2-Factor Authentication mechanism. It goes with another API that will be used to confirm the code as part of the mechanism.
| Parameter | Description |
|---|---|
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| phoneNumber | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| cmd | phoneAuthService: This is the command to indicate a phone authentication service should be launched.. This command will launch the appropriate campaign that will initiate given message to the userPhoneNo indicated in the message. The same campaign will also handle responses from the same userPhoneNo. |
| callbackUrl | This is the URL of the business that Ushur will reference. |
| regCode | This represents the regional code for the phone number. |
| checkPhoneExists | This checks whether if the phone number exisits or not. |
Method: POST
URL: https://community.ushur.me/rest/account/phoneAuthService
Content-Type: application/json
Request Body:
{
"tokenId" : "{{token}}",
"phoneNumber" : "2098746734",
"cmd" : "phoneAuthService",
"callbackUrl" : "https://www.google.com",
"regCode" : "US" , (optional)
"checkPhoneExists" : "y" ( optional)
}
A text message will be sent to you with a code to verify the phone number entered above.
{
"status": "success",
"respCode": 200,
"data": "3c055082-df38-4ae4-9cbd-cead56aa140e-1454540458974",
"infoText": "Sent Authcode to phoneNumber succesfully."
}
If phone number already exists and checkPhoneExists flag is Y, it will respose with:
{
"status: "failure",
"respCode": 400,
"infoText": "Phone number already exists."
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | The texts vary depending on the API request. For this case, the data is displaying the phAuthTransactionId. You would need this phAuthTransactionId to confirm the phone number. |
| infoText | A description of the response for the submitted request. |
This is the subsequent API to the #PhoneAuthService. This API will send the code received by the end user along with the transaction identifier that was retreived as part of the #PhoneAuthService.
| Parameter | Description |
|---|---|
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| phoneNumber | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| cmd | phoneAuthConfirm: This command verifies on the authentication number received by the user or the application. |
| authNumber | This is confirmation code that you will receive with the phone number you input from the Phone Auth Service request. |
| phAuthTransactionId | This phAuthTransactionId is obtained from the Phone Auth Service request. |
Method: POST
URL: https://community.ushur.me/rest/account/phoneAuthConfirm
Content-Type: application/json
Request Body:
{
"tokenId" : "{{token}}",
"phoneNumber" : "6508896904",
"cmd" : "phoneAuthConfirm",
"authNumber" : "752990",
"phAuthTransactionId":"3c055082-df38-4ae4-9cbd-cead56aa140e-1454540458974"
}
{
"phoneNumber": "+16508896904",
"status": "success",
"infoText": "Phone auth confirmation succeeded.",
"respCode": 200
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | The texts vary depending on the API request. For this case, the data is displaying the phAuthTransactionId. You would need this phAuthTransactionId to confirm the phone number. |
| infoText | A description of the response for the submitted request. |
This API is to retrieve a short url for the sent long url.
| Parameter | Description |
|---|---|
| cmd | getSurl: The command to get a shorter version of the url for the given long form. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| longUrl | This the long URL that you want to shorten. |
This is a POST request.
https://community.ushur.me/infoQuery
with json
{
"cmd":"getSurl",
"tokenId":"d5dbab0d-1251-4a2f-b5eb-8c0f752e997b",
"longUrl":"http://google.com"
}
{
"surl":"https://community.ushur.me/u/Mp9inR"
}
| Parameter | Description |
|---|---|
| surl | The short URL generated by Ushur. |
This API is used to retrieve all the short url along with their long url and associated information such as the number of visits. This API takes a date range sent in the request.
| Parameter | Description |
|---|---|
| cmd | getSurlList: This command will return from Ushur all the stats for the shorter url accesses. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| startDate | The start date. |
| endDate | The end date. |
This is a POST request.
https://community.ushur.me/infoQuery
with json
{
"cmd":"getSurlList",
"tokenId":"c57362dd-ffc5-4c1e-9c92-10cb3f96e87c",
"startDate": "2015-11-13T07:53:15.376Z",
"endDate" : "2015-11-15T07:53:15.376Z
}
if startDate or endDate or both null - all visit count are returned
{
"result": [
{
"createdTimestamp": "2015-11-13T02:53:15.376Z",
"longUrl": "https://community.ushur.me/processFeature",
"surl": "https://community.ushur.me/u/MzWpM6",
"visits": 0
},
{
"createdTimestamp": "2015-11-18T01:04:41.727Z",
"longUrl": "http://google.com",
"surl": "https://community.ushur.me/u/Mp9inR",
"visits": 5
},
{
"createdTimestamp": "2015-11-18T01:09:15.207Z",
"longUrl": "http://google.com",
"surl": "https://community.ushur.me/u/cbwAmH",
"visits": 2
}
]
}
| Parameter | Description |
|---|---|
| longUrl | The long URL before it was shortened. |
| surl | The short URL generated by Ushur. |
| createdTimestamp | The timestamp when the short URL created. |
| visits | The number of visits that the short URL got. |
Alternate form of invocation to retrieve a short url for the long url (action url).
| Parameter | Description |
|---|---|
| userName | Users can access their account using this email identifier they originally signed-up with. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| actionUrl | The URL that you want to shorten by Ushur (See example at the response section). |
https://community.ushur.me/rest/actionUrl/save?userName=ed@ushurdummy.me&token=gIwgVYm6uj1oKKekc6UKJUsLD8GvwchnIXnNjYKJLrzuw5SLmh&actionUrl=https://www.ushur.com
{
"status": "success",
"respCode": 200,
"data": {
"tinyUrl": "https://community.ushur.me/u/c2ZtMR"
},
"infoText": "Action url saved successfully."
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | The texts vary depending on the API request. |
| tinyUrl | The tiny URL is a shortened link created from the Action URL you submitted. |
| infoText | A description of the response for the submitted request. |
This API will fetch all the stats for the specific parameters sent in the request. This is for the entire enterprise basis.
| Parameter | Description |
|---|---|
| statsParams | Contains list of parameters that will retrieve appropriate stats. These are comma separated list of stats parameters to be retrieved with corresponding values as below: Menu Sent : menuSent Menu Received : menuRcvd Total Mobilyze Engagements : mobilyzeEng Total Reachme Engagements : reachmeEng Total Audio Sessions : audioSessions Total Video Sessions : videoSessions Shared Media : sharedMedia Campaigns Executed : campaignsExecuted SMS Sent : smsSent SMS Received : smsRcvd Customers Connected : customersConnected Communicating Now : communicatingNow Messages Exchanged : messagesExchanged Ongoing Mobilyze Engagements : ongoingMobilyzeEng Ongoing Reachme Engagements : ongoingReachmeEng |
| token | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
This is a POST request.
HTTP POST to https://community.ushur.me/rest/enterprise/stats with JSON
{
"statsParams":"menuSent,menuRcvd,mobilyzeEng,reachmeEng,audioSessions,videoSessions,sharedMedia,campaignsExecuted,smsSent,smsRcvd,customersConnected,communicatingNow,messagesExchanged,ongoingMobilyzeEng,ongoingReachmeEng",
"level":"Month",
"startDate":"2016-01-01T00:00:00.000Z",
"endDate":"2016-01-31T23:59:59.999Z",
"tokenId" : "{{token}}",
<EMAIL_ADDRESS>}
startDate , endDate and level are optional for till date stats
level - Month/Day/Hourly, optional for till date stats
{
"audioSessions": 0,
"respCode": 200,
"menuSent": 847,
"campaignsExecuted": 218,
"infoText": "Request succeeded.",
"status": "success",
"ongoingReachmeEng": 0,
"videoSessions": 0,
"mobilyzeEng": 1061,
"customersConnected": 1306,
"sharedMedia": 0,
"smsSent": 1302,
"smsRcvd": 1302,
"ongoingMobilyzeEng": 6,
"messagesExchanged": 2844,
"menuRcvd": 841,
"communicatingNow": 652,
"reachmeEng": 245
}
This API will retrieve the stats for the specific Ushur basis within the enterprise.
| Parameter | Description |
|---|---|
| statsParams | Contains list of parameters that will retrieve appropriate stats. These are comma separated list of stats parameters to be retrieved with corresponding values as below: statsParams - comma separated list of stats parameters to be retrieved with corresponding values as below : Ongoing Engagements : ongoingEng Total Visual Engagements : totalVisualEng Ongoing Visual Engagements : ongoingVisualEng SMS Sent : smsSent SMS Received : smsRcvd Total Input Received : totalInputRcvd Total Audio Sessions : totalAudioSessions Ongoing Audio Sessions : ongoingAudioSessions Total Video Sessions : totalVideoSessions Ongoing Video Sessions : ongoingVideoSessions Total Shared Media : totSharedMedia Ongoing Shared Media : ongoingSharedMedia Options Count : optionsCount" |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
This is a POST request.
HTTP POST to https://community.ushur.me/rest/campaign/stats with JSON
{
"statsParams":"ongoingEng,totalVisualEng,ongoingVisualEng,smsSent,smsRcvd,totalInputRcvd,totalAudioSessions,ongoingAudioSessions,totalVideoSessions,ongoingVideoSessions,totSharedMedia,ongoingSharedMedia,optionsCount",
"campaigns":"Camp2Create,SimpleMenuFeature,teslaMenu,ContactDataTest",
"level":"Month",
"startDate":"2015-01-01T00:00:00.000Z",
"endDate":"2016-01-31T23:59:59.999Z",
"tokenId" : "{{token}}",
<EMAIL_ADDRESS>}
level:Month/Day/Hourly (Mandatory)
startDate, endDate - Date Range Mandatory
campaigns - comma separated list of campaigns for which stats are to be retrieved
{
"respCode": 200,
"Data": [
{},
{
"totalInputRcvd": 0,
"ongoingEng": 1,
"ongoingVisualEng": 0,
"ongoingSharedMedia": 0,
"enterprise"<EMAIL_ADDRESS>"totalVideoSessions": 0,
"ongoingAudioSessions": 0,
"smsSent": 1,
"ongoingVideoSessions": 0,
"totalVisualEng": 0,
"totSharedMedia": 0,
"smsRcvd": 0,
"optionsCount": {},
"totalAudioSessions": 0,
"campaign": "SimpleMenuFeature"
},
{},
{
"totalInputRcvd": 0,
"ongoingEng": 4,
"ongoingVisualEng": 0,
"ongoingSharedMedia": 0,
"enterprise"<EMAIL_ADDRESS>"totalVideoSessions": 0,
"ongoingAudioSessions": 0,
"smsSent": 8,
"ongoingVideoSessions": 0,
"totalVisualEng": 0,
"totSharedMedia": 0,
"smsRcvd": 18,
"optionsCount": {},
"totalAudioSessions": 0,
"campaign": "ContactDataTest"
}
],
"infoText": "Request succeeded.",
"status": "success"
}
This API is used to retrieve the entire chat history on an enterprise and a unique id that identifies the specific chat exchanges. This can be used in a Ushur Widget or by enterprises in their own settings.
| Parameter | Description |
|---|---|
| cmd | getChatHistory: The command that retrieves the chat history. |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| primKeyId | An optional id but for which a chat history is retrieved. This is useful in the enterprise incident context. If not the chat history for entire account is returned. |
| startTime | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| startChatId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| userPhoneNo | These are optional parameters for filtering. |
| userName | These are optional parameters for filtering. |
This is a POST request.
URL: https://community.ushur.me/infoQuery
{
"cmd": "getChatHistory",
"primKeyId": "INC0000015",
"tokenId": "{{token}}",
"startTime": "2016-01-16T03:51:27.613Z",
"startChatId": "5699be43e4b0758fba87a2bf"
}
{
"result": [
{
"time": "2016-01-23T01:45:06.239Z",
"dir": "Out",
"msg": "[System Administrator]:okey",
"chatId": "56a2db22e4b0786af43bf84a"
},
{
"time": "2016-01-16T03:51:31.558Z",
"dir": "Inc",
"msg": "[Freddy]:Ok",
"chatId": "5699be43e4b0758fba87a2bf"
}
]
}
Among many services provided by the Ushur Platform, to reserve a unique identity that can be used to access a service or a device with a URL this API is used.
| Parameter | Description |
|---|---|
| Users can access their account using this email identifier they originally signed-up with. | |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| ushurId | An ID that can be reserved by the user. |
<EMAIL_ADDRESS>{
"status": "success",
"respCode": 200,
"infoText": "Id is reserved successfully."
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| infoText | A description of the response for the submitted request. |
This API would save the ushur id in the account.
| Parameter | Description |
|---|---|
| Users can access their account using this email identifier they originally signed-up with. | |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| ushurId | An ID that can be reserved by the user. |
<EMAIL_ADDRESS>{
"status": "success",
"respCode": "200",
"publicUrl": "https://www.ushur.me/connect?myfirstid",
"emailId"<EMAIL_ADDRESS>}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| publicUrl | This is the publicly accessible url with the ushur id. |
| emailId | The submitted email identifier is returned back for correlation purposes. If there are multiple outstanding requests, this helps the caller of the APIs to correlate requests and responses. |
This API is used to fetch the user availability behind the account.
| Parameter | Description |
|---|---|
| Users can access their account using this email identifier they originally signed-up with. | |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
<EMAIL_ADDRESS>{
"status": "success",
"respCode": 200,
"data": "available",
"infoText": "Availability status retrieved successfully."
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | No relevance today. |
| infoText | A description of the response for the submitted request. |
This API is to retrieve the phone number behind the account. The Ushur Account can be used for a reachable service whereby a phone number assigned to the account can be reached by a anonymous user (credentials can be based on configuration) using a unique URL assigned to the user on the Ushur Account.
| Parameter | Description |
|---|---|
| Users can access their account using this email identifier they originally signed-up with. | |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
<EMAIL_ADDRESS>{
"status":"success",
"respCode":"200",
"phoneNumber":"+16508888989",
<EMAIL_ADDRESS>}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| phoneNumber | The phone number of the account. |
| emailId | The submitted email identifier is returned back for correlation purposes. If there are multiple outstanding requests, this helps the caller of the APIs to correlate requests and responses. |
This API would retrieve the DND (Do Not Disturb) TimeZone.
| Parameter | Description |
|---|---|
| Users can access their account using this email identifier they originally signed-up with. | |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
<EMAIL_ADDRESS>{
"status": "success",
"respCode": 200,
"data": "US/East",
"infoText": "DND timezone retrieved successfully."
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | It will show different texts depending on the request. |
| infoText | A description of the response for the submitted request. |
This API will set the DND TimeZone on the account.
| Parameter | Description |
|---|---|
| Users can access their account using this email identifier they originally signed-up with. | |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
| timezone | The timezone that you choose to set. For example: US/West, US/East, etc. |
<EMAIL_ADDRESS>{
"status":"success",
"respCode":"200",
"infoText":"Changes saved sucessfully",
<EMAIL_ADDRESS>}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| infoText | A description of the response for the submitted request. |
| emailId | The submitted email identifier is returned back for correlation purposes. If there are multiple outstanding requests, this helps the caller of the APIs to correlate requests and responses. |
This API will retrieve the location of the user behind the Ushur Account.
| Parameter | Description |
|---|---|
| Users can access their account using this email identifier they originally signed-up with. | |
| tokenId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of login response. |
<EMAIL_ADDRESS>{
"status": "success",
"respCode": 200,
"data": null,
"infoText": "Location retrieved successfully."
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | An integer code for programmatic purposes. 200 denotes success and 4xx denotes failure. |
| data | It will show different texts depending on the request. |
| infoText | A description of the response for the submitted request. |
This API will set the business appearance properties such as the name, the title that goes out in the messages as display, offline messages to be sent out for the business as well as any nickname that is used for displaying on the Ushur Front-End Interface.
| Parameter | Description |
|---|---|
| Users can access their account using this email identifier they originally signed-up with. | |
| businessName | The business name of the account. |
| businessTitle | The business title of the account. |
| changeOfflinemsgcontent | |
| nickName | The nick name of the account. |
<EMAIL_ADDRESS>the Marketing dude&businessTitle=Marketing dude&changeOfflinemsgcontent=testing&nickName=Foobar
{
"status": "success",
"infoText": "Your preferences saved successfully"
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| infoText | A description of the response for the submitted request. |
This API gives the list of all the schedules activities for an Ushur
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| nRecords | Limit Number of records returned to this number -used for pagination |
| lastRecordId | id of last record Id of the set, used to get the next set of records starting from here |
| status | The status indicates whether the campaign is scheduled |
| startDate | The start date from which the activities needs to be captured for the given token ID |
| endDate | The end date to which the activities needs to be captured for the given token ID |
| campaignId | The Campaign ID for which the Activities details needs to be captured |
| apiVer | The version of the API being used which is by default set to 2.2 for this API |
Method : POST
https://community.ushur.me/infoQuery/GetUshurActivities
Content-Type:application/json
{
"tokenId":"",
"apiVer":"2.2",
"nRecords":"700",
"lastRecordId":null,
"status":"scheduled",
"startDate":"2019-12-26T06:46:21.165Z",
"endDate":"2020-12-26T06:46:21.165Z",
"campaignId":"ResponseTabUpdation"
}
{
{
"activities":[
{
"activityId":"b0a8d006-5d08-4d33-8fc2-12b14564f055-1577343044444",
"notificationId":"5e0458449e8e9b6fe3a7ce89",
"type":"scheduled",
"status":"scheduled",
"date":{
"$date":"2019-12-26T06:50:44.444Z"
},
"campaignId":"ResponseTabUpdation",
"ushurRecordId":"5e0458449e8e9b6fe3a7ce8a",
"notDate":{
"$date":"2019-12-26T07:00:44.405Z"
},
"notType":"INDIVIDUAL",
"notMsg.userPhNo":"+16614187487",
"notMsg.campaignId":"ResponseTabUpdation"
}
],
"counts":1,
"totalRecords":1,
"lastRecordId":"5e0458449e8e9b6fe3a7ce8a"
}
}
| Parameter | Description |
|---|---|
| activityId | The activity identifier that reflects the activity pertaining to the initiated request. This can be used in other APIs to track and operate (say even cancel) on the ongoing activity |
| notificationId | The notification id is internal identifier for the scheduled Ushur |
| type | The type specified if this is Scheduled Ushur (ushur sent out immediately) |
| status | The status to indicate whether details are for Scheduled, Initiated, Canceled activities |
| date | The date ushur is scheduled |
| campaignId | Ushur Name |
| ushurRecordId | Internal record identifier |
| notDate | Scheduled Date ( notification Date) |
| notType | Whether Notification is for INDIVIDUAL or BULK |
| notMsg.userPhoneNo | phone Number to which Ushur is scheduled |
| notMsg.campaignId | Ushur that is scheduled |
This API will provide information about a specific activity Id for a given ushur(campaign)
| Parameter | Description |
|---|---|
| tokenId | For any API operation other than the signup, the caller is expected to pass the credential which is this token Id that is returned upon a successful login submission. This tokenId must be sent in all API requests for other services. For security reasons, Ushur has some mechanisms whereby it can internally re-generate this tokenId which is unique in the system. If an API request fails, the API caller is required to invoke the Login API, retrieve the updated tokenId from the response and then use for subsequent API services. |
| activityId | The activity identifier that reflects the activity pertaining to the initiated request. This can be used in other APIs to track and operate (say even cancel) on the ongoing activity |
| filterCmd | The filter parameter that passed as input. For the specific example, activity details of the Ushur passed as filter |
| apiVer | The version of the API being used which is by default set to 2.1 for this API |
Method : POST
https://community.ushur.me/infoQuery/GetUshurActivity
Content-Type:application/json
{
"tokenId":"{{validTokenId}}",
"apiVer":"2.2",
"activityId":"b0a8d006-5d08-4d33-8fc2-12b14564f055-1577343044444",
"filterCmd":"getActivityDetails"
}
{
"activityId":"b0a8d006-5d08-4d33-8fc2-12b14564f055-1577343044444",
"notificationId":"5e0458449e8e9b6fe3a7ce89",
"type":"scheduled",
"status":"scheduled",
"date":{
"$date":"2019-12-26T06:50:44.444Z"
},
"campaignId":"ResponseTabUpdation",
"notDate":{
"$date":"2019-12-26T07:00:44.405Z"
},
"notType":"INDIVIDUAL",
"notMsg":{
"other":{
"metaData":"
{
"date":null,
"time":null,
"name":"test",
"location":"",
"bulk":false,
"cScope":"local
"}",
<EMAIL_ADDRESS>"campaignType":"OtherCampaigns",
"sendDate":"2019-12-26T07:00:44.405Z",
"campaignId":"ResponseTabUpdation",
"userPhoneNo":"+16614187487",
"intervalTimeUnit":"hours",
"virtualNumber":"14157671510",
"userMsg":"null",
"callBackNumber":"+918056286949"
},
"mEmailChannelActive":false,
"mEmailFrom":null,
"mEmailTo":null,
"mEmailSubject":null,
"mEmailBody":null,