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
| Parameters | Description |
|---|---|
| Authorization | Please add provided Bearer token - linked to your Cellcast account. Check here |
| Content-Type | application/json |
Request Path Parameters
| Name | Example | Description |
|---|---|---|
| messageId | 6752b76d5e000000000000000 | The 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
| Field | Type | Description |
|---|---|---|
| _id | string | Unique identifier of the message |
| status | string | Message delivery status (delivered, failed, sent, etc.) |
| replyStop | boolean | Whether the recipient has opted out |
| message | string | The content of the message |
| sender | string | The sender's phone number |
| receiver | string | The recipient's phone number |
| smsDetail | object | SMS details including length and count |
| smsDetail.messagelength | number | Length of the message in characters |
| smsDetail.smscount | number | Number of SMS segments |
| smsDetail.deductibleCredit | number | Credits deducted for this message |
| creditAmount | number | Total credit amount used |
| createdAt | string | Timestamp when the message was created |
| updatedAt | string | Timestamp when the message was last updated |
| send_time | string | Timestamp when the message was sent |
| scheduleAt | string | Scheduled send time (if scheduled) |
| customerResponse | string | Customer's reply message (if any) |
| customerResponseAt | string | Timestamp of customer's reply |
| customerResponseMedia | array | Media attached to customer's reply |
| customString | string | Custom string attached to the message |
| media | array | Media attached to the message (for MMS) |
| replyMessage | object | Latest 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 ...."
}