Simplifyd Cloud
SmailAPI ReferenceEmailsList Emails

List Emails

Retrieve a paginated list of sent emails.

GET /api/v1/emails

Returns a paginated list of emails sent from the authenticated account, ordered newest first. Authenticate with an X-API-Key header.

Query parameters

ParameterTypeDefaultDescription
limitnumber50Number of results to return (max 100)
offsetnumber0Number of results to skip

Response

Returns 200 OK:

FieldTypeDescription
emailsEmailSend[]Array of email records
countnumberTotal count matching the query
{
  "emails": [
    {
      "id": "em_01hx...",
      "status": "sent",
      "from": "noreply@yourdomain.com",
      "to": "user@example.com",
      "subject": "Your order has shipped",
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "count": 1
}

Code examples

curl "https://api.smail.dev/api/v1/emails?limit=10&offset=0" \
  -H "X-API-Key: sk_live_..."
const { emails, count } = await smail.emails.list({ limit: 10, offset: 0 });
console.log(`Showing ${emails.length} of ${count} emails`);
result, err := client.Emails.List(ctx, smail.ListEmailsOptions{
    Limit:  10,
    Offset: 0,
})
fmt.Printf("Showing %d of %d emails\n", len(result.Emails), result.Count)

Error responses

StatusErrorDescription
401unauthorizedMissing or invalid API key