Skip to main content

Message Logs

Retrieve your sent message history.

GET /api/v2/messages

Authentication

Authorization: Bearer sl_live_your_key_here

Query parameters

ParameterTypeRequiredDefaultDescription
limitnumberNo50Number of results to return (max 200).
pagenumberNo1Page number for pagination.
fromstringNoโ€”Start date filter (ISO 8601, e.g. 2025-01-01).
tostringNoโ€”End date filter (ISO 8601, e.g. 2025-01-31).
info

Both from and to must be provided together for date filtering to work.

Example request

curl "https://api.sendlime.com/api/v2/messages?limit=10&page=1" \
-H "Authorization: Bearer sl_live_your_key_here"

With date filter

curl "https://api.sendlime.com/api/v2/messages?from=2025-01-01&to=2025-01-31&limit=50" \
-H "Authorization: Bearer sl_live_your_key_here"

Success response

Status: 200 OK

{
"success": true,
"data": [
{
"id": "clx1abc2def3ghi4",
"recipient": "8801XXXXXXXXX",
"message": "Hello from SendLime!",
"channel": "non-mask",
"status": "delivered",
"price": "0.5",
"gatewayId": "580000908Q23PJCF",
"errorMessage": null,
"createdAt": "2025-03-15T10:30:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 57,
"total_pages": 6
}
}

Response fields (each log entry)

FieldTypeDescription
idstringUnique log entry ID
recipientstringRecipient phone number
messagestringMessage body
channelstring"mask", "non-mask", or "whatsapp"
statusstringaccepted, pending, delivered, undelivered, failed, unknown, or rejected
pricestringCost of the message
gatewayId`stringnull`
errorMessage`stringnull`
createdAtstringISO 8601 timestamp

Pagination fields

FieldTypeDescription
pagenumberCurrent page
limitnumberResults per page
totalnumberTotal matching messages
total_pagesnumberTotal available pages