Skip to main content
POST
Send a test automated email

Authorizations

Authorization
string
header
required

Passport bearer token authentication for legacy admin sessions.

Body

application/json

Test email payload. The controller validates the commitment, trigger, optional statement year, and optional donor-send flag.

commitment_id
integer
required

Commitment ID belonging to the authenticated client, used for donor, recipient, designation, and email-set context.

Example:

88211

trigger
string
required

Automated email trigger to render and send. Validation rule: required|string.

Example:

"pay_receipt"

emailset_id
integer | null

Email set being edited. When present it must be the email set the commitment uses, otherwise nothing is sent. Validation rule: nullable|integer.

Example:

42

donation_type
enum<string> | null

Template variant to test. Non-default variants are admin tests only and never fall back to the standard template. Defaults to default.

Available options:
default,
in_kind,
soft_credit,
daf,
qcd
Example:

"qcd"

receipt_context
object | null

Optional giving-source context. Use giving_source=daf and recipient_role=soft_credit for an advisor test; an unchanged Standard Donation copy is skipped. Missing context preserves ordinary Direct soft-credit behavior.

year
integer | null

Statement year used by the year_end_statement trigger. Validation rule: nullable|integer; defaults to the current year.

Example:

2026

test
boolean | null

When true or omitted, sends to the authenticated admin; when false, sends to the donor and records activity. Validation rule: nullable|boolean.

Example:

true

Response

Email was queued for the selected recipient.

status
string
Example:

"queued"

message
string

Queue confirmation, not proof of inbox delivery.

Example:

"Test email queued for delivery to admin@example.org."