# Retrieve an email

> Inspect one recipient delivery, its content, and its delivery and engagement history.

`GET https://api-connect.nxiom.com/api/v1/emails/logs/{emailLogId}`

## Authorization

Requires `email.full_access`.

## Path parameters

| Field | Type | Description |
| --- | --- | --- |
| `emailLogId` | string · required | A recipient delivery identifier from the send response or email logs. Use a delivery ID, not a message ID. |

## Request

### cURL

```shell
curl "https://api-connect.nxiom.com/api/v1/emails/logs/YOUR_DELIVERY_ID" \
  -H "Authorization: Bearer $NEXIOM_API_KEY"
```

### Node.js

```typescript
import { NexiomConnect } from '@nexiom/connect';

const apiKey = process.env.NEXIOM_API_KEY;
if (!apiKey) throw new Error('Set NEXIOM_API_KEY');

const nexiom = new NexiomConnect({ apiKey });

const { data, error } = await nexiom.emails.get('YOUR_DELIVERY_ID');

if (error) throw new Error(`${error.code}: ${error.message}`);
console.log(data.recipient, data.status);
```

### PHP

```php
<?php

use Nexiom\Connect\NexiomConnect;

$apiKey = getenv('NEXIOM_API_KEY');
if (!$apiKey) {
    throw new RuntimeException('Set NEXIOM_API_KEY');
}

$nexiom = new NexiomConnect($apiKey);

$delivery = $nexiom->emails->get('YOUR_DELIVERY_ID');

echo $delivery['recipient'], ' ', $delivery['status'];
```

## Response

HTTP `200`. This endpoint returns the delivery object directly, without a `data` wrapper.

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Recipient delivery ID. |
| `message_id` | string | Message ID shared by the deliveries of one send. Use it to cancel or reschedule a scheduled send. |
| `recipient` | string | Recipient address. |
| `subject` | string | Subject line. |
| `from_address` | string | Sender address. |
| `from_name` | string or null | Sender display name, when set. |
| `status` | string | Delivery state. A scheduled send is `scheduled` until its time, or `canceled`. |
| `source` | string | Sending source, such as `api` or `smtp`. |
| `scheduled_at` | string or null | Scheduled send time. |
| `canceled_at` | string or null | Cancellation time. |
| `delivery_reason` | string or null | Reason for the delivery state, when available. |
| `status_message` | string or null | Message describing the delivery state, when available. |
| `html_content` | string or null | HTML message content. |
| `text_content` | string or null | Plain-text message content. |
| `accepted_at` | string or null | When the provider accepted the message. |
| `delivered_at` | string or null | When the message was delivered. |
| `bounced_at` | string or null | When the message bounced. |
| `complained_at` | string or null | When the recipient complained. |
| `failed_at` | string or null | When the delivery failed. |
| `first_opened_at` | string or null | First recorded open. |
| `first_clicked_at` | string or null | First recorded click. |
| `open_count` | number | Recorded opens. |
| `click_count` | number | Recorded clicks. |
| `domain` | object or null | Summary of the sending domain. |
| `contact` | object or null | Summary of the contact. |
| `template` | object or null | Summary of the template. |

A missing delivery or a delivery outside the key's project returns a not-found response. Treat engagement counts as signals; automated email clients can affect them.

### 200 OK

Example successful response.

```json
{
  "id": "delivery_example",
  "message_id": "message_example",
  "created_at": "2026-10-02T10:00:00.000Z",
  "recipient": "reader@example.com",
  "recipient_name": null,
  "subject": "Welcome",
  "from_address": "hello@mail.example.com",
  "from_name": null,
  "sending_domain": "mail.example.com",
  "source": "api",
  "status": "delivered",
  "delivery_reason": null,
  "status_message": null,
  "scheduled_at": null,
  "canceled_at": null,
  "html_content": null,
  "text_content": "Thanks for joining us.",
  "accepted_at": "2026-10-02T10:00:01.000Z",
  "delivered_at": "2026-10-02T10:00:03.000Z",
  "bounced_at": null,
  "complained_at": null,
  "failed_at": null,
  "bounce_type": null,
  "first_opened_at": null,
  "first_clicked_at": null,
  "open_count": 0,
  "click_count": 0,
  "domain": {
    "id": "domain_example",
    "domain": "mail.example.com"
  },
  "contact": null,
  "template": null
}
```

### 401 Unauthorized

The API key is missing, malformed, revoked, or expired.

```json
{
  "error": "unauthorized",
  "message": "Invalid API key",
  "correlationId": "req_example"
}
```

### 403 Forbidden

The API key lacks a required permission, or its domain restriction does not allow this sender.

```json
{
  "error": "not_allowed",
  "message": "Missing required API key permissions: email.full_access",
  "correlationId": "req_example"
}
```

### 404 Not Found

No resource with this ID exists in the API key’s project.

```json
{
  "error": "not_found",
  "code": "resource_not_found",
  "message": "Resource not found",
  "correlationId": "req_example"
}
```

---

Source: https://connect.nxiom.com/docs/api/emails/retrieve
