Skip to main content

Add Service

Using this API, serivce providers will be added as per the request provided.

Resource Informations

NameValue
Requires authentication?Yes
Rate limited?Yes

Request

Request headers

KeyValue
AuthorizationBearer token
Content-Typeapplication/json

HTTP request URL for SSMS

POST https://{tenantId}.{hostname}/digitanium/v3/mpower/services/?category=<CATEGORY>

HTTP request URL for SHIFT

POST https://{hostname}/auth/realms/{tenantId}/mpower/v1/services/?category={CATEGORY}
note

API requests must be made over https. Calls made over plain http will fail.

Parameters

Field NameTypeDescription
category (Required)StringCategory for which you wanted to get Service Providers. Possible values partner, backend, operator, information

Request body

Field NameTypeDescription
name (Required)StringName of the service
type (Required)StringType of the service. Available types: chat, MiniApp, InformationApp, externalApp.
position (Required)IntegerPosition of the service where it needs to be in app
allowNewMessagesByUser (Required)booleanTo restrict user messages to the service use false
displayName (Required)ObjectName to be displayed for the service
description (Required)ObjectDescription of the service
openUrl (Required)StringUrl of the service
avatarPicture (Required)ObjectPicture which should be displayed in app for the service.
informationPicture (Required)ObjectPicture which should be displayed in app for the service. Only for information category.
callbackURL (Required)callBackUrlURL where to return the results, whenever a media or message is sent through mpower chat.
appUri (Required)StringThe application url. Applicable for externalApp only.
playStoreLinkAndroid (Required)StringPlaystore link of the application. Applicable for externalApp only.
appStoreLinkIos (Required)StringApp store link of the application. Applicable for externalApp only.
clientId (Required)StringThe client ID of the application. Applicable for externalApp only.
scope (Required)StringThe scope requested by the application. Applicable for externalApp only. Scope is mandatory if clientId is provided.
redirectUri (Required)StringThe URL to be redirected to post authentication. Applicable for externalApp only. redirectUri is mandatory if clientId is provided.
tags (Required)StringAdd respective tag category (Example : recommended).

Sample Request

[{
"name": "info2",
"type": "informationapp",
"position": 1,
"displayName": {
"de": "Info 2"
},
"description": {
"de": "Info 2"
},
"tags": ["tag1", "test1"],
"openUrl": "https://google.com",
"informationPicture": {
"mimetype": "image/jpeg",
"data": "test from API"
},
"allowNewMessagesByUser": true
}]

Sample Response

[
{
"uuid": "cdd202bb-197f-4139-8341-e1bb8717e43f",
"name": "operator"
},
{
"uuid": "caa202aa-197f-4139-8341-e1ab8818e33f",
"name": "operator one"
}
]

Response Status Information

StatusTypeDescription
200OKFor successfull update
400statusBad request
401statusUnauthorized