Project
Usage and Consumptions
View SMS usage and consumption history for the project
Endpoint
GET /api/project/consumptionsQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1) |
per_page | integer | No | Results per page (default: 10) |
from | date | No | Filter records on/after this date (YYYY-MM-DD) |
to | date | No | Filter records on/before this date (YYYY-MM-DD) |
Example
curl "https://sms.lamah.com/api/project/consumptions?from=2024-01-01&to=2024-01-31" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
The response is wrapped in a data key containing a Laravel paginator object:
{
"data": {
"current_page": 1,
"data": [
{
"consumption": 5,
"type": "SMS",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"per_page": 10,
"last_page": 10,
"total": 250
}
}Top-level response fields
| Field | Type | Description |
|---|---|---|
data | object | Laravel paginator object |
Pagination fields
| Field | Type | Description |
|---|---|---|
current_page | integer | Current page number |
per_page | integer | Results per page |
last_page | integer | Total number of pages |
total | integer | Total number of consumption records |
Consumption record fields
| Field | Type | Description |
|---|---|---|
consumption | integer | Units consumed (e.g., SMS parts) |
type | string | Feature type: SMS or OTP |
created_at | string | ISO 8601 timestamp when consumption was recorded |
updated_at | string | ISO 8601 timestamp when record was last updated |
Use this to build usage reports or billing dashboards for your users. Timestamps are returned in UTC.