# List Received Emails

> GET /emails/receiving — list the emails received by your domains.

`GET /emails/receiving`

List the emails received by your domains. The list returns a reference to each received email; use an email's `id` to fetch its full content with [GET /emails/receiving/:id](https://www.mailblastr.com/docs/api/emails-received-get), or its [attachments](https://www.mailblastr.com/docs/api/emails-received-list-attachments).

This endpoint returns only emails **received** by your domains. To list emails your account has sent, use [GET /emails](https://www.mailblastr.com/docs/api/emails-list).

> **Note:** This endpoint is paginated. The `limit` parameter is optional — if you omit it, all received emails are returned in a single response. See [Pagination](https://www.mailblastr.com/docs/api/pagination).

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | number | No | Number of received emails to retrieve per page. Optional. Maximum `100`, minimum `1`. |
| `after` | string | No | The email `id` **after** which more emails are retrieved. The passed id is not included. Cannot be combined with `before`. |
| `before` | string | No | The email `id` **before** which more emails are retrieved. The passed id is not included. Cannot be combined with `after`. |

## Request

**Node.js**

```js
import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

const { data, error } = await mb.emails.receiving.list();
console.log({ data, error });
```

**Ruby**

```ruby
require "mailblastr"

Mailblastr.api_key = "mb_xxxxxxxxx"

Mailblastr::Emails::Receiving.list
```

**PHP**

```php
$mailblastr = Mailblastr::client('mb_xxxxxxxxx');

$mailblastr->emails->receiving->list();
```

**Python**

```python
import mailblastr

mailblastr.api_key = "mb_xxxxxxxxx"

mailblastr.Emails.Receiving.list()
```

**Go**

```go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://api.mailblastr.com/emails/receiving", nil)
    req.Header.Set("Authorization", "Bearer mb_xxxxxxxxx")
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    out, _ := io.ReadAll(res.Body)
    fmt.Println(string(out))
}
```

**Rust**

```rust
use reqwest::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let res = Client::new()
        .get("https://api.mailblastr.com/emails/receiving")
        .header("Authorization", "Bearer mb_xxxxxxxxx")
        .send()
        .await?;
    println!("{}", res.text().await?);
    Ok(())
}
```

**Java**

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.mailblastr.com/emails/receiving"))
    .header("Authorization", "Bearer mb_xxxxxxxxx")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

**.NET**

```csharp
using System.Net.Http;
using System.Text;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.mailblastr.com/emails/receiving");
request.Headers.Add("Authorization", "Bearer mb_xxxxxxxxx");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

**cURL**

```bash
curl -X GET 'https://api.mailblastr.com/emails/receiving' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
mailblastr emails receiving list
```

## Response

A paginated `list` object. Each item in `data` is a received-email reference with its addressing, `subject`, `message_id`, and an `attachments` summary.

```json
{
  "object": "list",
  "has_more": true,
  "data": [
    {
      "object": "received_email",
      "id": "a39999a6-88e3-48b1-888b-beaabcde1b33",
      "to": ["recipient@yourdomain.com"],
      "from": "sender@example.com",
      "created_at": "2026-06-23T14:37:40.951Z",
      "subject": "Hello World",
      "message_id": "<111-222-333@email.example.com>",
      "raw_available": false,
      "attachments": [
        {
          "id": "47e999c7-c89c-4999-bf32-aaaaa1c3ff21",
          "filename": "example.txt",
          "content_type": "text/plain",
          "content_disposition": "attachment",
          "size": 13,
          "downloadable": false
        }
      ]
    }
  ]
}
```

## Errors

Returns `validation_error` if `limit` is outside 1–100, if a cursor is malformed, or if both `before` and `after` are supplied. See the [error reference](https://www.mailblastr.com/docs/api/errors).
