# Retrieve an email

> Retrieves one email with its bodies and last_event, the most advanced status across its recipients: queued, scheduled, delivery_delayed, canceled, suppressed, failed, delivered, bounced or…

Source: https://docs.pidgely.com/api-reference/emails/retrieve/

`GET https://api.pidgely.com/emails/{id}`

Retrieves one email with its bodies and `last_event`, the most advanced status across its recipients: `queued`, `scheduled`, `delivery_delayed`, `canceled`, `suppressed`, `failed`, `delivered`, `bounced` or `complained`. Reads come from the primary database, so the email is visible immediately after the send. A `sending_access` key can call this endpoint.

**Authorization:** `Bearer pdg_…`. Any API key (`full_access` or `sending_access`).

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | Yes | Resource id UUID. |

## Request

```js tab="Node.js"
import { Pidgely } from 'pidgely';

const pidgely = new Pidgely(process.env.PIDGELY_API_KEY);

const { data, error } = await pidgely.emails.get('0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21');
console.log(data ?? error);
```

```python tab="Python"
import os
import pidgely

pidgely.api_key = os.environ["PIDGELY_API_KEY"]

result = pidgely.Emails.get("0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21")
print(result)
```

```php tab="PHP"
<?php

require __DIR__ . '/vendor/autoload.php';

$pidgely = Pidgely::client(getenv('PIDGELY_API_KEY'));

$result = $pidgely->emails->get('0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21');
var_dump($result);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/pidgely/pidgely-go"
)

func main() {
	ctx := context.Background()
	client := pidgely.NewClient(os.Getenv("PIDGELY_API_KEY"))

	result, err := client.Emails.Get(ctx, "0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21")
	if err != nil {
		panic(err)
	}
	fmt.Println(result)
}
```

```ruby tab="Ruby"
require "pidgely"

Pidgely.api_key = ENV["PIDGELY_API_KEY"]

result = Pidgely::Emails.get("0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21")
puts result
```

```bash tab="cURL"
curl -X GET 'https://api.pidgely.com/emails/0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21' \
  -H "Authorization: Bearer $PIDGELY_API_KEY"
```

## Response

`200 OK`

```json
{
  "object": "email",
  "id": "0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21",
  "message_id": "<0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21@acme.com>",
  "to": [
    "delivered@example.com"
  ],
  "cc": [],
  "bcc": [],
  "reply_to": [],
  "from": "Acme <onboarding@acme.com>",
  "subject": "Welcome to Acme",
  "html": "<p>Thanks for signing up!</p>",
  "text": "Thanks for signing up!",
  "created_at": "2026-10-12 16:44:41.000000+00",
  "scheduled_at": null,
  "last_event": "delivered",
  "tags": [
    {
      "name": "category",
      "value": "welcome"
    }
  ]
}
```

### Response fields

| Name | Type | Required | Description |
|---|---|---|---|
| `object` | string | No | Object type. |
| `id` | string | No | Unique id (UUID). UUID. |
| `message_id` | string | No | Message-ID header of the email. |
| `to` | string[] | No | Recipient address (`a@x.com` or `Name <a@x.com>`) or a list of them. Up to 50 unique recipients across `to`, `cc` and `bcc`. |
| `cc` | string[] | No | Carbon-copy recipients. Count toward the 50-recipient limit. |
| `bcc` | string[] | No | Blind carbon-copy recipients. Count toward the 50-recipient limit. |
| `reply_to` | string[] | No | Reply-To address or list of addresses. |
| `from` | string | No | — |
| `subject` | string | No | Subject line, up to 998 bytes. Required unless a template provides it. |
| `html` | string \| null | No | HTML body. `html` or `text` is required (unless you send with a template). |
| `text` | string \| null | No | — |
| `created_at` | string | No | Timestamp in UTC (`2026-10-12 16:44:41.000000+00`). |
| `scheduled_at` | string \| null | No | Timestamp in UTC, or null. |
| `last_event` | string | No | Most advanced status across the recipients. One of `queued`, `scheduled`, `sent`, `delivered`, `delivery_delayed`, `bounced`, `complained`, `suppressed`, `failed`, `canceled`. |
| `tags` | object[] | No | Name/value pairs attached to the email and returned in webhooks. |
| `tags[].name` | string | Yes | Display name. Pattern: `^[A-Za-z0-9_-]{1,256}$`. |
| `tags[].value` | string | Yes | Pattern: `^[A-Za-z0-9_-]{1,256}$`. |

## Errors

Errors have the shape `{"statusCode", "name", "message"}`. See [Errors](https://docs.pidgely.com/errors/) for the full list.

| Status | Name | When |
|---|---|---|
| 401 | `missing_api_key`, `restricted_api_key` | No `Authorization: Bearer` header, or a `sending_access` key called an endpoint that needs `full_access`. |
| 403 | `invalid_api_key`, `validation_error` | The API key is invalid or revoked, or the request is not allowed for this account (unverified domain, plan limit, paused account). |
| 404 | `not_found` | The resource does not exist in this account (or the id is not a valid UUID). |
| 422 | `validation_error` | A field is missing or invalid; `message` names it. |
| 429 | `rate_limit_exceeded` | Too many requests per second. Wait for `Retry-After` seconds. |
