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",
// ...
}
]
Inbound SMS
You can use this endpoint to query the SMS messages received by your phone number at seven. 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": "1865514",
"from": "49176123456789",
"to": "49151123456789",
"text": "Your Code is: 1035. Don't share it with anyone.",
"timestamp": "2024-03-03 00:17:02",
"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",
// ...
}
]
Responses received
You can use this endpoint to query the responses to your sent SMS. You will receive a maximum of 100 entries for each query.
query
curl -G "https://gateway.seven.io/api/journal/replies" \
-H "X-Api-Key: YOUR_API_KEY"
Answer
[
{
"id": "45900253",
"from": "49176123456789",
"to": "49157123456789",
"text": "Yes, the date suits me very well!",
"timestamp": "2024-01-07 02:42:00",
"price": 0.0
},
{
"id": "95839198",
// ...
}
]