Get List Sent Messages
This API is to get list of all sent Messages from Quick Message, Email to SMS, and SMS sent from the API .
Parameters for getting List Sent Messages
Headers Parameters
Parameters | Description |
---|---|
Authorization | Please add provided Bearer token - linked to your Cellcast account. Check here |
Content-Type | application/json |
Request Query Parameters
Name | Example | Description |
---|---|---|
page | 1 | Number of page, default value : 1 |
limit | 10 | Number of data per page |
campType | sms | Type of message to get. Options : 'sms' or 'mms' |
fromDate | 2024-12-04 | Messages returned will be messages sent starting from this date |
toDate | 2024-12-11 | Messages returned will be messages sent until this date |
requestFrom | APP | Options : 'APP' = Message sent from Quick Message on the Cellcast App. 'EMAIL' = Message sent from Email to SMS. 'API' = Message sent from Cellcast API |
requestName | CellcastAPI | The API Key Name used to send message using Cellcast API. |
status | delivered | The status of the messages sent. Options : 'blocked', 'delievered', 'failed', 'received', 'expired', 'queued', 'sent', 'rejected', 'canceled' |
Code Samples
GET https://api.cellcast.com/api/v2/report/message
bash
curl --location 'https://api.cellcast.com/api/v2/report/message?campType=sms&fromDate=2024-12-04&toDate=2024-12-11&page=1&limit=10&requestFrom=APP' \
--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": {
"items": [
{
"_id": "6752b76d5e000000000000000",
"status": "delivered",
"replyStop": false,
"message": "$% Hallo With ICON😄\n\nReply STOP to opt-out",
"sender": "61400000001",
"receiver": "400000002",
"gateway_count": 1,
"smsDetail": {
"_id": "6752b76d5e08b2d100000000",
"messagelength": 20,
"smscount": 1,
"costpersms": 0.031,
"deductibleCredit": 0.031
},
"request_from": "APP",
"creditAmount": 1,
"createdAt": "2024-12-06T08:35:57.392Z",
"replyMessage": null
},
{
"_id": "6752b76d5e00000000000000",
"status": "delivered",
"replyStop": false,
"message": "$% Hallo With ICON😄\n\nReply STOP to opt-out",
"sender": "61400000001",
"receiver": "400000003",
"gateway_count": 1,
"smsDetail": {
"_id": "6752b76d5e08b2d100000000",
"messagelength": 20,
"smscount": 1,
"costpersms": 0.031,
"deductibleCredit": 0.031
},
"request_from": "APP",
"creditAmount": 1,
"createdAt": "2024-12-06T08:35:57.389Z",
"replyMessage": null
},
{
"_id": "6752b76d5e00000000000000",
"status": "delivered",
"replyStop": false,
"message": "$% Hallo With ICON😄\n\nReply STOP to opt-out",
"sender": "61400000001",
"receiver": "400000000",
"gateway_count": 1,
"smsDetail": {
"_id": "6752b76d5e08b2d100000000",
"messagelength": 20,
"smscount": 1,
"costpersms": 0.031,
"deductibleCredit": 0.031
},
"request_from": "APP",
"creditAmount": 1,
"createdAt": "2024-12-06T08:35:57.387Z",
"replyMessage": null
}
],
"total": 3,
"limit": 10,
"current": 1,
"totalPages": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
},
"error": {}
}
401 Unauthorized
json
{
"code": 401,
"message": "Token expired",
"stack": "APIError: Token expired ...."
}