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. By default, each of the endpoints listed below returns up to 100 entries. You can page through your logbooks with offset and limit (max. 100 per query) or with show_page and items (max. 10000 per query).
All time values (timestamp, dlr_timestamp) are returned in German local time (time zone Europe/Berlin, CET/CEST) without a UTC offset. The date_from and date_to parameters refer to the same time zone.
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. Not available for received messages.
- 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.
- Name
show_page- Type
- integer
- Description
Page to query, starting at 1. Ignored if
offsetis set.
- Name
items- Type
- integer
- Description
Number of entries per page when using
show_page. Must be an integer between 1-10000. Ignored ifoffsetis set.
Sent messages
You can use this endpoint to query the last entries in your logbooks. By default, you receive up to 100 entries per 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:51:13.185",
"mccmnc": "26207",
"latency": "14.3830",
"type": "direct",
"channel": "RCS",
"connection": "http",
"label": null,
"foreign_id": null
},
{
"id": "77231715551"
// ...
}
]
Received messages
You can use this endpoint to query the messages you received, e.g. SMS and WhatsApp. By default, you receive up to 100 entries per 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": 0
},
{
"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
},
{
// ...
}
]
Voice messages
You can use this endpoint to query the last entries in your logbooks. By default, you receive up to 100 entries per 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"
// ...
}
]