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 :#
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 :#
Example Error Response Body :#
| 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 status | Message | Description |
|---|---|---|
| 400 | Required headers not found | One or more of the x-dlg-date, x-dlg-requester-userid or x-dlg-authorization headers are missing. |
| 400 | Authorization failed due to data format not valid | The x-dlg-authorization value after DLGA is not in the AccessKeyId:Signature form. |
| 400 | Date format is invalid. EEE, dd MMM yyyy HH:mm:ss Z is requied | The x-dlg-date value cannot be parsed in this format. The message text is returned as shown, including its spelling. |
| 401 | Authorization failed | The x-dlg-authorization header does not contain DLGA , the AccessKeyId is unknown, or the signature is not correct. |
| 401 | You have no permission on this operation. Contact your admin. | The signature is correct, but your access key has no application permission. |
| 403 | Request time may not be correct. | The x-dlg-date value differs from the server time by more than 15 minutes. |