Skip to content

Unified Message Logs

SendAPI provides a single, unified endpoint to search and paginate through all outbound messages across all channels (WhatsApp, SMS, and Email) within a specific project.

List Message Logs

GET /v1/team/message-logs

This endpoint returns a chronologically sorted list of all messages.

Query Parameters

ParameterTypeDescription
searchstringFilter logs by recipient address (phone number or email) or by message content snippet.
pageintegerPage number for pagination (defaults to 1).

Request Example

bash
curl "https://sendapi.co/v1/team/message-logs?search=hello&page=1" \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "X-Project-Id: 14"

Response

json
{
  "data": [
    {
      "id": 1042,
      "type": "whatsapp",
      "recipient": "+1234567890",
      "content": "Hello! Your verification code is 123456.",
      "status": "delivered",
      "created_at": "2026-03-09T14:35:00.000000Z"
    },
    {
      "id": 855,
      "type": "email",
      "recipient": "user@example.com",
      "content": "Subject: Welcome to the platform! Hello...",
      "status": "delivered",
      "opened_at": "2026-03-09T14:40:00.000000Z",
      "created_at": "2026-03-09T14:30:00.000000Z"
    },
    {
      "id": 302,
      "type": "sms",
      "recipient": "+1987654321",
      "content": "Hello from SendAPI SMS.",
      "status": "failed",
      "created_at": "2026-03-09T14:25:00.000000Z"
    }
  ],
  "links": {
    "first": "https://sendapi.co/v1/team/message-logs?page=1",
    "last": "https://sendapi.co/v1/team/message-logs?page=5",
    "prev": null,
    "next": "https://sendapi.co/v1/team/message-logs?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 5,
    "per_page": 30,
    "to": 30,
    "total": 142
  }
}

Log Types

The type field determines the exact channel used. Based on the channel, some fields may be added:

  • Email: Contains an opened_at timestamp if tracking is enabled and the recipient has opened the email.
  • SMS / WhatsApp: Recipient will be formatted as an E.164 phone number.

Released under the MIT License.