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 log in 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":"ushurtester@gmail.com",
"password":"testushur"
}
{
"status": "success",
"respCode": "200",
"tokenId": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiYmQzMjIyNy0zMTY0LTRmNGEtYmNjYy1jMzdjZTg1MjlmMzYiLCJpYXQiOjE1NTkyNzYxNDEsInN1YiI6IkFjY291bnRBdXRoIiwiaXNzIjoiVVNIVVIiLCJhY2NvdW50RW5hYmxlZCI6IlkiLCJ1c2VyQWNjb3VudCI6IkdVUlVSQUpBLktPU0lHSUBVU0hVUi5DT00iLCJleHAiOjE1NTkyODMzNDF9.m_AQBIoUPdLMqrrBZ2S7pTAnsrkDLVpAGyLif2dQR9M",
"emailId": "ushurtester@gmail.com",
"nickName": "test4ushur",
"tokenLeaseTime": "120",
"tokenRenewThreshold": "3",
"eaAssociations": [
{
"bizName": "EnterpriseAccount-1"
},
{
"bizName": "EnterpriseAccount-2"
}
]
}
{
"status": "failure",
"respCode": "403",
"data": null,
"infoText": "Account not found",
}
{
"status": "failure",
"respCode": "200",
"infoText": "You are not a valid user",
"emailId": "xxxxxxx@gmail.com"
}
| 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 responseCodes tab 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 subsequent API section. |
| 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. |
| 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/accounts/login
Content-Type: application/json
{
"email":"user@domain.com",
"password":"userPassword"
}
{
"tokenId": "<<GENERATED-TOKEN>>",
"nickName": "userNickName",
"tokenLeaseTime": "60",
"tokenRenewThreshold": "3"
}
| Parameter | Description |
|---|---|
| The email address of the user account | |
| password | The password of the user account |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If account credentials aren't valid |
| 403 | If user is not authorized to login |
| 405 | If unsupported HTTP method is used |
| 200 | Successful login |
| 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. |
| nickName | The Nick Name in the account is returned |
| tokenLeaseTime | The lease duration is time to live value: the time in minutes for which the token is valid |
| tokenRenewThreshold | The maximum number of times the generated 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/accounts/tokens/refresh
Authorization: Bearer <TOKEN>
No request body
{
"tokenId": "<<GENERATED-TOKEN>>",
"tokenLeaseTime": "60",
"tokenRenewThreshold": "3"
}
| Parameter | Description |
|---|---|
| 401 | If token is invalid or expired |
| 405 | If unsupported HTTP method is used |
| 200 | Successful token refresh |
| 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. |
| tokenLeaseTime | The lease duration is time to live value: the time in minutes for which the token is valid |
| tokenRenewThreshold | The maximum number of times the generated 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 an email address that 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 the 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/accounts/dndStatus/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userName":"user@domain.com"
}
Method: POST
URL: https://instance.ushur.me/api/rest/accounts/dndStatus/search?userName=<user-email>
Authorization: Bearer <TOKEN>
No request body
{
"dndDateStatus": "N",
"dndTimeStatus": "N"
}
| Parameter | Description |
|---|---|
| userName | This should be an email address that Users used to login to their account when they originally signed-up with. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to get data |
| 405 | If unsupported HTTP method is used |
| 200 | Successful fetch of data |
| Parameter | Description |
|---|---|
| dndDateStatus | Y if DND is set for a date, N otherwise |
| dndTimeStatus | Y if DND is set for a time, N otherwise |
This is to retrieve the DoNotDisturb settings for the Ushur Account. An Account can represent an enterprise.
| Parameter | Description |
|---|---|
| userName | This should be an email address that 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 the login response. |
https://community.ushur.me/rest/doNotDisturb/getStatus?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, a list of days, or a single day. |
| infoText | A description of the response for the submitted request. |
Method: POST
URL: https://instance.ushur.me/api/rest/accounts/dndSchedule/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userName":"user@domain.com"
}
Method: POST
URL: https://instance.ushur.me/api/rest/accounts/dndSchedule/search?userName=<user-email>
Authorization: Bearer <TOKEN>
No request body
[
{
"date": "05-18",
"comment": "Holiday"
},
{
"date": "05-19",
"comment": "Holiday"
},
{
"date": "05-26",
"comment": "Holiday"
},
{
"time": "09:00,17:00",
"day": "everyday"
}
]
| Parameter | Description |
|---|---|
| userName | This should be an email address that Users used to login to their account when they originally signed-up with. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to get data |
| 405 | If unsupported HTTP method is used |
| 200 | Successful fetch of DND schedule (a schedule is set) |
| 204 | No DND schedule is set for date or time |
| Parameter | Description |
|---|---|
| Response body | An array is returned that contains the details about the DND schedule (including date and time DND schedules). |
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 | The JSON request body to be sent along with the API call. The JSON contains two keys: - dndTimeStatus: To update the DND Time Window. - dndDateStatus: To update the DND Holiday setting. For example, [ { "dndTimeStatus": "Y", "dndDateStatus": "Y" } ] |
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. |
Method: PATCH
URL: https://instance.ushur.me/api/rest/accounts/dndStatus
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userName": "<user-email>",
"dndStatus": {
"dndTimeStatus": "N",
"dndDateStatus": "N"
}
}
| Parameter | Description |
|---|---|
| dndStatus | The dndStatus is a JSON object that contains two keys: - dndTimeStatus: To update the DND Time Window. - dndDateStatus: To update the DND Holiday setting. For example, dndStatus: { "dndTimeStatus": "Y", "dndDateStatus": "Y" } |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to get data |
| 405 | If unsupported HTTP method is used |
| 204 | Success in setting DND status |
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 | The JSON body to be sent in the API call. Contains a list of JSON, each JSON contains DND scheduling info like - day: The day on which DND is to be scheduled - time: The time of the day during which DND will be active. For example, [ { "day": "mon,wed,fri", "time": "20:30,5:30" }, { "day": "weekends", "time": "22:00,5:00" } ] |
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. |
Method: PATCH
URL: https://instance.ushur.me/api/rest/accounts/dndSchedule
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userName": "<user-email>",
"dndSchedule": [
{ "day": "05-18", comment: "busy" },
{ "day": "mon,wed,fri", "time": "20:30,5:30" },
{ "day": "weekends", "time": "22:00,5:00" }
]
}
| Parameter | Description |
|---|---|
| userName | This should be an email address that Users used to login to their account when they originally signed-up with. |
| dndSchedule | This is an array that contains a list of JSON, each JSON contains DND scheduling info like - day: The day on which DND is to be scheduled - time: The time of the day during which DND will be active. For example, [ { "day": "mon,wed,fri", "time": "20:30,5:30" }, { "day": "weekends", "time": "22:00,5:00" } , {"day": "06-10", "comment": "public holiday"}] |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to get data |
| 405 | If unsupported HTTP method is used |
| 204 | Success in setting DND schedule |
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 | The response returns the list of accounts for a specific instance. |
Method: GET
URL: https://instance.ushur.me/api/rest/accounts
Authorization: Bearer <TOKEN>
Method: GET
URL: https://instance.ushur.me/api/rest/accounts?lastRecordId=50
Authorization: Bearer <TOKEN>
{
"accounts": [
"u1@domain.com",
"u2@domain.com",
"u3@domain.com"
],
"totalCount": 3,
"lastRecordId": 3
}
| Parameter | Description |
|---|---|
| lastRecordId | The last account ID is the record number stored in the DB. If not passed, it returns all the records for the instance. |
| Parameter | Description |
|---|---|
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to get data |
| 405 | If unsupported HTTP method is used |
| 200 | Success in fetching list of accounts |
| 204 | No accounts found |
| Parameter | Description |
|---|---|
| accounts | The 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 a 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":[
{
"userName":"XXXXX@GMAIL.COM",
"accountStatus":"active",
"roleType":"SuperUser",
"roleId":"SuperUser"
},
{
"userName":"firstname.lastname@USHUR.COM",
"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. |
Method: GET
URL: https://instance.ushur.me/api/rest/subAccounts
Authorization: Bearer <TOKEN>
Method: GET
URL: https://instance.ushur.me/api/rest/subAccounts?filterCmd=getRoleInfo
Authorization: Bearer <TOKEN>
{
"accounts": [
{
"userName": "u2@domain.com",
"accountStatus": "active"
}
],
"totalCount": 1,
"lastRecordId": 1
}
| Parameter | Description |
|---|---|
| filterCmd | The filter parameter that passed as input. For the specific example, Role details of the sub-accounts passed as a filter. |
| Parameter | Description |
|---|---|
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to get data |
| 405 | If unsupported HTTP method is used |
| 200 | Success in fetching list of sub accounts |
| 204 | No sub accounts found |
| Parameter | Description |
|---|---|
| userName | The account ID which is the email ID of the sub account. |
| accountStatus | Account is active or not |
| roleType | Type of user: normal, superuser, etc. |
| roleId | 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",
"username":"abcd@abcd.com",
"tokenId":"{{currentValidToken}}",
"apiVer":"2.2"
}
{
{
"userName": "abcd@abcd.COM",
"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 need to be set. |
| roleType | set the user role as Admin, Superuser, Normal, or custom. |
| roleId | The role 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",
"userName":"abcd@abcd.COM",
"apiVer":"2.1"
}
{
200 OK
{
"status":"success",
"respText":"Updated role successfully"
}
}
| Parameter | Description |
|---|---|
| status | Returns whether the specified privileges were set for the user or not. |
| respText | Returns the text message on whether the specified privileges were set or not. |
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",
"username":"abcd@abcd.com",
"tokenId":"{{currentValidToken}}",
"apiVer":"2.2"
}
{
{
"userName": "abcd@abcd.COM",
"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 role 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 need to be set. |
| roleType | set the user role as Admin, Superuser, Normal, or custom. |
| roleId | The role 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",
"userName":"abcd@abcd.COM",
"apiVer":"2.1"
}
{
200 OK
{
"status":"success",
"respText":"Updated role successfully"
}
}
| Parameter | Description |
|---|---|
| status | Returns whether the specified privileges were set for the user or not. |
| respText | Returns the text message on whether the specified privileges were set or not. |
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 customer 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 the 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 the value would return a more detailed response. Recommended to be used. |
| sendDate | An optional parameter. A scheduled send. At this UTC (Coordinated Universal Time) date the Ushur will be initiated. This scheduling happens regardless of the type of cmd. For example, a bulk campaign will be scheduled when this parameter is sent. |
| userTimezone | An optional field. This field can be utilized to specify the timezone to be used for DND calculation. |
| userEmailId | An optional parameter used to mention the email id to which an email is to be initiated. |
| expiry | An optional parameter. A JSON containing the engagement expiry deadline time specified by the number of days, hours, and minutes and a message that is to be displayed after the engagement is expired. |
| AppContext | The application context under which the ushur that you want to trigger is located. |
| content | A list of contents, in JSON format, that you wish to immediately add as meta data (i.e. add under Metadata tab). |
| variables | It should contain the values of campaign variables along with the keys in json format which will be used in the engagement. |
| launchParams | An optional parameter. A JSON containing the launch information such as launchMode, launchTime, launchSource, launchIdentifier, launchByUserEmail, launchByUserId |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"tokenId": "{{token}}",
"userPhoneNo": "+16614187487",
"userEmailId": "ushurtest@gmail.com",
"campaignId": "NetPromoterScore",
"userMsg": "Welcome",
"apiVer":"2.1",
"userTimezone": "EST",
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "The engagement expired."
}
}
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initBulkCampaign",
"tokenId": "{{demotokenid}}",
"campaignId": "NotifyWithIALink",
"groupId":"GroupA",
"apiVer":"3.1",
"sendDate": "2020-09-24T22:35:00.000Z"
}
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"tokenId":"{{tokenID}}",
"cmd":"initCampaign",
"userPhoneNo":"+16614187487",
"campaignId":"assetDownload",
"apiVer":"3.1",
"requestId":"001",
"AppContext":"Main",
"content":[
{
"e_nameDataNotation":"Initiate Ushur",
"e_idDataNotation":"1"
}
]
}
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"tokenId": "{{token}}",
"userPhoneNo": "+16614187487",
"userEmailId": "ushurtest@gmail.com",
"campaignId": "NetPromoterScore",
"userMsg": "Welcome",
"apiVer":"2.1",
"userTimezone": "EST",
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "The engagement expired."
},
"variables": {
"name":"Ushur",
"number":3,
"date":"11/11/21"
}
}
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"tokenId": "{{token}}",
"userPhoneNo": "+16614187487",
"userEmailId": "ushurtest@gmail.com",
"campaignId": "NetPromoterScore",
"userMsg": "Welcome",
"apiVer":"2.1",
"userTimezone": "EST",
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "The engagement expired."
},
"launchParams": {
"launchMode": "IP_PUSH",
"launchSource": "InvisiblePortal",
"launchIdentifier": "1690b066-e4cc-45b3-a1b6-1fb5b7ac6db6"
}
}
{
"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 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. |
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
});
};
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"}
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.
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/<USHUR_NAME>/launch
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+16614187487",
"userEmailId": "ushurtest@gmail.com",
"userTimezone": "EST",
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "The engagement expired."
}
}
{
"activityId": "e0c1a8e9-dc99-446a-8c36-a1beae3bf0db-1620970950043"
}
| Parameter | Description |
|---|---|
| USHUR_NAME | Name of the ushur to launch |
| 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. |
| userTimezone | An optional field. This field can be utilized to specify the timezone to be used for DND calculation. |
| userEmailId | An optional parameter used to mention the email id to which an email is to be initiated. |
| expiry | An optional parameter. A JSON containing the engagement expiry deadline time specified by the number of days, hours, and minutes and a message that is to be displayed after the engagement is expired. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to launch campaigns |
| 405 | If unsupported HTTP method is used |
| 202 | Successfully launched campaign |
| Parameter | Description |
|---|---|
| activityId | The activity identifier 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 to schedule 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.
Method: POST
URL: https://instances.ushur.me/ushurs/<USHUR_NAME>/schedule
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+16614187487",
"userEmailId": "ushurtest@gmail.com",
"userTimezone": "EST",
"sendDate": "2021-05-14T05:56:00.336Z",
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "The engagement expired."
}
}
{
"activityId": "e0c1a8e9-dc99-446a-8c36-a1beae3bf0db-1620970950043"
}
| Parameter | Description |
|---|---|
| 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. |
| sendDate | A mandatory parameter. A scheduled send. At this UTC (Coordinated Universal Time) date the Ushur will be initiated. This scheduling happens regardless of the type of cmd. For example, a bulk campaign will be scheduled when this parameter is sent. |
| userTimezone | An optional field. This field can be utilized to specify the timezone to be used for DND calculation. |
| userEmailId | An optional parameter used to mention the email id to which an email is to be initiated. |
| expiry | An optional parameter. A JSON containing the engagement expiry deadline time specified by the number of days, hours, and minutes and a message that is to be displayed after the engagement is expired. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to schedule campaigns |
| 405 | If unsupported HTTP method is used |
| 202 | Successfully scheduled campaign |
| Parameter | Description |
|---|---|
| activityId | The activity identifier 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 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 an (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 the 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 the 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/sendSMSMessage
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+16614187487",
"text": "This is the notify message"
}
| Parameter | Description |
|---|---|
| userPhoneNo | A mandatory parameter. This is the number to which text would be sent. |
| text | A mandatory parameter. This is the text to be sent to the phone number. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to launch campaigns |
| 405 | If unsupported HTTP method is used |
| 202 | Successfully submitted request to send text |
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 that have 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 the 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. |
| userTimezone | An optional field. This field can be utilized to specify the timezone to be used for DND calculation. |
| userEmailId | An optional parameter used to mention the email id to which an email is to be initiated. |
| expiry | An optional parameter. A JSON containing the engagement expiry deadline time specified by the number of days, hours, and minutes and a message that is to be displayed after the engagement is expired. |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"requestId" : "INC700001",
"callBackNumber": "12092078446",
"tokenId": "{{token}}",
"userPhoneNo": "12098746734",
"userEmailId": "ushurtest@gmail.com",
"userMsg": "my domain has issues in setup",
"campaignId": "ResConfV2_Ushur",
"userTimezone": "EST",
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "The engagement expired."
}
}
{
"status": "success",
"respCode": 200,
"respText": "Success",
"activityId": "0792c664-df05-47d0-9032-eb5e1c4ccaa5-1493285425824",
"userTimezone": "EST"
}
| 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/<USHUR_NAME>/launch
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+16614187487",
"userEmailId": "ushurtest@gmail.com",
"userTimezone": "EST",
"requestId": "REQ-ID-00001",
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "The engagement expired."
}
}
{
"activityId": "e0c1a8e9-dc99-446a-8c36-a1beae3bf0db-1620970950043"
}
| Parameter | Description |
|---|---|
| USHUR_NAME | Name of the ushur to launch |
| 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. |
| requestId | This is a unique request identifier from the enterprise system. An incident id from a remote service management system is an example. |
| 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. |
| userTimezone | An optional field. This field can be utilized to specify the timezone to be used for DND calculation. |
| userEmailId | An optional parameter used to mention the email id to which an email is to be initiated. |
| expiry | An optional parameter. A JSON containing the engagement expiry deadline time specified by the number of days, hours, and minutes and a message that is to be displayed after the engagement is expired. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to launch campaigns |
| 405 | If unsupported HTTP method is used |
| 202 | Successfully launched campaign |
| Parameter | Description |
|---|---|
| activityId | The activity identifier 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 the 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 the 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 are 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 response is coming from. |
| date | This is the time at which the message was sent or the 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/<USHUR_NAME>/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST_REQUEST_ID"
}
{
"stats": {
"menu.sent": 0,
"menu.resp": 0
},
"result": [
{
"name": "",
"phone": "+1408XXXYYYY",
"date": "2021-05-14T06:24:21.301Z",
"sid": "b564ec7d-43c6-4a58-a681-c04b48932f85-uxidxyz-f1a58b22-c220-4a23-b882-2c4eb10b5527",
"timestamp": "2021-05-14T06:24:21.300Z",
"location": "",
"response": {
"menuId": "proxyTestUshur",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[]:",
"origUserMsg": "[]:null",
"UeTagStart": "UeTag_Start",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"virtualNo": "12762402315"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"phone": "+1408XXXYYYY",
"date": "2021-05-14T06:24:21.335Z",
"sid": "b564ec7d-43c6-4a58-a681-c04b48932f85-uxidxyz-f1a58b22-c220-4a23-b882-2c4eb10b5527",
"timestamp": "2021-05-14T06:24:21.334Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_section_8335106c-59ab-4951-a1cd-c8b29c063f99",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_887451",
"dispStr": "Message Sent",
"assetId": "",
"content": "message1 null",
"sentOut": "yes",
"delivered": "true",
"delStatus": "delivered",
"moduleType": "promptmessage"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"phone": "+1408XXXYYYY",
"date": "2021-05-14T06:24:21.364Z",
"sid": "b564ec7d-43c6-4a58-a681-c04b48932f85-uxidxyz-f1a58b22-c220-4a23-b882-2c4eb10b5527",
"timestamp": "2021-05-14T06:24:21.357Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_section_e4306a9a-19aa-426a-89b8-1d9ac4b1ea07",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_308171",
"dispStr": "Message Sent",
"assetId": "",
"content": "Thanks!",
"sentOut": "yes",
"delivered": "true",
"delStatus": "delivered",
"moduleType": "thankyou"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"phone": "+1408XXXYYYY",
"date": "2021-05-14T06:24:21.383Z",
"sid": "b564ec7d-43c6-4a58-a681-c04b48932f85-uxidxyz-f1a58b22-c220-4a23-b882-2c4eb10b5527",
"timestamp": "2021-05-14T06:24:21.373Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_**ENDCAMPAIGN**",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_Primary_End",
"dispStr": "EndOfWorkflow",
"meta": {
"menuOptions": {}
}
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"phone": "+1408XXXYYYY",
"date": "2021-05-14T06:24:21.389Z",
"sid": "b564ec7d-43c6-4a58-a681-c04b48932f85-uxidxyz-f1a58b22-c220-4a23-b882-2c4eb10b5527",
"timestamp": "2021-05-14T06:24:21.389Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_**ENDCAMPAIGN**",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_End",
"dispStr": "EndOfUshur",
"meta": {
"menuOptions": {}
}
},
"requestId": "TEST_REQUEST_ID"
}
],
"counts": 5,
"totalRecords": 5
}
| Parameter | Description |
|---|---|
| USHUR_NAME | This is the Ushur that was initiated for which responses are being requested here. |
| requestId | The request identifier for which responses are being retrieved. |
| inLastMinutes | An optional parameter. This fetches records in last N minutes. |
| 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. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to retrieve data |
| 405 | If unsupported HTTP method is used |
| 202 | Successfully retrieved all the responses |
| 206 | Successfully retrieved a batch of the responses |
| 204 | No responses found |
| 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 response is coming from. |
| date | This is the time at which the message was sent or the 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 the 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 are 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 are 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"
}
| Parameter | Description |
|---|---|
| Method: POST URL: https://community.ushur.me/infoQuery Content-Type: application/json { "cmd":"responseForReqId", "requestId":"INC700001", "tokenId":"{{token}}", "campaignId":"ResConfV2_Ushur", "UeTag" : "UeTag_FeedbackComment" } |
| 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 response 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/<USHUR_NAME>/uetags/<UE_TAGS>/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST_REQUEST_ID"
}
{
"result": [
{
"name": "",
"phone": "+1408XXXYYYY",
"date": "2021-05-15T00:02:52.631Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID"
}
],
"counts": 1,
"totalRecords": 1,
"lastRecordId": "609f0facbd8c2573a6d9225c"
}
| Parameter | Description |
|---|---|
| USHUR_NAME | This is the Ushur that was initiated for which responses are being requested here. |
| UE_TAGS | This is the Ushur Micro-Engagement Tag for which a specific response is given back. These tags are campaign-specific and are expected to be known by the requestor who is aware of the campaign and the tags associated. Example: UeTag_123456,UeTag_654321. |
| requestId | The request identifier for which responses are being retrieved. |
| 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. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to retrieve data |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved all responses |
| 206 | Successfully retrieved a batch of responses |
| 204 | No responses found |
| 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 response 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 an 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 sets 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 the 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 ushurRecordId. |
| 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."
},
"requestId": "INC0010117",
"sid": "4db06b91-1ed0-43a9-af8d-c7d822082d9f-uxidxyz-35457f74-0f4d-490a-9990-5fe4bd44b89a"
},
{
"name": "",
"phone": "+16614187487",
"date": "2016-05-03T00:45:11.743Z",
"response": {
"UeTag": "UeTag_927455",
"dispStr": "Menu Sent",
"topic": "Has your issue been resolved?\nPlease respond with a number"
},
"requestId": "INC0010117",
"sid": "619764ad-83c6-4fd1-b07b-7ce5131cb6dc-uxidxyz-76e2d72c-2ee1-46fa-a10e-1b3fb7b6e855"
}
],
"counts": 4,
"lastRecordId": "5727f497e9513852305bb48a"
}
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId":"INC0010117",
"filterCmd":"getCounts,getSids",
"tokenId":"{{ven1177token}}",
"campaignId": "UshurResolutionConfirmation",
"UeTag": "UeTag_927455,UeTag_881809,UeTag_382867,UeTag_253937,UeTag_457543,UeTag_635124,UeTag_847034,UeTag_End"
}
{
"UeTag": "UeTag_927455,UeTag_881809,UeTag_382867,UeTag_253937,UeTag_457543,UeTag_635124,UeTag_847034,UeTag_End",
"UeTag_847034": "1",
"UeTag_881809": "1",
"UeTag_927455": "2",
"UeTag_382867": "0",
"UeTag_253937": "0",
"UeTag_457543": "0",
"UeTag_635124": "0",
"UeTag_End": "0",
"counts": 4
}
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId":"INC0010117",
"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-03T00:45:11.743Z",
"response": {
"UeTag": "UeTag_927455",
"dispStr": "Menu Sent",
"topic": "Has your issue been resolved?\nPlease respond with a number"
},
"requestId": "INC0010117",
"sid": "619764ad-83c6-4fd1-b07b-7ce5131cb6dc-uxidxyz-76e2d72c-2ee1-46fa-a10e-1b3fb7b6e855"
}
],
"counts": 1,
"lastRecordId": "5727f497e9513852305bb48a"
}
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId":"INC0010117",
"filterCmd":"getSids,LastFirst",
"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:45:11.743Z",
"response": {
"UeTag": "UeTag_927455",
"dispStr": "Menu Sent",
"topic": "Has your issue been resolved?\nPlease respond with a number"
},
"requestId": "INC0010117",
"sid": "619764ad-83c6-4fd1-b07b-7ce5131cb6dc-uxidxyz-76e2d72c-2ee1-46fa-a10e-1b3fb7b6e855"
},
{
"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."
},
"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: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"
}
],
"counts": 4,
"lastRecordId": "5727f45ce9513852305bb486"
}
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId":"INC0010117",
"filterCmd":"getCounts,getSids",
"tokenId":"{{ven1177token}}",
"campaignId": "UshurResolutionConfirmation",
"UeTag": "UeTag_927455,UeTag_881809,UeTag_382867,UeTag_253937,UeTag_457543,UeTag_635124,UeTag_847034,UeTag_End"
}
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId":"INC0010117",
"filterCmd":"getSids,LastFirst,getRecordIds",
"tokenId":"{{ven1177token}}",
"campaignId": "UshurResolutionConfirmation",
"UeTag": "UeTag_927455,UeTag_881809,UeTag_382867,UeTag_253937,UeTag_457543,UeTag_635124,UeTag_847034,UeTag_End"
}
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"cmd":"responseForReqId",
"requestId":"INC0010117",
"filterCmd":"getSids,LastFirst,getRecordIds",
"tokenId":"{{ven1177token}}",
"campaignId": "UshurResolutionConfirmation",
"UeTag": "UeTag_927455,UeTag_881809,UeTag_382867,UeTag_253937,UeTag_457543,UeTag_635124,UeTag_847034,UeTag_End"
}
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"
}
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/proxyTestUshur/uetags/UeTag_058297,UeTag_058298/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST_REQUEST_ID",
"filterCmd": "getSids"
}
{
"result": [
{
"name": "",
"date": "2021-05-15T00:45:08.977Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "918cc357-a80e-4d79-a62e-64ffad27d3f8-uxidxyz-7003a566-ad32-465f-ad53-8f0352967035"
},
{
"name": "",
"date": "2021-05-15T00:45:10.084Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "27eaed7c-8409-4ebc-9a5d-5682a8d074eb-uxidxyz-f797378f-9864-4b5e-a0d0-01ec05a912f6"
},
{
"name": "",
"date": "2021-05-15T00:45:11.046Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "de7c752a-cefe-47bd-917c-929c8e7915a3-uxidxyz-2451c596-7b37-4a96-a5fd-1633c317c5c8"
}
],
"counts": 3,
"totalRecords": 3,
"lastRecordId": "609f1997bd8c2573a6d9226b"
}
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/proxyTestUshur/uetags/UeTag_058297,UeTag_058298/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST_REQUEST_ID",
"filterCmd": "getCounts"
}
{
"UeTag": "UeTag_058297,UeTag_058298",
"UeTag_058297": "3",
"UeTag_058298": "0",
"counts": 3
}
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/proxyTestUshur/uetags/UeTag_058297,UeTag_058298/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST_REQUEST_ID",
"filterCmd": "getLastEngagement,getSids"
}
{
"result": [
{
"name": "",
"date": "2021-05-15T00:45:08.977Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "918cc357-a80e-4d79-a62e-64ffad27d3f8-uxidxyz-7003a566-ad32-465f-ad53-8f0352967035"
},
{
"name": "",
"date": "2021-05-15T00:45:10.084Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "27eaed7c-8409-4ebc-9a5d-5682a8d074eb-uxidxyz-f797378f-9864-4b5e-a0d0-01ec05a912f6"
},
{
"name": "",
"date": "2021-05-15T00:45:11.046Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "de7c752a-cefe-47bd-917c-929c8e7915a3-uxidxyz-2451c596-7b37-4a96-a5fd-1633c317c5c8"
}
],
"counts": 3,
"totalRecords": 3,
"lastRecordId": "609f1997bd8c2573a6d9226b"
}
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/proxyTestUshur/uetags/UeTag_058297,UeTag_058298/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST_REQUEST_ID",
"filterCmd": "LastFirst,getSids"
}
{
"result": [
{
"name": "",
"date": "2021-05-15T00:45:11.046Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "de7c752a-cefe-47bd-917c-929c8e7915a3-uxidxyz-2451c596-7b37-4a96-a5fd-1633c317c5c8"
},
{
"name": "",
"date": "2021-05-15T00:45:10.084Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "27eaed7c-8409-4ebc-9a5d-5682a8d074eb-uxidxyz-f797378f-9864-4b5e-a0d0-01ec05a912f6"
},
{
"name": "",
"date": "2021-05-15T00:45:08.977Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "918cc357-a80e-4d79-a62e-64ffad27d3f8-uxidxyz-7003a566-ad32-465f-ad53-8f0352967035"
}
],
"counts": 3,
"totalRecords": 3,
"lastRecordId": "609f1994bd8c2573a6d92261"
}
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/proxyTestUshur/uetags/UeTag_058297,UeTag_058298/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST_REQUEST_ID",
"filterCmd": "getSids,LastFirst,getRecordIds"
}
{
"result": [
{
"name": "",
"date": "2021-05-15T01:48:47.336Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "fa6bac68-6997-43c9-aea8-817761677338-uxidxyz-bde3af41-6093-4694-91fe-a29829351309",
"ushurRecordId": "609f287fbd8c2573a6d9227a"
},
{
"name": "",
"date": "2021-05-15T01:48:46.593Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "d48cb507-e8fd-4a6e-96e3-a86ad43620b6-uxidxyz-f16b9941-54f5-40f4-bcb5-eade0c6054ac",
"ushurRecordId": "609f287ebd8c2573a6d92275"
},
{
"name": "",
"date": "2021-05-15T01:48:45.239Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"delivered": "false",
"delStatus": "ToBeSentOut"
},
"requestId": "TEST_REQUEST_ID",
"sid": "8c5a7f15-f405-4f3b-b55c-32762b7d46a4-uxidxyz-2702798e-d6f8-46cf-bbe4-8d8a1e61f36f",
"ushurRecordId": "609f287dbd8c2573a6d92270"
}
],
"counts": 3,
"totalRecords": 3,
"lastRecordId": "609f287dbd8c2573a6d92270"
}
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/proxyTestUshur/uetags/UeTag_058297,UeTag_058298/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST_REQUEST_ID",
"delivered": true
}
{
"result": [
{
"name": "",
"phone": "+1408XXXYYYY",
"date": "2021-05-15T01:54:23.900Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"delivered": "true",
"delStatus": "delivered"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"phone": "+14089178304",
"date": "2021-05-15T01:54:24.605Z",
"response": {
"campaignId": "proxyTestUshur",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"delivered": "true",
"delStatus": "delivered"
},
"requestId": "TEST_REQUEST_ID"
}
],
"counts": 2,
"totalRecords": 2,
"lastRecordId": "609f29d0bd8c2573a6d922a2"
}
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/proxyTestUshur/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST_REQUEST_ID",
"filterCmd": "getSids,LastFirst"
}
{
"stats": {
"menu.sent": 0,
"menu.resp": 0
},
"result": [
{
"name": "",
"date": "2021-05-15T02:00:27.880Z",
"sid": "6436cd3e-7249-493d-8b1a-1a2cd303c230-uxidxyz-36c03b49-6099-4c21-ae3d-fae25b0b2e59",
"timestamp": "2021-05-15T02:00:27.880Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_**ENDCAMPAIGN**",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_End",
"dispStr": "EndOfUshur",
"meta": {
"menuOptions": {}
}
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-15T02:00:27.874Z",
"sid": "6436cd3e-7249-493d-8b1a-1a2cd303c230-uxidxyz-36c03b49-6099-4c21-ae3d-fae25b0b2e59",
"timestamp": "2021-05-15T02:00:27.870Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_**ENDCAMPAIGN**",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_Primary_End",
"dispStr": "EndOfWorkflow",
"meta": {
"menuOptions": {}
}
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-15T02:00:27.861Z",
"sid": "6436cd3e-7249-493d-8b1a-1a2cd303c230-uxidxyz-36c03b49-6099-4c21-ae3d-fae25b0b2e59",
"timestamp": "2021-05-15T02:00:27.856Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_section_e4306a9a-19aa-426a-89b8-1d9ac4b1ea07",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_308171",
"dispStr": "Message Sent",
"assetId": "",
"content": "Thanks!",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"moduleType": "thankyou"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-15T02:00:27.839Z",
"sid": "6436cd3e-7249-493d-8b1a-1a2cd303c230-uxidxyz-36c03b49-6099-4c21-ae3d-fae25b0b2e59",
"timestamp": "2021-05-15T02:00:27.833Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_section_8335106c-59ab-4951-a1cd-c8b29c063f99",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_887451",
"dispStr": "Message Sent",
"assetId": "",
"content": "message1 null",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"moduleType": "promptmessage"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-15T02:00:27.815Z",
"sid": "6436cd3e-7249-493d-8b1a-1a2cd303c230-uxidxyz-36c03b49-6099-4c21-ae3d-fae25b0b2e59",
"timestamp": "2021-05-15T02:00:27.813Z",
"location": "",
"response": {
"menuId": "proxyTestUshur",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"origUserMsg": "[mayank]:null",
"UeTagStart": "UeTag_Start",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"virtualNo": "12762402315"
},
"requestId": "TEST_REQUEST_ID"
}
],
"counts": 5,
"totalRecords": 5
}
This query will fetch all responses without any filters and with many 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 the login response. |
| startDate | The date of the 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 are 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"
}
{
"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 the message was sent or the 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 response 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. |
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
});
};
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"}
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();
}
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/proxyTestUshur/activities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"startDate": "2021-05-16T18:36:34.195Z",
"endDate": "2021-05-17T20:36:34.195Z"
}
{
"stats": {
"menu.sent": 0,
"menu.resp": 0
},
"result": [
{
"name": "",
"date": "2021-05-17T18:36:14.287Z",
"sid": "40ba8883-df55-4ce7-b0bc-7117ca39fe29-uxidxyz-152679bd-8d3b-4513-8875-cd246f352234",
"timestamp": "2021-05-17T18:36:14.286Z",
"location": "",
"response": {
"menuId": "proxyTestUshur",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"origUserMsg": "[mayank]:null",
"UeTagStart": "UeTag_Start",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"virtualNo": "12762402315"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-17T18:36:14.309Z",
"sid": "40ba8883-df55-4ce7-b0bc-7117ca39fe29-uxidxyz-152679bd-8d3b-4513-8875-cd246f352234",
"timestamp": "2021-05-17T18:36:14.308Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_section_8335106c-59ab-4951-a1cd-c8b29c063f99",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_887451",
"dispStr": "Message Sent",
"assetId": "",
"content": "message1 null",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"moduleType": "promptmessage"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-17T18:36:14.338Z",
"sid": "40ba8883-df55-4ce7-b0bc-7117ca39fe29-uxidxyz-152679bd-8d3b-4513-8875-cd246f352234",
"timestamp": "2021-05-17T18:36:14.332Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_section_e4306a9a-19aa-426a-89b8-1d9ac4b1ea07",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_308171",
"dispStr": "Message Sent",
"assetId": "",
"content": "Thanks!",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"moduleType": "thankyou"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-17T18:36:14.352Z",
"sid": "40ba8883-df55-4ce7-b0bc-7117ca39fe29-uxidxyz-152679bd-8d3b-4513-8875-cd246f352234",
"timestamp": "2021-05-17T18:36:14.348Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_**ENDCAMPAIGN**",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_Primary_End",
"dispStr": "EndOfWorkflow",
"meta": {
"menuOptions": {}
}
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-17T18:36:14.357Z",
"sid": "40ba8883-df55-4ce7-b0bc-7117ca39fe29-uxidxyz-152679bd-8d3b-4513-8875-cd246f352234",
"timestamp": "2021-05-17T18:36:14.357Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_**ENDCAMPAIGN**",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_End",
"dispStr": "EndOfUshur",
"meta": {
"menuOptions": {}
}
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-17T18:36:16.531Z",
"sid": "48ee8e3e-cddd-4a24-8c15-34378b1cd5ee-uxidxyz-a5f53033-a0de-4ca3-b047-6304a9a53386",
"timestamp": "2021-05-17T18:36:16.530Z",
"location": "",
"response": {
"menuId": "proxyTestUshur",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_058297",
"dispStr": "Message Sent",
"content": "[mayank]:",
"origUserMsg": "[mayank]:null",
"UeTagStart": "UeTag_Start",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"virtualNo": "12762402315"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-17T18:36:16.553Z",
"sid": "48ee8e3e-cddd-4a24-8c15-34378b1cd5ee-uxidxyz-a5f53033-a0de-4ca3-b047-6304a9a53386",
"timestamp": "2021-05-17T18:36:16.552Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_section_8335106c-59ab-4951-a1cd-c8b29c063f99",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_887451",
"dispStr": "Message Sent",
"assetId": "",
"content": "message1 null",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"moduleType": "promptmessage"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-17T18:36:16.577Z",
"sid": "48ee8e3e-cddd-4a24-8c15-34378b1cd5ee-uxidxyz-a5f53033-a0de-4ca3-b047-6304a9a53386",
"timestamp": "2021-05-17T18:36:16.571Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_section_e4306a9a-19aa-426a-89b8-1d9ac4b1ea07",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_308171",
"dispStr": "Message Sent",
"assetId": "",
"content": "Thanks!",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"moduleType": "thankyou"
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-17T18:36:16.588Z",
"sid": "48ee8e3e-cddd-4a24-8c15-34378b1cd5ee-uxidxyz-a5f53033-a0de-4ca3-b047-6304a9a53386",
"timestamp": "2021-05-17T18:36:16.586Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_**ENDCAMPAIGN**",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_Primary_End",
"dispStr": "EndOfWorkflow",
"meta": {
"menuOptions": {}
}
},
"requestId": "TEST_REQUEST_ID"
},
{
"name": "",
"date": "2021-05-17T18:36:16.593Z",
"sid": "48ee8e3e-cddd-4a24-8c15-34378b1cd5ee-uxidxyz-a5f53033-a0de-4ca3-b047-6304a9a53386",
"timestamp": "2021-05-17T18:36:16.593Z",
"location": "",
"response": {
"menuId": "proxyTestUshur_child_**ENDCAMPAIGN**",
"campaignId": "proxyTestUshur",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_End",
"dispStr": "EndOfUshur",
"meta": {
"menuOptions": {}
}
},
"requestId": "TEST_REQUEST_ID"
}
],
"counts": 10,
"lastRecordId": "60a2b7a0bd8c2573a6d922b9",
"totalRecords": 10
}
| Parameter | Description |
|---|---|
| startDate | The date of the request sent or responses received. |
| endDate | The ending date for which responses are to be retrieved. |
| inLastMinutes | This gets the responses in given last minutes from current time. This can be used in place of startDate and endDate. |
| 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 are retrieved. The startDate, endDate, and userPhoneNo can be combined in all the other discussed requests here. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to retrieve data |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved all responses |
| 206 | Successfully retrieved a batch of responses |
| 204 | No responses found |
| Parameter | Description |
|---|---|
| date | This is the time at which the message was sent or the 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 response 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 that 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 the login response. (*) WARNING: Querying only with this tokenId will result in a very huge response! The recommendation is to have queries based on campaignId, UeTag, and other combinations. If the entire records are 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 the 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 the 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 | This 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 the Ushur platform will reply after the successful processing of email. |
| apiVer | The version of the API being used which is by default set to 3.1 for this API. |
| emailAttachmentURL | An optional parameter. A list of URLs of resources that you wish to attach as attachments to the email being sent for processing. Every URL must be a downloadable link, i.e. when opened in a browser it should either download the file/content or preview the content of the file. |
| expiry | An optional parameter. A JSON containing the engagement expiry deadline time specified by the number of days, hours, and minutes and a message that is to be displayed after the engagement is expired. |
| variables | It should contain the values of campaign variables along with the keys in json format which will be used in the engagement. |
Method: POST
URL: https://community.ushur.me/onIncomingEmail
Content-Type: application/json
{
"tokenId": {{currentValidToken}},
"uniqueIncEmailId": "emailClassification",
"emailServiceId": "classify@qa.ushur.me",
"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": "ushurtester@gmail.com",
"apiVer": "3.1",
"emailAttachmentURL": ["https://file-examples-com.github.io/uploads/2017/10/file-sample_150kB.pdf","http://spatialkeydocs.s3.amazonaws.com/FL_insurance_sample.csv.zip"],
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "Engagement expired"
},
"variables": {
"name":"Ushur",
"number":3,
"date":"11/11/21"
}
}
Method: POST
URL: https://community.ushur.me/onIncomingEmail
Content-Type: application/json
{
"tokenId": {{currentValidToken}},
"uniqueIncEmailId": "emailClassification",
"emailServiceId": "classify@qa.ushur.me",
"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": "ushurtester@gmail.com",
"apiVer": "3.1",
"Attachment1"="@/C:/Users/Arun/Desktop/test.csv",,
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "Engagement expired"
},
"variables": {
"name":"Ushur",
"number":3,
"date":"11/11/21"
}
}
{
200 OK
{
SUCCESS: Email submitted for Data Extraction and Categorization!
}
}
| Parameter | Description |
|---|---|
| SUCCESS | Email submitted for Data Extraction and Categorization! |
Method: POST
URL: https://instance.ushur.me/api/rest/emails/incoming
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"uniqueIncEmailId": "emailClassification",
"emailServiceId": "classify@qa.ushur.me",
"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": "ushurtester@gmail.com",
"emailAttachmentURL": ["https://file-examples-com.github.io/uploads/2017/10/file-sample_150kB.pdf","http://spatialkeydocs.s3.amazonaws.com/FL_insurance_sample.csv.zip"],
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "Engagement expired"
}
}
202 ACCEPTED
| Parameter | Description |
|---|---|
| uniqueIncEmailId | This is the Ushur/Campaign name for the email Classification. |
| emailServiceId | This 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 the Ushur platform will reply after the successful processing of email. |
| emailAttachmentURL | An optional parameter. A list of URLs of resources that you wish to attach as attachments to the email being sent for processing. Every URL must be a downloadable link, i.e. when opened in a browser it should either download the file/content or preview the content of the file. |
| expiry | An optional parameter. A JSON containing the engagement expiry deadline time specified by the number of days, hours, and minutes and a message that is to be displayed after the engagement is expired. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 202 | Successfully submitted the request |
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" : "ABCD@XXXX.COM" ,
"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 are returned. |
Method: POST
URL: https://instance.ushur.me/api/rest/blacklist/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "14089991234"
}
{
"acctUserName": "abc@ushur.com",
"acctUserFullName": "",
"isOperInit": true,
"userName": "user+14089991234",
"userPhoneNo": "+14089991234",
"id": "5ff6ae2813fb3d29a871fcc3",
"updatedDate": "2021-01-07T06:46:00.978Z"
}
| Parameter | Description |
|---|---|
| userPhoneNo | The phone number of the user |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved blacklisted data for given phone number |
| 204 | Number is not blacklisted |
| Parameter | Description |
|---|---|
| acctUserName | The email id or account where the phone number is present. |
| acctUserFullName | The account user's full name.. |
| isOperInit | If blacklisted by operator |
| userName | The name of the user. |
| userPhoneNo | The phone number of the user. |
| updatedDate | The timestamp of last update of the blacklisted record. |
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 or Ushur Api Key created for the enterprise. 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 whether the phone was blackListedlisted or not. |
| blackListed | The response will return either true or false. True is, a phone is blacklisted or already blacklisted |
| userPhoneNo | The user phone number that was blacklisted or already blacklisted. |
Method: PUT
URL: https://instance.ushur.me/api/rest/blacklist
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "4081112222",
"acctUserName": "abc@ushur.com",
"acctUserFullName": ""
}
201 CREATED
| Parameter | Description |
|---|---|
| userPhoneNo | The phone number of the user |
| acctUserFullName | The account user's full name. This is optional parameter. |
| acctUserName | The email id or account where the phone number is present. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 201 | Successfully created the record |
Removes a phone number present in the 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 the 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 the number is blacklisted ( or whitelisted ) by the user doing Optout/STOP/option), then it can be removed from the respective list only if the SuppEntOverridingUserOptout flag is YES. If this is NO, the 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 whether the API returns a success or failure. |
| removed | The response will return either true or false, true if the phone is removed from the blacklist and false if the phone number is not in the blacklist or failed to remove from the blacklist. |
| userPhoneNo | The user phone number that was blacklisted or already blacklisted. |
| respText | A textual description of the response. |
Method: DELETE
URL: https://instance.ushur.me/api/rest/blacklist
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "4081112222",
"acctUserName": "abc@ushur.com",
"acctUserFullName": ""
}
204 NO CONTENT
| Parameter | Description |
|---|---|
| acctUserName | The email id or account where the phone number is present. |
| acctUserFullName | The account user's full name. This is optional parameter. |
| userPhoneNo | The phone number of the user |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 204 | Successfully completed the request |
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 whether the API returns a success or failure. |
| whiteListed | The response will return either true or false, true if the phone is whitelisted and false if the phone number is not in whitelisted. |
| userPhoneNo | The 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/whitelist/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "14089991234"
}
{
"acctUserName": "abc@ushur.com",
"acctUserFullName": "",
"isOperInit": true,
"userName": "user+14089991234",
"userPhoneNo": "+14089991234",
"id": "5ff6b1a413fb3d29a871fcd5",
"updatedDate": "2021-01-07T07:00:52.035Z"
}
| Parameter | Description |
|---|---|
| userPhoneNo | The phone number of the user |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully completed the request |
| 204 | No data found |
| Parameter | Description |
|---|---|
| acctUserName | The email id or account where the phone number is present. |
| acctUserFullName | The account user's full name. |
| userPhoneNo | The phone number of the user. |
| userName | The name of the user. |
| isOperInit | If whitelisted by the operator. |
| updatedDate | The timestamp of last update of the whitelisted record. |
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 whether the phone was whitelisted or not. |
| whiteListed | The response will return either true or false. True is, the phone is whiteListed or already whiteListed. |
| userPhoneNo | The user phone number that was whiteListed or already whiteListed. |
Method: PUT
URL: https://instance.ushur.me/api/rest/whitelist
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "4081112222",
"acctUserName": "abc@ushur.com",
"acctUserFullName": ""
}
204 NO CONTENT
| Parameter | Description |
|---|---|
| userPhoneNo | The phone number of the user. |
| acctUserName | The email id or account where the phone number is present. |
| acctUserFullName | The account user's full name. This is optional. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 204 | Successfully executed the request |
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 the 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 whether the API returns a success or failure. |
| removed | The response will return either true or false, true if the phone is removed from the whitelist and false if the phone number is not in whitelist or failed to remove from the whitelist. |
| userPhoneNo | The user phone number that was whitelisted or already whitelisted. |
| respText | A textual description of the response. |
Method: DELETE
URL: https://instance.ushur.me/api/rest/whitelist
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "4081112222",
"acctUserName": "abc@ushur.com",
"acctUserFullName": ""
}
204 NO CONTENT
| Parameter | Description |
|---|---|
| userPhoneNo | The phone number of the user. |
| acctUserName | The email id or account where the phone number is present. |
| acctUserFullName | The account user's full name. This is optional. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 204 | Successfully executed the request |
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 | The user phone number that was moved from BlackList to WhiteList. |
| respText | A textual description of the response. |
| enterpriseInitiated | If the 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 | The date, this record is updated. |
| createdDate | The date, this record is created. |
Method: POST
URL: https://instance.ushur.me/api/rest/blacktowhitelist/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"users": [
{
"userName": "user+14089991235",
"userPhoneNo": "+14089991235",
"createdDate": "2021-02-06T23:09:30.902Z",
"updatedDate": "2021-02-06T23:09:30.902Z"
},
{
"userName": "user4081112222",
"userPhoneNo": "4081112222",
"createdDate": "2021-05-17T21:02:27.596Z",
"updatedDate": "2021-05-17T21:02:27.596Z"
}
],
"count": 2,
"totalRecords": 2,
"totalPrevRecords": 0,
"totalNextRecords": 0
}
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved all the data |
| 206 | Successfully retrieved a batch of the data |
| 204 | No data found |
| Parameter | Description |
|---|---|
| userName | The name of the user. |
| userPhoneNo | The phone number of the user. |
| enterpriseInitiated | If the 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 | The date, this record is updated. |
| createdDate | The 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 specific UshurID / Campaign. |
Method: GET
URL: https://instance.ushur.me/api/rest/ushurs/<USHUR_NAME>/uetags
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"ushurId": "proxyTestUshur",
"result": [
{
"UeTag": "UeTag_058297"
},
{
"message": "message1 $u_OrigMessageWithoutHeader$",
"UeTag": "UeTag_887451"
},
{
"message": "Thanks!",
"UeTag": "UeTag_308171"
}
],
"tagCount": 3
}
| Parameter | Description |
|---|---|
| USHUR_NAME | Name of the ushur. |
| Parameter | Description |
|---|---|
| 401 | If token is invalid or expired |
| 400 | If mandatory parameters are missing |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved the data |
| 204 | No data found |
| 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 specific 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 | This activity identifier is what was received in the response when initiating an Ushur. Note that only a scheduled Ushur that is not launched yet has an activity today and that which can be canceled using this API. |
| 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 canceled or not. |
| respText | A textual description of the response. |
Method: DELETE
URL: https://instance.ushur.me/api/rest/scheduledActivities?activityId=<ACTIVITY_ID>
Authorization: Bearer <TOKEN>
204 NO CONTENT
| Parameter | Description |
|---|---|
| ACTIVITY_ID | This activity identifier is what was received in the response when initiating an Ushur. Note that only a scheduled Ushur that is not launched yet has an activity today and that which can be canceled using this API. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 204 | Successfully executed the request |
This API is to initiate an Ushur (also called as Campaign) to all phone numbers in a particular contact group within an enterprise or to phone numbers in the contacts of an Ushur or to phone numbers within an enterprise. The group can be created under an enterprise account and be loaded with a list of user information such as name, phone number and email address. The order is as follows: Enterprise Contacts (global), Ushur Contacts where Contacts are present in the scope of an Ushur (local scope) and then multiple groups can be created with an enterprise where each group can have a list of contacts.
| Parameter | Description |
|---|---|
| cmd | initBulkCampaign |
| tokenId | A mandatory parameter. |
| campaignId | A mandatory parameter. The name of the ushur to be launched. |
| groupId | Optional. The name of the group in the enterprise that has a list of contact information in it. This parameter is needed only when sending to a group. |
| apiVer | 3.1 |
| cScope | Optional. value is "local" - when need to launch ushur to all contacts within the specific campaignId (ushur). value is "global" - when need to launch ushur to all contacts within the entire enterprise. The groupId and cScope are mutually exclusive parameters. |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initBulkCampaign",
"tokenId": "{{demotokenid}}",
"campaignId": "NotifyWithIALink",
"groupId":"GroupA",
"apiVer":"3.1"
}
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initBulkCampaign",
"tokenId": "{{demotokenid}}",
"campaignId": "NotifyWithIALink",
"cScope":"local",
"apiVer":"3.1"
}
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initBulkCampaign",
"tokenId": "{{demotokenid}}",
"campaignId": "NotifyWithIALink",
"cScope":"global",
"apiVer":"3.1"
}
{
"status": "success",
"respCode": 200,
"respText": "Success",
"activityId": "51cd9b48-a46b-454d-965d-76ec9aee7a09-1600933577036",
"gbRespCode": "00200",
"gbSuccess": true
}
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/<USHUR_NAME>/launch
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"bulk": true,
"groupId":"GroupA"
}
202 ACCEPTED
{
"activityId": "46b39624-697a-4a72-9838-9b394aa1d4dc-1621314657992"
}
| Parameter | Description |
|---|---|
| USHUR_NAME | Name of the ushur. |
| groupId | Optional. The name of the group in the enterprise that has a list of contact information in it. This parameter is needed only when sending to a group. |
| cScope | Optional. value is local - when need to launch ushur to all contacts within the specific campaignId (ushur). value is global - when need to launch ushur to all contacts within the entire enterprise. The groupId and cScope are mutually exclusive parameters. |
| bulk | This is a mandatory parameter (true/false) that indicates that ushur should be launched to a group of users. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 202 | Successfully submitted the request |
| Parameter | Description |
|---|---|
| activityId | The activity identifier 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 could be used to check if a particular Ushur is excluded from DND (i.e. Do Not Disturb) or not.
| Parameter | Description |
|---|---|
| token | A mandatory parameter to be provided in the request header. This is the same tokenId that you receive in response to login API call. |
| ushur-id | The ushur name for which you wish to check DND exclusion. |
Method: GET
URL: https://host.name/rest/dndExclusions/{ushur-id}
Example: https://community.ushur.me/rest/dndExclusions/LanguageTranslation
Header: token
Content-Type: application/json
{
"status": null,
"respCode": 200,
"data": "{"dndExclusion":true}",
"infoText": null
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | The response code. 200 in case of success. |
| data | A JSON containing dndExclusion value - true if Ushur is DND excluded, false if not. Example : If Ushur is excluded from DND, "data": { "dndExclusion": true } If Ushur is not excluded from DND, "data": { "dndExclusion": false } |
| infoText | A description of the response for the submitted request. |
Fetch a list of Ushurs that have DND exclusion enabled.
| Parameter | Description |
|---|---|
| token | A mandatory parameter to be provided in the request header. This is the same tokenId that you receive in response to login API call. |
Method: GET
URL: https://host.name/rest/dndExclusions
Example: https://community.ushur.me/rest/dndExclusions/
Header: token
Content-Type: application/json
{
"status": "success",
"respCode": 200,
"data": "{"result":["LanguageTranslation","miroLatestpython"],"lastRecordId":"miroLatestpython","count":2}",
"infoText": null
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | The response code. 200 in case of success. |
| data | A JSON containing following three keys: -result: This contains a list of ushurs with DND Exclusion enabled. -lastRecordId: Optional. Used internally for pagination if more than 50 records are present, -count: Total number of ushurs with DND Exclusion enabled. Example: "data": "{"result":["LanguageTranslation","miroLatestpython"],"lastRecordId":"miroLatestpython","count":2}" |
| infoText | A description of the response for the submitted request. |
Enable or disable DND Exclusion for an Ushur.
| Parameter | Description |
|---|---|
| token | A mandatory parameter to be provided in the request header. This is the same tokenId that you receive in response to login API call. |
| ushur-id | The ushur name for which you wish to check DND exclusion. |
Method: PUT
URL: https://host.name/rest/dndExclusions/{ushur-id}
Example: https://community.ushur.me/rest/dndExclusions/Demo
Header: token
Content-Type: application/json
Request body to set DND Exclusion:
{
"dndExclusion": true
}
----------OR----------
Request body to remove DND Exclusion:
{
"dndExclusion": false
}
{
"status": "Success",
"respCode": 200,
"data": null,
"infoText": "DnD exclusion for Demo"
}
| Parameter | Description |
|---|---|
| status | A textual indication of success or failure. |
| respCode | The response code. 200 in case of success. |
| data | Data sent in response to the request. Null in this case. |
| infoText | A description of the response for the submitted request. In case of enabling DND Exclusion - "infoText": "DnD exclusion for Demo". Null in case of disabling DND Exclusion. |
Check if do not disturb is active for a particular ushur or not.
| Parameter | Description |
|---|---|
| entId | Optional parameter. The enterprise account/user ID containing the campaign to be checked for DND status. |
| campaignId | An optional parameter. The campaign name for which you desire to check the do not disturb status. An Ushur could have DND Exclusion enabled which will exclude the particular campaign from DND even if there is a DND window active for a particular time or date. |
| tokenId | A mandatory parameter. The credential for identifying the account. This is the tokenId that was sent by Ushur as part of the login response. |
| userTimezone | Optional parameter. Used to check if DND is active or not according to a particular timezone. |
Method : POST
https://community.ushur.me/infoQuery/isDoNotDisturbActive
Content-Type:application/json
{
"tokenId" : "{{tokenID}}",
"campaignId" : "DemoCampaign",
"userTimezone" : "IST",
"apiVer" : "3.1"
}
{
"DNDActive": "yes",
"DNDDate": "no",
"DNDTime": "yes"
}
| Parameter | Description |
|---|---|
| DNDActive | DND is active right now or not. If userTimezone value was provided in the request body then this field indicates if DND is active in the queried timezone or not. |
| DNDDate | If DND holiday active or not. If userTimezone value was provided in the request body then this field indicates if DND holiday is active in the queried timezone or not. |
| DNDTime | DND time window is active right now or not. If userTimezone value was provided in the request body then this field indicates if DND time window is active in the queried timezone or not. |
This
command of infoQuery provides the values of all the variables for engagements
that have been associated with a “requestId” when they were initiated.
| Parameter | Description |
|---|---|
| cmd | The command of infoQuery expected to run. "getVariables" in this case. Although an optional parameter, recommended to mention it. InfoQuery will try to retrieve all records based on other attributes included if not present. |
| campaignId | A optional parameter. The campaign/ushur for which the details are to be retrieved. |
| tokenId | A mandatory parameter. Token ID received in the login API response. |
| requestId | The unique ID tied to the engagement when it was initiated. If not provided it will look for a UeTag attribute. If both are not provided “getVariables” will throw an exception. |
| UeTag | An optional parameter. The ue tag will restrict the variables to be queried from a fixed module. If not provided it will look for a requestId attribute. If both are not provided “getVariables” will throw an exception. |
| fliterCmd | Using this the users can provide a comma-separated list of variables that need to be retrieved. |
| nRecords | An optional field. Indicates the maximum number of records to be shown in the response. |
Method: POST
URL: https://community.ushur.me/infoQuery
Cotent-Type: application/json
{
"tokenId": "{{tokenID}}",
"campaignId": "TriggerTimezoneDemo",
"AppContext": "Main",
"cmd": "getVariables",
"apiVer": "3.1",
"UeTag": "UeTag_894188",
"nRecords": "3"
}
Method: POST
URL: https://community.ushur.me/infoQuery
Cotent-Type: application/json
{
"tokenId": "{{tokenId}}",
"cmd": "getVariables",
"campaignId": "campaignId ",
"requestId": "requestId"
}
Method: POST
URL: https://community.ushur.me/infoQuery
Cotent-Type: application/json
[
{
"cmd": "getVariables",
"campaignId": "Emailclassification",
"tokenId": "{{TokenID}}",
"requestId": "REQ1"
},
{
"cmd": "getVariables",
"campaignId": "Emailclassification",
"tokenId": "{{TokenID}}",
"requestId": "REQ2"
},
{
"cmd": "getVariables",
"campaignId": "Emailclassification",
"tokenId": "{{TokenID}}",
"requestId": "REQ3"
}
]
{
"result": [
{
"lastEngagementTime": "2021-04-26T05:54:01.720Z",
"requestId": "1",
"variables": {},
"ueTag": "UeTag_894188"
},
{
"lastEngagementTime": "2021-04-26T09:57:49.184Z",
"requestId": "",
"variables": {
"somevar": "f68b4d90-ddad-4c62-b5c3-a633faf3014a"
},
"ueTag": "UeTag_894188"
},
{
"lastEngagementTime": "2021-04-26T10:04:28.810Z",
"requestId": "",
"variables": {
"somevar": "ffab6d77-0a1f-42ad-ab63-cd1e3e3f4a1b"
},
"ueTag": "UeTag_894188"
}
],
"lastRecordId": "6086902c0848f96fc4ecd3f3",
"counts": 3,
"totalRecords": 18
}
| Parameter | Description |
|---|---|
| result | A list of JSONs containing the requestId, lastEngagementTime, and variables that we requested. The variables key of this JSON will have a JSON of variables, if there are more than one, with variables as their key and the value of these variables as its value. |
| lastRecordId | This indicates the last record id which is used for pagination purposes. This is the ID of the last fetched record and to fetch more records the record after lastRecordId can be used as the first record. |
| totalRecords | Indicates the total number of records. |
| counts | Indicates the number of records being shown in the response. |
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/<USHUR_NAME>/activities/variables/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"requestId": "TEST-REQUEST-ID-00002"
}
{
"result": [
{
"lastEngagementTime": "2021-05-18T05:25:22.580Z",
"requestId": "TEST-REQUEST-ID-00002",
"variables": {},
"ueTag": "UeTag_797196"
},
{
"lastEngagementTime": "2021-05-18T05:25:22.615Z",
"requestId": "TEST-REQUEST-ID-00002",
"variables": {},
"ueTag": "UeTag_070005"
},
{
"lastEngagementTime": "2021-05-18T05:25:33.633Z",
"requestId": "TEST-REQUEST-ID-00002",
"variables": {},
"ueTag": "UeTag_070005"
},
{
"lastEngagementTime": "2021-05-18T05:25:33.643Z",
"requestId": "TEST-REQUEST-ID-00002",
"variables": {},
"ueTag": "UeTag_070005"
},
{
"lastEngagementTime": "2021-05-18T05:25:33.651Z",
"requestId": "TEST-REQUEST-ID-00002",
"variables": {
"agentid": "12345"
},
"ueTag": "UeTag_070005"
},
{
"lastEngagementTime": "2021-05-18T05:25:33.664Z",
"requestId": "TEST-REQUEST-ID-00002",
"variables": {
"agentid": "12345"
},
"ueTag": "UeTag_254882"
},
{
"lastEngagementTime": "2021-05-18T05:25:33.679Z",
"requestId": "TEST-REQUEST-ID-00002",
"variables": {
"agentid": "12345"
},
"ueTag": "UeTag_Primary_End"
},
{
"lastEngagementTime": "2021-05-18T05:25:33.689Z",
"requestId": "TEST-REQUEST-ID-00002",
"variables": {
"agentid": "12345"
},
"ueTag": "UeTag_End"
}
],
"lastRecordId": "60a34fcdbd8c2573a6d922d3",
"counts": 8,
"totalRecords": 8
}
| Parameter | Description |
|---|---|
| USHUR_NAME | Name of the ushur. |
| requestId | The unique ID tied to the engagement when it was initiated. If not provided it will look for a UeTag attribute. If both are not provided the API will throw an exception. |
| UeTag | An optional parameter. The ue tag will restrict the variables to be queried from a fixed module. If not provided it will look for a requestId attribute. If both are not provided this API will throw an exception. |
| filterCmd | Using this the users can provide a comma-separated list of variables that need to be retrieved. |
| nRecords | An optional field. Indicates the maximum number of records to be shown in the response. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not allowed to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved the data |
| 206 | Successfully retrieved a batch of the data |
| 204 | No data found |
| Parameter | Description |
|---|---|
| result | A list of JSONs containing the requestId, lastEngagementTime, and variables that we requested. The variables key of this JSON will have a JSON of variables, if there are more than one, with variables as their key and the value of these variables as its value. |
| lastRecordId | This indicates the last record id which is used for pagination purposes. This is the ID of the last fetched record and to fetch more records the record after lastRecordId can be used as the first record. |
| totalRecords | Indicates the total number of records. |
| counts | Indicates the number of records being shown in the response. |
Infoquery API to fetch conversation history.
| Parameter | Description |
|---|---|
| tokenId | A mandatory parameter. The token ID that you received in the login API response goes here. |
| filterCmd | The filter command that you wish to run. "includeConvHist" in this case. |
| requestId | The request Id for which you wish to get the conversation history. If not provided, it will fetch conversation history for other request Ids as well. |
| campaignId | Optional. If provided it will fetch conversation history for the provided campaign Id only. Campaign Id is usually your ushur/campaign name. |
Method: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"tokenId": "{{tokenID}}",
"apiVer": "2.1",
"filterCmd": "includeConvHist",
"requestId": "31",
"campaignId": "TriggerTimezoneDemo"
}
{
"stats": {
"menu.sent": 0,
"menu.resp": 0
},
"result": [
{
"name": "",
"phone": "+16614187487",
"date": "2021-04-22T16:14:01.056Z",
"sid": "52d1c5af-ac35-4eb4-9b8f-74b0f293f447-uxidxyz-023979ee-7030-4399-815c-f47bef1679b0",
"timestamp": "2021-04-22T16:14:01.055Z",
"location": "",
"response": {
"menuId": "TriggerTimezoneDemo",
"campaignId": "TriggerTimezoneDemo",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_452563",
"dispStr": "Message Sent",
"content": "[TestAdmin]:",
"origUserMsg": "[TestAdmin]:null",
"UeTagStart": "UeTag_Start",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"virtualNo": "12762182082"
},
"requestId": "31"
},
{
"name": "",
"phone": "+16614187487",
"date": "2021-04-22T16:14:01.093Z",
"sid": "52d1c5af-ac35-4eb4-9b8f-74b0f293f447-uxidxyz-023979ee-7030-4399-815c-f47bef1679b0",
"timestamp": "2021-04-22T16:14:01.090Z",
"location": "",
"response": {
"menuId": "TriggerTimezoneDemo_child_section_9d081f9f-7e14-43ae-a2f1-92913cb62444",
"campaignId": "TriggerTimezoneDemo",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_894188",
"dispStr": "Message Sent",
"assetId": "",
"content": "Thank you for your time.",
"sentOut": "yes",
"delivered": "true",
"delStatus": "delivered",
"moduleType": "promptmessage"
},
"requestId": "31"
},
{
"name": "",
"phone": "+16614187487",
"date": "2021-04-22T16:14:01.102Z",
"sid": "52d1c5af-ac35-4eb4-9b8f-74b0f293f447-uxidxyz-023979ee-7030-4399-815c-f47bef1679b0",
"timestamp": "2021-04-22T16:14:01.100Z",
"location": "",
"response": {
"menuId": "TriggerTimezoneDemo_child_**ENDCAMPAIGN**",
"campaignId": "TriggerTimezoneDemo",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_Primary_End",
"dispStr": "EndOfWorkflow",
"meta": {
"menuOptions": {}
}
},
"requestId": "31"
},
{
"name": "",
"phone": "+16614187487",
"date": "2021-04-22T16:14:01.106Z",
"sid": "52d1c5af-ac35-4eb4-9b8f-74b0f293f447-uxidxyz-023979ee-7030-4399-815c-f47bef1679b0",
"timestamp": "2021-04-22T16:14:01.106Z",
"location": "",
"response": {
"menuId": "TriggerTimezoneDemo_child_**ENDCAMPAIGN**",
"campaignId": "TriggerTimezoneDemo",
"visual": "false",
"type": "ushur.end",
"UeTag": "UeTag_End",
"dispStr": "EndOfUshur",
"meta": {
"menuOptions": {}
}
},
"requestId": "31"
}
],
"counts": 4,
"totalRecords": 4,
"conversations": [
{
"sid": "52d1c5af-ac35-4eb4-9b8f-74b0f293f447-uxidxyz-023979ee-7030-4399-815c-f47bef1679b0",
"name": "",
"phone": "+16614187487",
"requestId": "31",
"vars": {},
"history": [
{
"timestamp": "2021-04-22T16:14:01.055Z",
"direction": "outgoing",
"content": "[TestAdmin]:",
"uetag": "UeTag_452563"
},
{
"moduleType": "promptmessage",
"timestamp": "2021-04-22T16:14:01.090Z",
"direction": "outgoing",
"content": "Thank you for your time.",
"uetag": "UeTag_894188"
}
]
}
],
"convCount": 1
}
/infoQuery API to get blacklisted numbers.
| Parameter | Description |
|---|---|
| tokenId | Mandatory field. The token ID that you received in the response of login API goes here. |
| cmd | The infoQuery command that you wish to run. "getBlackListed" in this case. |
| nRecords | The maximum number of records to be shown in the response. |
| apiVer | Optional but recommended. This indicate the API version to be used. |
Methoda: POST
URL: https://community.ushur.me/infoQuery
Content-Type: application/json
{
"tokenId": "{{tokenID}}",
"apiVer": "3.1",
"cmd": "getBlackListed",
"nRecords": "20"
}
{
"users": [
{
"userName": "user+16614187487",
"userPhoneNo": "+16614187487",
"createdDate": "2021-04-26T17:28:54.862Z",
"updatedDate": "2021-04-26T17:28:54.862Z"
}
],
"count": 1,
"totalRecords": 1,
"totalPrevRecords": 0,
"totalNextRecords": 0
}
| Parameter | Description |
|---|---|
| users | A list of blacklisted users. Each record of this list will be a JSON with 4 values i.e. userName (User's name), userPhoneNo (Blacklisted user phone number), createdDate (Date and time the user was blacklisted) and updatedDate (Date and time the record was last updated). |
| count | This indicates the number of blacklisted records being shown in the response. |
| totalRecords | A numeric value indicating the total number of blacklisted users. This can be different from the 'count' value in the response. Count tells the no. of blacklisted records being shown in the current response whereas totalRecords depict the total number of blacklisted users. |
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. |
| AppContext | Optional parameter. If not present the default Application Context will be used. The API can specify the Application Context into which the enterprise data is being operated on. |
Method: POST
URL: https://community.ushur.me/uneda/data/add
Content-Type: application/json
{
"content": [
{
"status": "shipping in progress",
"prescriptionId":"PId8888",
"orderId": "order-842918888",
"userPhoneNo": "+12098746734",
"userEmailId": "ushurtest2@gmail.com",
"ushurname": "TrackShipping",
"triggersend": "yes",
"userTimezone": "EST"
},
{
"status": "shipping in progress",
"prescriptionId":"PId8889",
"orderId": "order-842889188",
"userPhoneNo": "+12096734874",
"userEmailId": "ushurtest2@gmail.com",
"ushurname": "TrackShipping",
"triggersend": "yes",
"userTimezone": "CST"
}
],
"tokenId": "{{xtoken}}",
"AppContext" : "<name of App Context>"
}
Method: POST
URL: https://community.ushur.me/uneda/data/add
Content-Type: application/json
{
"AppContext":"ShippingStatus",
"content": [
{
"status": "shipping in progress",
"prescriptionId":"PId8888",
"orderId": "order-842918888",
"userPhoneNo": "+12098746734",
"userEmailId": "ushurtest2@gmail.com",
"ushurname": "TrackShipping",
"triggersend": "yes",
"userTimezone": "EST"
},
{
"status": "shipping in progress",
"prescriptionId":"PId8889",
"orderId": "order-842889188",
"userPhoneNo": "+12096734874",
"userEmailId": "ushurtest2@gmail.com",
"ushurname": "TrackShipping",
"triggersend": "yes",
"userTimezone": "CST"
}
],
"tokenId": "{{xtoken}}"
}
{
"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. |
Method: PUT
URL: https://instance.ushur.me/api/rest/enterprise-data
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"AppContext": "proxyTest",
"content": [ {
"phone": "12345",
"email": "a@b.com",
"city": "sanjose"
},
{
"phone": "12346",
"email": "c@d.com",
"city": "milpitas"
}]
}
201 CREATED
| Parameter | Description |
|---|---|
| AppContext | Optional parameter. If not present the default Application Context will be used. The API can specify the Application Context into which the enterprise data is being operated on. |
| content | Enterprise specific data set that either be a single set {} or a list of data set [{}, {}]. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 206 | Successfully retrieved a batch of the data |
| 201 | Successfully created or updated the data |
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 the 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 the login response. |
| AppContext | The application context for which you wish to fetch the enterprise 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}}",
"AppContext": "Main"
}
{
"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. |
Method: POST
URL: https://instance.ushur.me/api/rest/enterprise-data/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"AppContext": "proxyTest",
"content": {
"phone": "12345",
}
{
"phone": "12346",
}]
}
200 OK
{
"data": [
{
"phone": "12345",
"email": "a@b.com",
"city": "sanjose",
"ushurRecordId": "60a40c3d9a6a97c5d17a47f1"
},
{
"phone": "12346",
"email": "c@d.com",
"city": "milpitas",
"ushurRecordId": "60a40c619a6a97c5d17a993c"
}
],
"counts": 2,
"totalRecords": 2,
"lastRecordId": "60a40c619a6a97c5d17a993c"
}
Method: POST
URL: https://instance.ushur.me/api/rest/enterprise-data/search?phone=12345&AppContext=proxyTest
Authorization: Bearer <TOKEN>
| Parameter | Description |
|---|---|
| content | List of the key set where each set can contain one or more keys that pertains to one or more enterprise data. |
| AppContext | Optional parameter. If not present the default Application Context will be used. The API can specify the Application Context into which the enterprise data is being operated on. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved all the data |
| 206 | Successfully retrieved a batch of the data |
| 204 | No data found |
| Parameter | Description |
|---|---|
| data | Empty or a list of data corresponding to the keys. |
Similar to the setting of enterprise data this API enables the 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 need to be deleted. |
| token | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of the login response. |
| AppContext | The application context for which you wish to delete the enterprise 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}}",
"AppContext": "Main"
}
{
"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 | The number of data sets that were added or updated. |
Method: DELETE
URL: https://instance.ushur.me/api/rest/enterprise-data
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"AppContext": "proxyTest",
"content": {
"phone": "12345",
},
{
"phone": "12346",
}]
}
204 NO CONTENT
Method: DELETE
URL: https://instance.ushur.me/api/rest/enterprise-data?phone=12345&AppContext=proxyTest
Content-Type: application/json
Authorization: Bearer <TOKEN>
| Parameter | Description |
|---|---|
| content | Enterprise specific data set that either be a single set or a list of data set that all need to be deleted. |
| AppContext | Optional parameter. If not present the default Application Context will be used. The API can specify the Application Context into which the enterprise data is being operated on. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 204 | Successfully executed the request |
As can be seen in this document there is 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 the "content" parameter will result in the data being set and then the Ushur (campaign) being initiated. If there is a failure in the setting of data then an error response is sent back without initiating the Ushur. Only upon the 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 the 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 the 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 immediately. |
| userTimezone | An optional field. This field can be utilized to specify the timezone to be used for DND calculation. |
| userEmailId | An optional parameter used to mention the email id to which an email is to be initiated. |
| expiry | An optional parameter. A JSON containing the engagement expiry deadline time specified by the number of days, hours, and minutes and a message that is to be displayed after the engagement is expired. |
| AppContext | The application context under which the campaign/ushur that you want to trigger is located. |
Method: POST
URL: https://community.ushur.me/initUshur
Content-Type: application/json
{
"cmd": "initCampaign",
"callBackNumber": "12092078446",
"tokenId": "{{token}}",
"AppContext":"Main",
"userPhoneNo": "12098746734",
"userEmailId": "ushurtest@gmail.com",
"userMsg":"hello there",
"campaignId": "OrderTracking",
"userTimezone": "EST",
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "The engagement expired."
},
"content":[
{
"phone":"12098746734",
"status": "shipping in progress",
"prescriptionId":"PId8888",
"orderId": "order-842918888"
}
]
}
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"
}
]
}
| 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 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/<USHUR_NAME>/launch
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+16614187487",
"userEmailId": "ushurtest@gmail.com",
"userTimezone": "EST",
"content": [
{"phone": "12345",
"email": "a@b.com",
"city": "sanjose"}
],
"expiry": {
"days": 0,
"hours": 0,
"minutes": 1,
"message": "The engagement expired."
}
}
202 ACCEPTED
{
"activityId": "e0c1a8e9-dc99-446a-8c36-a1beae3bf0db-1620970950043"
}
| Parameter | Description |
|---|---|
| USHUR_NAME | Name of the ushur to launch |
| 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. |
| userTimezone | An optional field. This field can be utilized to specify the timezone to be used for DND calculation. |
| userEmailId | An optional parameter used to mention the email id to which an email is to be initiated. |
| expiry | An optional parameter. A JSON containing the engagement expiry deadline time specified by the number of days, hours, and minutes and a message that is to be displayed after the engagement is expired. |
| content | Enterprise specific data set that can either be a single set or a list of data set. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 202 | Successfully submitted the request |
| Parameter | Description |
|---|---|
| activityId | The activity identifier 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 the login response. |
| campaignId | An optional id for which the contact is added to this campaign. If no mention of this parameter then the contact is added to the enterprise. |
| userPhoneNo | This mandatory parameter is the phone number of the contact. The 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. The 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. |
| { "success": true, "respText": "Store succeeded", "tokenId":"{{xtoken}}", "userName":"Henry Peter G", "userPhoneNo":"12098746734" } |
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": "hpeterock@gmail.com",
"address": "112 st, anywhere, CA 95131"
}
| 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 Contact for correlation purposes. |
Method: PUT
URL: https://instance.ushur.me/api/rest/ushurs/USHUR_NAME/contacts
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L"
}
201 CREATED
Method: PUT
URL: https://instance.ushur.me/api/rest/contacts
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L"
}
201 CREATED
Method: PATCH
URL: https://instance.ushur.me/api/rest/ushurs/USHUR_NAME/contacts
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L 2"
}
204 NO CONTENT
Method: PATCH
URL: https://instance.ushur.me/api/rest/contacts
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L 2"
}
204 NO CONTENT
| Parameter | Description |
|---|---|
| USHUR_NAME | Name of the ushur |
| userPhoneNo | This mandatory parameter is the phone number of the contact. The 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. The 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. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 201 | Record created successfully |
| 204 | Record updated successfully |
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 are 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 the 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}}"
}
[
{
"userName": "Henry Peter M",
"userPhoneNo": "+12092078446",
"address": "111 st, anywhere, CA 95391",
"userEmail": "hpeterock@gmail.com",
"Method": "api"
},
{
"userName": "Henry Peter G",
"userPhoneNo": "+12098746734",
"address": "112 st, anywhere, CA 95131",
"userEmail": "hpeterock@gmail.com",
"Method": "api"
},
{
"userName": "Henry Peter V",
"userPhoneNo": "+12098355992",
"address": "987 st, anywhere, CA 94538",
"userEmail": "hpeterock@gmail.com",
"Method": "api"
}
]
(OR)
[]
| Parameter | Description |
|---|---|
| userName | Name of the Contact. |
| userPhoneNo | Phone number of Contact. |
| address | Address of the Contact, if present. |
| userEmail | The 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 the value is "Yes" then it is reachable else if "No" it is not reachable via SMS. |
| Landline | If the value is "Yes" indicates that the phone number is a landline. If "No" or not present then no indication that it is a landline number. |
| RspFromUser | If the 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 the value is "Yes" then it indicates that this phone number was verified via authentication. Example: a 2FA (Factored Authentication) has been done successfully. If "No" or not present then such verification has not been done. |
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/USHUR_NAME/contacts/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122"
}
200 OK
{
"userName": "m",
"userPhoneNo": "+14089991122",
"userEmail": "a@b.com",
"address": ""
}
Method: POST
URL: https://instance.ushur.me/api/rest/contacts/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122"
}
200 OK
{
"userName": "m",
"userPhoneNo": "+14089991122",
"userEmail": "a@b.com",
"address": ""
}
Method: POST
URL: https://instance.ushur.me/api/rest/contacts/search
Authorization: Bearer <TOKEN>
200 OK
{
"users": [
{
"userName": "userdummyreplyto@dummy.com",
"userEmail": "dummyreplyto@dummy.com"
},
{
"userName": "userdummy@dummy.com",
"userEmail": "dummy@dummy.com"
},
{
"userName": "GGG",
"userPhoneNo": "+1408888888",
"userEmail": "",
"address": ""
},
{
"userName": "m",
"userPhoneNo": "+1408111111",
"userEmail": "",
"address": ""
},
{
"userName": "Ushur Tester",
"userPhoneNo": "+16614187487",
"userEmail": "",
"address": ""
},
{
"userName": "Pp",
"userPhoneNo": "+17160008400",
"userEmail": "",
"address": ""
},
{
"userName": "F L",
"userPhoneNo": "+14089991122"
}
],
"lastRecordId": "60a4271313fb3d4eb01160b0",
"counts": 8,
"totalRecords": 8
}
| Parameter | Description |
|---|---|
| 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 the query is to return information for all phone numbers this can still be sent without the userPhoneNo. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved all the data |
| 206 | Successfully retrieved a batch of the data |
| 204 | No data found |
| Parameter | Description |
|---|---|
| userName | Name of the Contact. |
| userPhoneNo | Phone number of Contact. |
| address | 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. |
| Verified | If the value is Yes then it indicates that this phone number was verified via authentication. Example: a 2FA (Factored Authentication) 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 the login response. |
| campaignId | An optional id for which the contact is deleted from this campaign. If no mention of this parameter then contacts are deleted from the enterprise. |
| userPhoneNo | This mandatory parameter is the phone number of the contact. The 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"
}
{
"success": true,
"respText": "Contact deletion successful"
}
| Parameter | Description |
|---|---|
| success | A textual indication of success or failure. |
| respText | A textual description of the response. |
Method: DELETE
URL: https://instance.ushur.me/api/rest/ushurs/USHUR_NAME/contacts
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L"
}
204 NO CONTENT
Method: DELETE
URL: https://instance.ushur.me/api/rest/contacts
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L"
}
204 NO CONTENT
| Parameter | Description |
|---|---|
| userPhoneNo | This mandatory parameter is the phone number of the contact. The 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. |
| USHUR_NAME | Name of the ushur |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 204 | Successfully executed the request |
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 the 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. The 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 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 Contact, for correlation purposes. |
Method: PUT
URL: https://instance.ushur.me/api/rest/ushurs/USHUR_NAME/contacts/dnd
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L",
"dndSetting":[
{
"day": "mon,wed,fri",
"time": "20:30,5:30"
},
{
"day": "weekends",
"time": "22:00,5:00"
}
]
}
201 CREATED
Method: PUT
URL: https://instance.ushur.me/api/rest/contacts/dnd
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L",
"dndSetting":[
{
"day": "mon,wed,fri",
"time": "20:30,5:30"
},
{
"day": "weekends",
"time": "22:00,5:00"
}
]
}
201 CREATED
| Parameter | Description |
|---|---|
| userPhoneNo | This mandatory parameter is the phone number of the contact. The 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 DND settings. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 201 | DND setting created successfully |
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 is 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}}"
}
{
"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 Contact. |
| dndSetting | DND Setting for the contact. |
| success | Indicates if retrieval is successful. When failed the respText indicates an explanation of it. |
| respText | Textual indication of what went right or wrong. |
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/USHUR_NAME/contacts/dnd/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L"
}
200 OK
{
"userName": "Henry Peter M",
"userPhoneNo": "+12092078446",
"dndSetting": [
{
"day": "mon,wed,fri",
"time": "20:30,5:30"
},
{
"day": "weekends",
"time": "22:00,5:00"
}
]
}
Method: POST
URL: https://instance.ushur.me/api/rest/contacts/dnd/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"userPhoneNo": "+14089991122",
"userName": "F L"
}
200 OK
{
"userName": "Henry Peter M",
"userPhoneNo": "+12092078446",
"dndSetting": [
{
"day": "mon,wed,fri",
"time": "20:30,5:30"
},
{
"day": "weekends",
"time": "22:00,5:00"
}
]
}
| Parameter | Description |
|---|---|
| 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. |
| USHUR_NAME | Name of the ushur. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved all the data |
| 204 | No data found |
| Parameter | Description |
|---|---|
| userName | Name of the Contact. |
| userPhoneNo | Phone number of Contact. |
| dndSetting | DND Setting for the contact. |
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 the login response. |
| phoneNumber | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of the 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 a 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 exists 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)
}
{
"status": "success",
"respCode": 200,
"data": "3c055082-df38-4ae4-9cbd-cead56aa140e-1454540458974",
"infoText": "Sent Authcode to phoneNumber 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. In 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 retrieved 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 the login response. |
| phoneNumber | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of the login response. |
| cmd | phoneAuthConfirm: This command verifies through the authentication number received by the user or the application. |
| authNumber | This is a 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. In 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 the login response. |
| longUrl | This the long URL that you want to shorten. |
| useExisting | [Optional] Reuse an existing short URL for the corresponding long URL. |
| tags | [Optional] List of tags to be mapped to the URL |
https://community.ushur.me/infoQuery
with json
{
"cmd":"getSurl",
"tokenId":"d5dbab0d-1251-4a2f-b5eb-8c0f752e997b",
"longUrl":"http://google.com",
"useExisting":"true" [OPTIONAL],
"tags":["tag1","tag2"] [OPTIONAL]
}
{
"surl":"https://community.ushur.me/u/Mp9inR",
"existingSurl":"true"
}
{
"surl":"https://community.ushur.me/u/Mp9inR"
}
| Parameter | Description |
|---|---|
| surl | The short URL generated by Ushur. |
| existingSurl | Indicates if the short URL is existing or newly generated. |
This API is used to retrieve all the short url along with their long url and associated information. 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 the login response. |
| startDate | The start date. |
| endDate | The end date. |
| lastRecordId | [Optional] Fetch records starting from this ID |
| nRecords | [Optional] The maximum number of records to be fetched |
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 are null - all short URLs are returned
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,
"lastRecordId":"abc-123",
"nRecords":"1000" [Optional]
}
{
"result": [
{
"createdTimestamp": "2015-11-13T02:53:15.376Z",
"longUrl": "https://community.ushur.me/processFeature",
"surl": "https://community.ushur.me/u/MzWpM6",
"tags":["tag1","tag2"]
},
{
"createdTimestamp": "2015-11-18T01:04:41.727Z",
"longUrl": "http://google.com",
"surl": "https://community.ushur.me/u/Mp9inR",
"tags":["tag1","tag2"]
},
{
"createdTimestamp": "2015-11-18T01:09:15.207Z",
"longUrl": "http://community.ushur.me/ushur-assets/abcedfgh_text.txt",
"surl": "https://community.ushur.me/u/cbwAmH",
"tags":[],
"isAssetUrl":true/false,
"assetName":"abcedfgh_text.txt"
}
]
}
{
"batchCount": 10,
"totalCount": 5507,
"lastRecordId": "610a7ff0082d232d8cf28310",
"result": [
{
"createdTimestamp": "2015-11-13T02:53:15.376Z",
"longUrl": "https://community.ushur.me/processFeature",
"surl": "https://community.ushur.me/u/MzWpM6",
"tags":["tag1","tag2"]
},
{
"createdTimestamp": "2015-11-18T01:04:41.727Z",
"longUrl": "http://google.com",
"surl": "https://community.ushur.me/u/Mp9inR",
"tags":["tag1","tag2"]
},
{
"createdTimestamp": "2015-11-18T01:09:15.207Z",
"longUrl": "http://community.ushur.me/ushur-assets/abcedfgh_text.txt",
"surl": "https://community.ushur.me/u/cbwAmH",
"tags":[],
"isAssetUrl":true/false,
"assetName":"abcedfgh_text.txt"
}
]
}
| 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. |
| batchCount | The number of short URLs fetched in the batch. |
| totalCount | The total number of short URLs present. |
| lastRecordId | The id of the last short URL fetched in the batch. |
| tags | The list of tag mapped to the URL |
| isAssetUrl | If the SURL record is a document surl |
| assetName | The name of the document uploaded. |
This API is used to search for keywords within the short URL and long URL and return information for all matching records.
| 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 the login response. |
| startDate | The start date. |
| endDate | The end date. |
| searchString | Array containing the keywords to be searched for within the long URL and short URL |
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",
"searchString":["google","face"]
}
{
"result": [
{
"createdTimestamp": "2015-11-13T02:53:15.376Z",
"longUrl": "https://community.ushur.me/processFeature",
"surl": "https://community.ushur.me/u/MzWpM6",
},
{
"createdTimestamp": "2015-11-18T01:04:41.727Z",
"longUrl": "http://google.com",
"surl": "https://community.ushur.me/u/Mp9inR",
},
{
"createdTimestamp": "2015-11-18T01:09:15.207Z",
"longUrl": "http://facebook.com",
"surl": "https://community.ushur.me/u/cbwAmH",
}
]
}
| 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. |
An 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 the 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. |
Generate a short URL for the uploaded document.
| Parameter | Description |
|---|---|
| token | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of the login response. Should be part of the request header. |
| params | Multi-part data containing the tags, API version and expiry date in JSON format. |
| file | Multi-part data containing the file to be uploaded. The maximum size of the uploaded file can be 5 MB. |
Multi-part/formdata POST request to https://community.ushur.me/rest/document/upload
with the following two multi-part data
1) params : {"tags":["tag1","tag2"], apiVer:"2.1"}
2) file : the uploaded file
{
"surl": "https://community.ushur.me/u/WIyx4m"
}
| Parameter | Description |
|---|---|
| surl | The short URL generated by Ushur. |
Delete the uploaded document as well as the corresponding short URL generated for it.
| Parameter | Description |
|---|---|
| token | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of the login response. Should be part of the request header. |
| surl | The SURL hash which is the last 6 characters in the generated SURL. |
DELETE request to https://community.ushur.me/rest/document/
with
{
"surl":"Mp9inR"
}
if the SURL is "https://community.ushur.me/u/Mp9inR" then the SURL hash is "Mp9inR"
{
"status":"success",
"respCode":"200",
"infoText" : "Successfully deleted surl"
}
| Parameter | Description |
|---|---|
| status | If the API request was a success or failure. |
| respCode | The status code for the API request. |
| infoText | Contextual information pertaining to the API request. |
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 the 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 the entire account is returned. |
| startTime | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of the login response. |
| startChatId | The credential for identifying the account. This is the tokenId that was sent by Ushur as part of the login response. |
| userPhoneNo | These are optional parameters for filtering. |
| userName | These are optional parameters for filtering. |
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 the login response. |
| ushurId | An ID that can be reserved by the user. |
https://community.ushur.me/rest/GetushurId/reserve?email=ed@ushurdummy.me&token=gIwgVYm6uj1oKKekc6UKJUsLD8GvwchnIXnNjYKJLrzuw5SLmh&ushurId=myfirstid
{
"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 the login response. |
| ushurId | An ID that can be reserved by the user. |
https://community.ushur.me/rest/generateurl?token=gIwgVYm6uj1oKKekc6UKJUsLD8GvwchnIXnNjYKJLrzuw5SLmh&email=ed@ushurdummy.me&ushurId=myfirstid
{
"status": "success",
"respCode": "200",
"publicUrl": "https://www.ushur.me/connect?myfirstid",
"emailId": "ed@ushurdummy.me"
}
| 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's 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 the login response. |
https://community.ushur.me/rest/AvailabilityWeb/getStatus?email=ed@ushurdummy.me&token=gIwgVYm6uj1oKKekc6UKJUsLD8GvwchnIXnNjYKJLrzuw5SLmh
{
"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 an 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 the login response. |
https://community.ushur.me/rest/GetPhoneNumber/gIwgVYm6uj1oKKekc6UKJUsLD8GvwchnIXnNjYKJLrzuw5SLmh/ed@ushurdummy.me
{
"status":"success",
"respCode":"200",
"phoneNumber":"+16508888989",
"emailId":"ed@ushurdummy.me"
}
| 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 the login response. |
https://community.ushur.me/rest/changeDNDTimezone/get?email=ed@ushurdummy.me&token=gIwgVYm6uj1oKKekc6UKJUsLD8GvwchnIXnNjYKJLrzuw5SLmh
{
"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 the login response. |
| timezone | The timezone that you choose to set. For example US/West, US/East, etc. |
https://community.ushur.me/rest/changeDNDTimezone?email=ed@ushurdummy.me&token=gIwgVYm6uj1oKKekc6UKJUsLD8GvwchnIXnNjYKJLrzuw5SLmh&timezone=US/East
{
"status":"success",
"respCode":"200",
"infoText":"Changes saved sucessfully",
"emailId":"ed@ushurdummy.me"
}
| 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 the login response. |
https://community.ushur.me/rest/location/get?userName=ed@ushurdummy.me&token=gIwgVYm6uj1oKKekc6UKJUsLD8GvwchnIXnNjYKJLrzuw5SLmh
{
"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 a 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. |
https://community.ushur.me/rest/saveAppearance?email=ed@ushurdummy.me&businessName=Ed 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 scheduled 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 is 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 need to be captured for the given token ID. |
| endDate | The end date to which the activities need 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 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 an 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. |
Method: POST
URL: https://instance.ushur.me/api/rest/ushurs/<USHUR_NAME>/scheduledActivities/search
Content-Type: application/json
Authorization: Bearer <TOKEN>
{
"nRecords":"700",
"status":"scheduled",
"startDate":"2021-06-26T06:46:21.165Z",
"endDate":"2021-07-26T06:46:21.165Z"
}
200 OK
{
"activities": [
{
"activityId": "cb4af94f-c0f1-4478-b7a4-a271f332253e-1621373791790",
"notificationId": "60a4335f13fb3d4eb01160b2",
"type": "scheduled",
"status": "scheduled",
"date": {
"$date": "2021-05-18T21:36:31.790Z"
},
"campaignId": "proxyTestUshur",
"ushurRecordId": "60a4335f13fb3d4eb01160b3",
"notDate": {
"$date": "2021-06-17T23:14:47.360Z"
},
"notType": "INDIVIDUAL",
"notMsg.userPhNo": null,
"notMsg.campaignId": "proxyTestUshur",
"requestId": "TEST_REQUEST_ID"
}
],
"counts": 1,
"totalRecords": 1,
"lastRecordId": "60a4335f13fb3d4eb01160b3"
}
| Parameter | Description |
|---|---|
| nRecords | Limit Number of records returned to this number -used for pagination. |
| lastRecordId | id of last record Id of the set is 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 need to be captured for the given token ID. |
| endDate | The end date to which the activities need to be captured for the given token ID. |
| campaignId | The Campaign ID for which the Activities details needs to be captured. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved all the data |
| 206 | Successfully retrieved a batch of the data |
| 204 | No data found |
| Parameter | Description |
|---|---|
| activityId | The activity identifier 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 an 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 a 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
"}",
"dbUserEmail":"EVA.ANGRA@USHUR.COM",
"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,
"mEmailId":null,
"mEmailRecordId":null,
"keyword":null,
"featureId":"ResponseTabUpdation",
"groupId":"",
"dnDHolidaysActive":false,
"campaignId":"ResponseTabUpdation",
"ushurMsgId":"",
"parentSid":null,
"userMsg":"null",
"footerMsg":null,
"storeForwardFeatureOn":false,
"pushMsgFromRemote":true,
"userPhNo":"+16614187487",
"viaVirtualNumber":"14157671510",
"appContext":"",
"unedaContent":"",
"cmd":"initCampaign",
"viaVendor":"",
"dbUserEmailId":"EVA.ANGRA@USHUR.COM",
"campaignType":"OtherCampaigns",
"callbackNo":"+918056286949",
"operatorInitTag":null,
"metaData":"{
"date":null,
"time":null,
"name":"test",
"location":"",
"bulk":false,
"cScope":"local
"}",
"campaignScope":"local",
"userName":null,
"requestId":"",
"dbUserEmail":"EVA.ANGRA@USHUR.COM",
"sendDate":"2019-12-26T07:00:44.405Z",
"userPhoneNo":"+16614187487"
,"intervalTimeUnit":"hours",
"virtualNumber":"14157671510",
"callBackNumber":"+918056286949"
},
"isImmNot":false,
"isNotSent":false,
"engagementDate":null,
"transactionId":"12aaaddd-363f-4d48-8888-7ee348223c66",
"gc":false,
"sendInterval":0,
"repeatNo":0,
"intervalTimeUnit":"hours",
"createdDate":{
"$date":"2019-12-26T06:50:44.416Z"
},
"updatedDate":{
"$date":"2019-12-26T06:50:44.447Z"
}
}
| 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 | Internal reference to scheduled ushur. |
| type | Returns whether it was Scheduled Ushur (send immediately). |
| status | The status to indicate whether details are for Scheduled, Initiated, Canceled activities. |
| date | Date time when Ushur was to be sent. |
| campaignId | Name of Ushur. |
| notDate | Schedule to Send on this date/time. |
| notType | Whether Notification is for INDIVIDUAL or BULK. |
| notMsg | message sent. |
| isImmNot | If Ushur was sent immediately or not. |
| isNotSent | True if ushur is already initiated. False otherwise. |
| engagementDate | date scheduled. |
| transactionId | internal unique Id for this operation transactionId. |
| gc | internal use - garbage collect (mark this record for deletion after processing). |
| sendInterval | initiate ushur after this interval. |
| repeatNo | number to repeat /initiate ushur number of times specified. |
| intervalTimeUnit | time Unit for send interval field hours, minutes, seconds. |
| createdDate | timestamp when this record is created. |
| updatedDate | timestamp when this record is updated. |
Method: GET
URL: https://instance.ushur.me/api/rest/scheduledActivities/<ACTIVITY_ID>
Authorization: Bearer <TOKEN>
200 OK
{
"activityId": "cb4af94f-c0f1-4478-b7a4-a271f332253e-1621373791790",
"notificationId": "60a4335f13fb3d4eb01160b2",
"type": "scheduled",
"status": "scheduled",
"date": {
"$date": "2021-05-18T21:36:31.790Z"
},
"campaignId": "proxyTestUshur",
"requestId": "TEST_REQUEST_ID",
"notDate": {
"$date": "2021-06-17T23:14:47.360Z"
},
"notType": "INDIVIDUAL",
"notMsg": {
"other": {
"campaignType": "OtherCampaigns",
"sendDate": "2021-6-17T23:14:47.360Z",
"campaignId": "proxyTestUshur",
"userPhoneNo": "4081112222",
"intervalTimeUnit": "hours",
"userMsg": "null"
},
"userTimezone": null,
"mEmailChannelActive": false,
"mEmailFrom": null,
"mEmailTo": null,
"mEmailSubject": null,
"mEmailBody": null,
"mEmailId": null,
"mEmailRecordId": null,
"expiry": null,
"pushMsgFromRemote": true,
"cmd": "initCampaign",
"storeForwardFeatureOn": false,
"parentSid": null,
"userPhNo": "4081112222",
"operatorInitTag": null,
"viaVirtualNumber": null,
"footerMsg": null,
"callbackNo": null,
"userMsg": "null",
"metaData": null,
"dbUserEmailId": null,
"campaignId": "proxyTestUshur",
"campaignType": "OtherCampaigns",
"ushurMsgId": "",
"requestId": "TEST_REQUEST_ID",
"campaignScope": "",
"unedaContent": "",
"appContext": "",
"groupId": "",
"featureId": "proxyTestUshur",
"viaVendor": "",
"channel": "text",
"dnDHolidaysActive": false,
"keyword": null,
"userName": null,
"sendDate": "2021-6-17T23:14:47.360Z",
"userPhoneNo": "4081112222",
"intervalTimeUnit": "hours"
},
"isImmNot": false,
"isNotSent": false,
"engagementDate": null,
"transactionId": "b6b93a9b-c9e0-4824-b504-ddb6e002e495",
"gc": false,
"sendInterval": 0,
"repeatNo": 0,
"intervalTimeUnit": "hours",
"createdDate": {
"$date": "2021-05-18T21:36:31.789Z"
},
"updatedDate": {
"$date": "2021-05-18T21:36:31.789Z"
}
}
| Parameter | Description |
|---|---|
| ACTIVITY_ID | 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. |
| Parameter | Description |
|---|---|
| 400 | If mandatory parameters are missing |
| 401 | If token is invalid or expired |
| 403 | If user is not authorized to perform the operation |
| 405 | If unsupported HTTP method is used |
| 200 | Successfully retrieved all the data |
| 204 | No data found |
| 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 | Internal reference to scheduled ushur. |
| type | Returns whether it was Scheduled Ushur (send immediately). |
| status | The status to indicate whether details are for Scheduled, Initiated, Canceled activities. |
| date | Date time when Ushur was to be sent. |
| campaignId | Name of Ushur. |
| notDate | Schedule to Send on this date/time. |
| notType | Whether Notification is for INDIVIDUAL or BULK. |
| notMsg | message sent. |
| IsImmNot | If Ushur was sent immediately or not. |
| isNotSent | True if ushur is already initiated. False otherwise. |
| engagementDate | date scheduled. |
| transactionId | internal unique Id for this operation transactionId. |
| sendInterval | initiate ushur after this interval. |
| repeatNo | number to repeat /initiate ushur number of times specified. |
| intervalTimeUnit | time Unit for send interval field hours, minutes, seconds. |
| createdDate | timestamp when this record is created. |
| updatedDate | timestamp when this record is updated. |
These are the response codes used by the Ushur Platform as part of the API responses to give some guidance for the enterprise applications.
| Parameter | Description |
|---|---|
| 401 | The email id field is empty. |
| 402 | Token value is empty. |
| 403 | Account disabled |
| 404 | Invalid user |
| 405 | Nickname field is empty |
| 406 | E-mail id does not have required parameters |
| 407 | Auth token is empty |
| 408 | Auth token is invalid |
| 409 | Passwords do not match |
| 410 | Password field is empty |
| 411 | Confirm password field is empty |
| 412 | Phone number is empty |
| 413 | The transaction id is empty |
| 414 | Region code is empty |
| 415 | Invalid phone number or region code |
| 422 | The old password field is empty in ChangePassword rest api |
| 423 | New Password field is empty in ChangePassword rest api |
| 424 | Confirm password field is empty in ChangePassword rest api |
| 425 | Passwords don't match in ChangePassword rest api |
| 427 | Password must be greater than 6 characters and must contain at least one numerical value, one capital letter, and one special character, emailId:{emailId} |
| 428 | The new password you entered matches with last two changed passwords : please create a new one, emailId:{emailId} |
| 430 | Ushur Id is empty |
| 431 | Id is already reserved |
| 432 | Failed to release Id |
| 433 | A business name already exists. Please use a different business name. |
| 435 | Personalized Id not available |
| 436 | Campaign Id is empty |
| 437 | Phone number is empty |
This API will validate if a given number is a validate phone number. It can also check if the given number is a mobile number.
Method: POST
URL: https://instance.ushur.me/api/rest/v1/validate
Authorization: Bearer TOKEN-ID
{
"userPhoneNo": "4087446802"
}
Method: POST
URL: https://instance.ushur.me/api/rest/v1/validate?userPhoneNo=4087446802
Authorization: Bearer TOKEN-ID
(No body required)
{
"validNumber": true,
"type": "landline"
}
| Parameter | Description |
|---|---|
| userPhoneNo | This is the number to be validated. |
| Parameter | Description |
|---|---|
| 200 | The body contains the result of the validation request |
| 400 | Mandatory parameters are missing |
| 405 | HTTP method is not supported by this endpoint |
| Parameter | Description |
|---|---|
| validNumber | true if number is valid, false otherwise |
| type | The type of the number if it's valid: landline or mobile. |
This
Asset download API helps in retrieving the processed OCR or NONOCR attachment
from an Ushur engagement.
| Parameter | Description |
|---|---|
| token | A required parameter in Request Header. The credential for identifying the account. This is the tokenId that was sent by Ushur as part of the login response. |
Method: GET
URL: https://{{host}}/rest/asset/v2/sfdownload/{{assetId}}
Example: https://community.ushur.me/rest/asset/v2/sfdownload/f68b4d90-ddad-4c62-b5c3-a633faf3014a
Method: GET
URL: https://{{host}}/rest/asset/download-asset/{{assetId}}
Example: https://community.ushur.me/rest/asset/download-asset/<assetID>?token=<tokenID>