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
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
limit | integer | 20 | Results per page (max 100) |
channel | string | - | Filter by channel: email, sms, voice, whatsapp |
status | string | - | Filter by status: sent, delivered, failed, expired |
source | string | messages | Use "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_..."