Skip to content
Pidgely Docs

API reference · Emails

Retrieve an email

GEThttps://api.pidgely.com/emails/{id}
View as Markdown

Retrieves one email with its bodies and last_event, the most advanced status across its recipients: queued, scheduled, delivery_delayed, canceled, suppressed, discarded, failed, delivered, opened, clicked, bounced or complained (opened and clicked need open and click tracking). The full timeline is in List the events of an email. 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

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
import os
import pidgely

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

result = pidgely.Emails.get("0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21")
print(result)
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
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
require "pidgely"

Pidgely.api_key = ENV["PIDGELY_API_KEY"]

result = Pidgely::Emails.get("0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21")
puts result
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 The most advanced status of any recipient; opened and clicked follow delivered for tracked e-mails (a later bounce or complaint still wins). One of queued, scheduled, sent, delivered, opened, clicked, delivery_delayed, bounced, complained, suppressed, failed, canceled, discarded.
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}$.
template object No Pidgely extension: the template the e-mail was rendered from and the language chosen; absent for html/text sends.
template.id string Yes Unique id (UUID). UUID.
template.locale string | null Yes Language variant used, or the base language; null when the template has no base language set.
tracking object No Pidgely extension (retrieve only): whether opens and clicks of this e-mail are tracked (decided when it was accepted, from the domain settings and the per-send override).
tracking.opens boolean Yes —
tracking.clicks boolean Yes —

Errors

Errors have the shape {"statusCode", "name", "message"}. See 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.