Skip to main content

Interface: SendsResource

Defined in: packages/sdk/src/resources/sends.ts:17

The send log — one row per email Mailroom attempted, with delivery and engagement state (delivered / bounced / opened / clicked) as webhooks land.

Example

const recent = await mailroom.sends.list({ template: "welcome", status: "failed", limit: 20 });

for await (const entry of mailroom.sends.listAll({ type: "marketing" })) {
if (entry.delivery_status === "bounced") console.warn(entry.to_email);
}

Methods

list()

list(query?: SendLogQuery, opts?: CallOptions): Promise<SendLogEntry[]>;

Defined in: packages/sdk/src/resources/sends.ts:19

Single page of send-log entries (newest first).

Parameters

ParameterType
query?SendLogQuery
opts?CallOptions

Returns

Promise<SendLogEntry[]>


listAll()

listAll(query?: SendLogQuery, opts?: CallOptions): AsyncGenerator<SendLogEntry, void, void>;

Defined in: packages/sdk/src/resources/sends.ts:28

Auto-paginating async iterator over every matching entry.

Parameters

ParameterType
query?SendLogQuery
opts?CallOptions

Returns

AsyncGenerator<SendLogEntry, void, void>


listPage()

listPage(query?: SendLogQuery & {
cursor?: string;
}, opts?: CallOptions): Promise<Page<SendLogEntry>>;

Defined in: packages/sdk/src/resources/sends.ts:22

One cursor page with nextCursor for manual paging.

Parameters

ParameterType
query?SendLogQuery & { cursor?: string; }
opts?CallOptions

Returns

Promise<Page<SendLogEntry>>