| Name | Type | Required | Description |
|---|---|---|---|
| channel | string | Yes | Defines the communication channel for which logs should be retrieved. Accepted values are sms, whatsapp, or email. The response structure and analytics fields returned will vary depending on the selected channel. |
| from_date | string | Yes | Start date and time for fetching API logs. The value must follow the format YYYY-MM-DD HH:MM:SS. Only records created after or equal to this timestamp will be included in the response. |
| to_date | string | Yes | End date and time for fetching API logs. The value must follow the format YYYY-MM-DD HH:MM:SS. Only records created before or equal to this timestamp will be included in the response. |
| source | string | No | Filters logs based on the API endpoint or source from which the request originated. This parameter performs a partial match on the endpoint field in the API logs. Useful for distinguishing between different integrations or services consuming the API. |
| max_records | integer | No | Limits the number of records returned in the response. Acceptable values range from 1 to 50. If this parameter is not provided, the API returns 10 records by default. Records are returned in descending order based on creation time (latest first). |
| status | string | No | Filters results based on message delivery or API status. The API will check both API request status and provider delivery status. Common values include delivered, sent, read, processed, pending, queued, failed, bounce, dropped, or undelivered. |
| mobile_no | string | No | Filters results by recipient mobile number. Applicable only for SMS and WhatsApp channels. The API will match the number against both API log records and analytics records associated with message delivery. |
| string | No | Filters results by recipient email address. Applicable only when the selected channel is email. The API will match the email address against both the API request logs and email delivery analytics. | |
| request_id | string | No | Unique identifier generated for each API request. Supplying this parameter allows retrieval of logs related to a specific API call, which is useful for debugging, tracking message delivery, or auditing individual requests. |
curl --location --request POST 'api-logs' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"channel": "sms",
"from_date": "2026-03-01 00:00:00",
"to_date": "2026-03-08 23:59:59",
"max_records": 10,
"status": "delivered",
"mobile_no": "9876543210",
"email": "user@email.com",
"request_id": "req_123456",
}'{
"status": "success",
"channel": "sms",
"date_range": {
"from": "2026-03-01 00:00:00",
"to": "2026-03-08 23:59:59"
},
"summary": {
"total_records": 10,
"api_success": 9,
"api_failure": 1,
"delivered": 7,
"pending": 2,
"failed": 1
},
"data": [
{
"mobile_no": "9876543210",
"template_id": "OTP_TEMPLATE",
"request_id": "req_123456",
"delivery_status": "delivered",
"sent_at": "2026-03-08 14:10:22"
}
]
}