You can use this endpoint to query the last entries of your logbooks. Each query returns a maximum of 100 entries.
Please send your request to the following URL:
https://gateway.sms77.io/api/journal
Parameters | Description | Possible values |
---|---|---|
type |
The type of logbook you want to query (Voice, SMS etc) | outbound for sent SMSinbound for incoming SMSvoice for voice messagesreplies for replies to your SMS |
Parameters | Description | Possible values |
---|---|---|
date_from |
A start date from which the search should start. | 2020-01-01 |
date_to |
An end date up to which the search is to be performed. | 2020-05-30 |
id |
A message to retrieve by its ID. | 1234567 |
limit |
Limits the numbers of entries to be returned. Must be an integer between 1-100. | 1 100 – default |
state |
The status of the message. This could be e.g. completed / failed for Voice or DELIVERED / NOTDELIVERED etc. for SMS. |
completed failed DELIVERED |
to |
The receivers phone number in any format. | 49176123456789 |
Returned Data
You will get the information back formatted as JSON. Depending on which logbook you query, you will get different data back.
Examples
Query the last sent SMS:
Request:
https://gateway.sms77.io/api/journal?p=api-key&type=outbound
Response:
[
{
"id": "77130579436",
"to": "49176123456789",
"from": "4915126716517",
"text": "Hello World.",
"timestamp": "2020-10-22 12:36:01.584",
"price": "0.075",
"dlr": "DELIVERED",
"dlr_timestamp": "2020-10-22 12:36:26.301",
"mccmnc": "26202",
"latency": "24.7170",
"type": "direct",
"connection": "http",
"label": null,
"foreign_id": null
},
{
"id": "77130579434",
"to": "49176123456789",
"from": "4915126716517",
"text": "This is a test SMS",
"timestamp": "2020-10-22 12:36:01.384",
"price": "0.0750",
"dlr": "DELIVERED",
"dlr_timestamp": "2020-10-22 12:36:15.000",
"mccmnc": "26202",
"latency": "13.6160",
"type": "direct",
"connection": "smpp",
"label": "customer_1",
"foreign_id": "028be8f1-46c7-4a9b-8100-22ed18c6cad4"
}
]
Query the last received SMS:
Request:
https://gateway.sms77.io/api/journal?p=api-key&type=inbound
Response:
[
{
"id": "835670",
"sender": "491716992343",
"system": "491771783130",
"text": "I am all down for a conversation!",
"time": "2021-06-17 04:43:01",
"price": "0.0750"
},
{
"id": "835669",
"sender": "491716992343",
"system": "491771783130",
"text": "I want to chat with you!",
"time": "2020-11-14 13:42:48",
"price": "0.0000"
},
]