π What is the RESTful API?
The REST API allows direct access to various gateway functions β such as retrieving messages, status information, or logs.
π§ Good to know: The API can be tested interactively in the web interface β no external tools required!
π Quick Start: Use the Interactive API
π In the web interface, navigate to:
Configuration β RESTful API β Interactive API
There youβll find a list of available API endpoints that can be tested directly β including input fields for parameters.
π Example: Retrieve Messages via GET /messages
Use the GET /messages endpoint to fetch all sent and received SMS within a specific timeframe.
ποΈ Date Format β Use UNIX Timestamps!
Start and end times are not entered as plain dates (e.g. 2024-04-26) but must be in UNIX timestamp format (number of seconds since 01/01/1970).
π§ Example:
| Date | UNIX Timestamp |
|---|---|
| 01.01.2024 00:00:00 | 1704067200 |
| 31.12.2024 23:59:59 | 1735689599 |
β‘οΈ Helpful converter: www.unixtimestamp.com
β Sample API Request
π This request retrieves all messages between January 1, 2024 and December 31, 2024.
π οΈ Additional Usage Notes
-
Timezone matters:
Timestamps are based on UTC β convert to local time if necessary -
Parameters are optional:
Ifstartandendare omitted, the entire message history is returned (may be limited by server constraints) -
URL encoding:
Special characters like+,:or spaces must be URL-encoded
β Example:+becomes%2B
π Summary of Parameters
| Parameter | Description | Format |
|---|---|---|
start |
Start timestamp of the query | UNIX timestamp |
end |
End timestamp of the query | UNIX timestamp |
π‘ Tips for Developers and Power Users
For automated queries or testing outside the web interface, the following tools are recommended:
-
Postman β graphical interface for building and testing API calls
-
curl β command-line tool for Linux, macOS, Windows
-
Custom REST clients β written in Python, Go, Node.js, etc.
π Combined with a timestamp converter, you can easily build scheduled reports or monitoring solutions.
Comments
0 comments
Please sign in to leave a comment.