# List emails

> Page through sent emails, newest first.

`GET /emails`

Requires a Full access key. Results are sorted by `created_at`, newest first.

## Query parameters

- `q` (string): Search by recipient address or subject.
- `status` (string): One of `queued`, `sent`, `delivered`, `delayed`, `bounced`.
- `after` (string): ID of the last email on the previous page.
- `limit` (number): Items per page, 1 to 100. Defaults to 30.

## Example

cURL

```
curl -X GET 'https://sendtern.com/emails?status=bounced&limit=20' \
  -H 'Authorization: Bearer st_your_api_key'
```

Node.js

```
const res = await fetch("https://sendtern.com/emails?status=bounced&limit=20", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.SENDTERN_API_KEY}`,
  },
});

const data = await res.json();
```

Python

```
import os
import requests

res = requests.get(
    "https://sendtern.com/emails?status=bounced&limit=20",
    headers={"Authorization": f"Bearer {os.environ['SENDTERN_API_KEY']}"},
)

print(res.json())
```

## Response

```json
{
  "object": "list",
  "data": [],
  "has_more": false
}
```
