Statistics
Marsol API includes endpoint for retrieving statistical data related to your account. These statistics provide insights into successfully delivered messages, and other important statistics that can help you optimize your SMS and OTP services. You can filter these statistics based on date range and project ID to get more targeted insights.
GET /public/stats HTTP/1.1
Host: api.marsol.ly
x-auth-token: YOUR_API_KEY
Accept: */*
{
"id": "text",
"ALL": 1,
"PENDING": 1,
"SENT": 1,
"DELIVERED": 1,
"FAILED": 1,
"UNKNOWN": 1
}Endpoint: GET /public/stats
Method: GET
This endpoint allows you to retrieve various statistics related to your account.
Request
GET /public/stats?startDate={startDate}&endDate={endDate}&projectId={projectId} HTTP/1.1
Host: api.marsol.ly
x-auth-token: your_api_token_here
Content-Type: application/jsonstartDate(optional): The start date for the statistics in ISO 8601 format (e.g.,2023-01-01T00:00:00Z).endDate(optional): The end date for the statistics in ISO 8601 format (e.g.,2023-01-31T23:59:59Z).projectId(optional): The ID of the project for which you want to retrieve statistics.
Security
This endpoint requires an x-auth-token to authenticate the request. Ensure that your token is valid and included in the request headers.
Response
id(string): The unique identifier of the account.ALL(number): The total count of messages.PENDING(number): The total count of pending messages.SENT(number): The total count of sent messages.DELIVERED(number): The total count of delivered messages.FAILED(number): The total count of failed messages.UNKNOWN(number): The total count of unknown messages.
{
"id": "string",
"ALL": 0,
"PENDING": 0,
"SENT": 0,
"DELIVERED": 0,
"FAILED": 0,
"UNKNOWN": 0
}Last updated