GET /v1/messages

List all messages sent by your organization, with pagination and filtering.

List Messages

Returns a paginated list of messages from the unified messages table. You can filter by channel and status.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger20Results per page (max 100)
channelstring-Filter by channel: email, sms, voice, whatsapp
statusstring-Filter by status: sent, delivered, failed, expired
sourcestringmessagesUse "verifications" for legacy OTP table

Response

Response
{
  "data": [
    {
      "id": "msg_abc123",
      "to_address": "user@example.com",
      "channel": "email",
      "status": "delivered",
      "subject": "Welcome!",
      "otp_verified": false,
      "ai_routed": false,
      "tags": ["onboarding"],
      "sent_at": "2025-01-01T00:00:00Z",
      "delivered_at": "2025-01-01T00:00:05Z",
      "created_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 150,
    "total_pages": 8
  }
}

Example

cURL
curl https://api.yoursend.dev/v1/messages?page=1&limit=10&channel=email \
  -H "Authorization: Bearer ys_live_..."