RecoupGet a free auditFree audit

API REFERENCE

List Account Emails (Admin)

On this page
GET/api/admins/emails

Returns Resend emails including HTML content. Provide either account_id (returns all emails for an account) or email_id (returns a single email by Resend ID). Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token. Email response shape matches the Resend Retrieve Email API.

Authentication

x-api-key in header

bearerAuth bearer

Request

cURL
curl --request GET \
  --url 'https://api.recoupable.dev/api/admins/emails' \
  --header 'x-api-key: YOUR_API_KEY'

Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.

Try it

Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.

Kept in this browser tab only and cleared when it closes.

cURL for this request
curl --request GET \
  --url 'https://recoup-api.vercel.app/api/admins/emails'

Parameters

Query parameters

account_idstring

The account ID to fetch all emails for. Required if email_id is not provided.

email_idstring

A Resend email ID to fetch a single email. Required if account_id is not provided.

Responses

200Emails retrieved successfully

application/json

statusstring · enumrequired

Status of the request

Values: "success", "error"

emailsarray<PulseEmailRow>required

List of emails sent for the account, ordered by created_at descending

Item properties for emails
idstringrequired

The Resend email ID

fromstringrequired

Sender email address

toarray<string>required

Recipient email addresses

Item properties for to

string

ccarray<string>nullable

CC recipient email addresses

Item properties for cc

string

bccarray<string>nullable

BCC recipient email addresses

Item properties for bcc

string

reply_toarray<string>nullable

Reply-to email addresses

Item properties for reply_to

string

subjectstringrequired

Email subject line

htmlstringnullable

HTML content of the email

textstringnullable

Plain text content of the email

created_atstringrequired

Timestamp when the email was created

format: date-time

scheduled_atstringnullable

Scheduled send time, if any

format: date-time

last_eventstring · enumrequired

Most recent delivery event for this email

Values: "bounced", "canceled", "clicked", "complained", "delivered", "delivery_delayed", "failed", "opened", "queued", "scheduled", "sent"

tagsarray<object>nullable

Custom tags attached to the email

Item properties for tags
namestringrequired
valuestringrequired
400Bad request - must provide either account_id or email_id

application/json

errorintegerrequired

format: int32

messagestringrequired
401Unauthorized - missing or invalid credentials

application/json

statusstring · enumrequired

Status of the request

Values: "error"

messagestringrequired

Error message describing what went wrong

403Forbidden - authenticated account is not a Recoup admin

application/json

statusstring · enumrequired

Status of the request

Values: "error"

messagestringrequired

Error message describing what went wrong

500Internal server error

application/json

statusstring · enumrequired

Status of the request

Values: "error"

messagestringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download accounts.json
View operation source
json
{
  "description": "Returns Resend emails including HTML content. Provide either account_id (returns all emails for an account) or email_id (returns a single email by Resend ID). Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token. Email response shape matches the [Resend Retrieve Email API](https://resend.com/docs/api-reference/emails/retrieve-email).",
  "parameters": [
    {
      "name": "account_id",
      "in": "query",
      "description": "The account ID to fetch all emails for. Required if email_id is not provided.",
      "required": false,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    },
    {
      "name": "email_id",
      "in": "query",
      "description": "A Resend email ID to fetch a single email. Required if account_id is not provided.",
      "required": false,
      "schema": {
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "apiKeyAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "responses": {
    "200": {
      "description": "Emails retrieved successfully",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AdminEmailsResponse"
          }
        }
      }
    },
    "400": {
      "description": "Bad request - must provide either account_id or email_id",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Unauthorized - missing or invalid credentials",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AccountErrorResponse"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden - authenticated account is not a Recoup admin",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AccountErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Internal server error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AccountErrorResponse"
          }
        }
      }
    }
  }
}