Skip to content

Get Message Detail

This API is to get the detail of a specific sent message by its ID.

Parameters for getting Message Detail

Headers Parameters

ParametersDescription
AuthorizationPlease add provided Bearer token - linked to your Cellcast account. Check here
Content-Typeapplication/json

Request Path Parameters

NameExampleDescription
messageId6752b76d5e000000000000000The unique ID of the message to retrieve

Code Samples

GET https://api.cellcast.com/api/v2/report/message/:messageId

bash
curl --location 'https://api.cellcast.com/api/v2/report/message/6752b76d5e000000000000000' \
--header 'Authorization: Bearer {{API_KEY}}'

Replace with the actual API key that you own.

Responses

200 Success

json
{
  "app_type": "web",
  "app_version": "1.0",
  "maintainence": 0,
  "new_version": 0,
  "force_update": 0,
  "invalid_token": 0,
  "refresh_token": "",
  "show_message": 0,
  "is_enc": false,
  "status": true,
  "message": "Success",
  "message_type": "toast",
  "data": {
    "_id": "6752b76d5e000000000000000",
    "status": "delivered",
    "replyStop": false,
    "message": "Hello! This is a test message.\n\nReply STOP to opt-out",
    "sender": "61400000001",
    "receiver": "400000002",
    "smsDetail": {
      "messagelength": 50,
      "smscount": 1,
      "deductibleCredit": 0.031
    },
    "creditAmount": 1,
    "createdAt": "2024-12-06T08:35:57.392Z",
    "updatedAt": "2024-12-06T08:36:00.000Z",
    "send_time": "2024-12-06T08:35:58.000Z",
    "scheduleAt": null,
    "customerResponse": null,
    "customerResponseAt": null,
    "customerResponseMedia": null,
    "customString": null,
    "media": null,
    "replyMessage": null
  },
  "error": {}
}

Response Fields

FieldTypeDescription
_idstringUnique identifier of the message
statusstringMessage delivery status (delivered, failed, sent, etc.)
replyStopbooleanWhether the recipient has opted out
messagestringThe content of the message
senderstringThe sender's phone number
receiverstringThe recipient's phone number
smsDetailobjectSMS details including length and count
smsDetail.messagelengthnumberLength of the message in characters
smsDetail.smscountnumberNumber of SMS segments
smsDetail.deductibleCreditnumberCredits deducted for this message
creditAmountnumberTotal credit amount used
createdAtstringTimestamp when the message was created
updatedAtstringTimestamp when the message was last updated
send_timestringTimestamp when the message was sent
scheduleAtstringScheduled send time (if scheduled)
customerResponsestringCustomer's reply message (if any)
customerResponseAtstringTimestamp of customer's reply
customerResponseMediaarrayMedia attached to customer's reply
customStringstringCustom string attached to the message
mediaarrayMedia attached to the message (for MMS)
replyMessageobjectLatest reply message details (or null if no reply)

400 Bad Request

json
{
  "app_type": "web",
  "app_version": "1.0",
  "maintainence": 0,
  "new_version": 0,
  "force_update": 0,
  "invalid_token": 0,
  "refresh_token": "",
  "show_message": 0,
  "is_enc": false,
  "status": false,
  "message": "Message ID is required",
  "message_type": "toast",
  "data": {
    "message": "Message ID is required"
  },
  "error": {}
}

404 Not Found

json
{
  "app_type": "web",
  "app_version": "1.0",
  "maintainence": 0,
  "new_version": 0,
  "force_update": 0,
  "invalid_token": 0,
  "refresh_token": "",
  "show_message": 0,
  "is_enc": false,
  "status": false,
  "message": "Message not found",
  "message_type": "toast",
  "data": {
    "message": "Message not found"
  },
  "error": {}
}

401 Unauthorized

json
{
  "code": 401,
  "message": "Token expired",
  "stack": "APIError: Token expired ...."
}