Overview
You can use this request to retrieve messages on a specific email. Use the ID of the email you want the reports on, and specify which report you want the system to return.
Endpoint
Method | URL |
---|---|
POST |
https://[Your URL]/api/3.0/messages/interaction-data/:messageId |
Properties
Property |
Description |
Data Type |
Parameters / Format |
Validation Rules |
---|---|---|---|---|
interactionType |
This is the type of report that you want |
String |
|
Required |
fromDate |
The date to start the report from |
String |
yyyy-mm-dd |
Required |
toDate |
The date until the report will go to |
String |
yyyy-mm-dd |
Required |
pageNumber |
The page number of records that you want to pull |
Integer |
Optional – defaults to 1 integer |
|
order |
Column 2 Value 5 |
String |
“asc” or “desc” |
Required |
Requests
{ "interactionType": "sends", "fromDate": "1972-01-01", "toDate": "2023-12-31", "pageNumber": 1, "order": "desc" }
curl --location 'https://{{your_url}}/api/2.0/production/sms/webhooks/create' \ --data '{ "webhook": { "event_types": [ "sent" ], "verb": "POST", "url": "https://webhook.site/f0fc8147-0a1a-4e6b-b070-b872812d6649", "auth_details": { "username": "username", "password": "password" }, "auth_type": "basic", "status": "enabled" } }'
Responses
Status Code |
Explanation |
---|---|
200 OK |
Report has run successfully |
400 Bad Request |
The request body was formatted improperly. If there are keys missing, then the message returned will let you know that the request body was not formatted properly as well as what is missing or what is incorrect. |
401 Unauthorized |
The provided authorization credentials are incorrect |
200 OK
{ "interactionType": "sends", "fromDate": "1972-01-01", "toDate": "2023-12-31", "pageNumber": 1, "order": "asc" }
{ "result": "success", "page_size": 100, "total_pages": 4, "total_rows": 450, "data": [ { "contact_id": 111111, "contact_email": "[email protected]", "send_date": "2023-05-15 20:04:59", "interaction_type": "sends", "interaction_date": "2023-05-15 20:04:59", "message_id": 123, "page_number": 1 }, { "contact_id": 111112, "contact_email": "[email protected]", "send_date": "2023-05-15 20:04:59", "interaction_type": "sends", "interaction_date": "2023-05-15 20:04:59", "message_id": 123, "page_number": 1 }, { "contact_id": 111113, "contact_email": "[email protected]", "send_date": "2023-05-15 20:04:59", "interaction_type": "sends", "interaction_date": "2023-05-15 20:04:59", "message_id": 123, "page_number": 1 }, { "contact_id": 111114, "contact_email": "[email protected]", "send_date": "2023-05-15 20:04:59", "interaction_type": "sends", "interaction_date": "2023-05-15 20:04:59", "message_id": 123, "page_number": 1 } ] }
{ "interactionType": "sends", "fromDate": "1972-01-01", "toDate": "2023-12-31", "pageNumber": 2, "order": "asc" }
{ "result": "success", "data": [ { "contact_id": 111111, "contact_email": "[email protected]", "send_date": "2023-05-15 20:04:59", "interaction_type": "sends", "interaction_date": "2023-05-15 20:04:59", "message_id": 123, "page_number": 2 }, { "contact_id": 111112, "contact_email": "[email protected]", "send_date": "2023-05-15 20:04:59", "interaction_type": "sends", "interaction_date": "2023-05-15 20:04:59", "message_id": 123, "page_number": 2 }, { "contact_id": 111113, "contact_email": "[email protected]", "send_date": "2023-05-15 20:04:59", "interaction_type": "sends", "interaction_date": "2023-05-15 20:04:59", "message_id": 123, "page_number": 2 }, { "contact_id": 111114, "contact_email": "[email protected]", "send_date": "2023-05-15 20:04:59", "interaction_type": "sends", "interaction_date": "2023-05-15 20:04:59", "message_id": 123, "page_number": 2 } ] }
400 Bad Request
{ "interactionType": "sends", "fromDate": "1972-01-01", "toDate": "2023-12-31", "pageNumber": "x", "order": "asc" }
{ "result": "error", "status": "pageNumber is not numeric", "code": 400 }
401 Unauthorized