Skip to main content

getbroadcastmesssagedetail

POST v1/application/getbroadcastmesssagedetail#

With this API, you can query the details of a broadcast message you sent earlier (sending staff member, customer list, message content and creation time).

API requests

  • Must be authenticated with HMAC Authentication. For HMAC Authentication, see the Authentication document.
  • API URI : https://DIYALOG-SERVER-API-ENDPOINT/v1/application/getbroadcastmesssagedetail
  • HTTP Request Type POST
  • HTTP Content-Type application/json

Request Body#

Schema
json object
     broadcastId (String)
      The unique id returned in the response of the broadcastmesssage API.

Example Json Request Body :#

{
"broadcastId" : "b3f0b6c2-6f0e-4a57-9d55-1c7a8e2b9f41"
}

Responses#

HTTP 200 Response
json object
The API returns a json object as a response.
     isSuccess (boolean)
      Indicates whether the broadcast message was found.
     broadcastMessageDetail (json object)
      Optional. Returned when isSuccess is true. Contains the details of the broadcast message.
               id (String)
                Unique id of the broadcast message in the Diyalog system (broadcastId).
               senderUserId (integer)
                Diyalog user id of the staff member who sent the message.
               senderDomainId (String)
                User number of the staff member who sent the message in your system (staffId).
               senderApp (String)
                Name of the application that made the broadcast request. For requests made via the API, this is the application name used in HMAC authentication.
               customerIds (String array)
                Customer numbers the message was intended to be sent to.
               message (byte array)
                Content of the sent message. The message is returned as a byte array serialized in Diyalog's internal message format (protobuf). Since the values are signed bytes, non-ASCII characters are represented as negative numbers.
               createdAt (Unix epoch timestamps (miliseconds))
                Creation time of the broadcast request.
     error (String)
      Optional. Returned when isSuccess is false.
                         BROADCAST_MESSAGE_NOT_FOUND : No broadcast message was found for the broadcastId.

Example Response Body :#

{
"isSuccess": true,
"broadcastMessageDetail": {
"id": "b3f0b6c2-6f0e-4a57-9d55-1c7a8e2b9f41",
"senderUserId": 1452871,
"senderDomainId": "45186",
"senderApp": "DevelopmentPostman",
"customerIds": ["70021", "70022", "70024"],
"message": [10, 7, 77, 101, 114, 104, 97, 98, 97],
"createdAt": 1733130000000
}
}

Example Error Response Body :#

{
"isSuccess": false,
"error": "BROADCAST_MESSAGE_NOT_FOUND"
}
HTTP 400 Response
string
If the request body is not valid JSON, a required field is missing, or a field has the wrong type, the API returns a response with the HTTP 400 status code. The error message is returned as text.
HTTP 500 Response
string
When the API encounters a general error, it will return a response with the HTTP 500 status code. The API's error message is returned as text.

If the request fails HMAC validation, the following errors are returned as plain text. See Authentication.

HTTP statusMessageDescription
400Required headers not foundOne or more of the x-dlg-date, x-dlg-requester-userid or x-dlg-authorization headers are missing.
400Authorization failed due to data format not validThe x-dlg-authorization value after DLGA is not in the AccessKeyId:Signature form.
400Date format is invalid. EEE, dd MMM yyyy HH:mm:ss Z is requiedThe x-dlg-date value cannot be parsed in this format. The message text is returned as shown, including its spelling.
401Authorization failedThe x-dlg-authorization header does not contain DLGA , the AccessKeyId is unknown, or the signature is not correct.
401You have no permission on this operation. Contact your admin.The signature is correct, but your access key has no application permission.
403Request time may not be correct.The x-dlg-date value differs from the server time by more than 15 minutes.