Logbook
The API endpoint for querying logbooks provides a direct interface for gaining insights into sent and received messages. This endpoint is essential for monitoring message communication or for detecting transmission errors. It provides the necessary data to transparently analyze message processing and exchange within the application.
You can use parameters to restrict the search to get exactly the data you need. Each of the endpoints listed below returns a maximum of 100 entries. You can use the offset
and limit
parameters to query deeper pages of your logbooks.
Optional parameters
- Name
id
- Type
- integer
- Description
The ID of the message.
- Name
date_from
- Type
- timestamp
- Description
Start date from which to search in the format YYYY-MM-DD 2020-01-01.
- Name
date_to
- Type
- timestamp
- Description
End date until which the search is to be performed in the format YYYY-MM-DD 2020-05-30.
- Name
state
- Type
- string
- Description
Status of the message. This could be e.g. completed / failed for Voice or DELIVERED / NOTDELIVERED etc. for SMS.
- Name
to
- Type
- string
- Description
Recipient phone number in any format.
- Name
limit
- Type
- integer
- Description
Limits the number of entries to be returned. Must be an integer between 1-100.
- Name
offset
- Type
- integer
- Description
Starting point from which entries are to be queried.
Sent messages
You can use this endpoint to query the last entries in your logbooks. You will receive a maximum of 100 entries for each query.
query
curl -G "https://gateway.seven.io/api/journal/outbound" \
-H "X-Api-Key: YOUR_API_KEY"
Answer
[
{
"id": "77231715575",
"to": "49176123456789",
"from": "sender",
"text": "Hello World",
"timestamp": "2024-02-13 05:50:58.802",
"price": "0.0750",
"dlr": "DELIVERED",
"dlr_timestamp": "2024-02-13 05:50:63.102",
"mccmnc": "26207",
"latency": "14.3830",
"type": "direct",
"channel": "RCS",
"connection": "http",
"label": null,
"foreign_id": null
},
{
"id": "77231715551",
// ...
}
]
Received SMS
You can use this endpoint to query the SMS messages you received. You will receive a maximum of 100 entries for each query.
query
curl -G "https://gateway.seven.io/api/journal/inbound" \
-H "X-Api-Key: YOUR_API_KEY"
Answer
[
{
"id": "4603396",
"from": "49176123456789",
"to": "49151123456789",
"text": "Awesome! Your message was received.",
"timestamp": "2025-01-16 12:53:17",
"reply_to_message_id": "77258554687",
"price": null
},
{
"id": "1865514",
"from": "49176123456789",
"to": "49151123456789",
"text": "Your Code is: 1035. Don't share it with anyone.",
"timestamp": "2024-03-03 00:17:02",
"reply_to_message_id": null
"price": 0.01
},
{
"id": "1865513",
// ...
}
]
Voice messages
You can use this endpoint to query the last entries in your logbooks. You will receive a maximum of 100 entries for each query.
query
curl -G "https://gateway.seven.io/api/journal/voice" \
-H "X-Api-Key: YOUR_API_KEY"
Answer
[
{
"id": "1429729",
"from": "49157123456789",
"to": "49176123456789",
"xml": false,
"text": "Hello, your authentication code is: 1 2 3 4 5 6.",
"duration": "17",
"status": "completed",
"error": null,
"timestamp": "2024-03-01 14:20:03",
"price": "0.045"
},
{
"id": "1429671",
// ...
}
]