Skip to main content

mPowerChat Attachment

mPowerChat Attachment is a messaging API which accommodates file/image attachments along with the messages. The API accepts the message template and attachment as inputs. Refer Get Attachment to download the attachment.

Resource Informations

NameValue
Requires authentication?Yes
Rate limited?No

Request

Request headers

KeyValue
AuthorizationBearer token
Content-Typeapplication/json

HTTP request URL for SSMS

POST  https://{tenantId}.{hostname}/digitanium/v3/mpower/users/{userName}/chat/attachment

HTTP request URL for SHIFT

POST  https://{hostname}/auth/realms/{tenantId}/mpower/v1/users/{userName}/mediaChat
note

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

Parameters

No Parameter fields are required.

Request body

Field NameTypeDescription
messageStringAdd the message template.
attachmentattachmentAttach the file to be sent along with the message.
instanceIdStringSome string value.If not provided by default a Random ID will be assigned.

Sample Request

{
"serviceUuid": "{service-uuid}",
"messageType": "attachmentMessage",
"version": 3,
"messageContent": {
"messageText": "attachment"
}
}

Response

Field NameTypeDescription
messageIdStringUnique ID for the message.
instanceIdStringInstanceID of the request.

Sample Response

{
"messageId": "9vdKGlQOVU9gpNbGtC",
"instanceId": "instance-7a7d1208-9ef5-42c1-97a3-99fe309ba583"
}

Response Status Information

StatusTypeDescription
200OKsuccess
400statusBad request
401statusUnauthorized