From 45cece31991d1bab453ee5f92d1100be83f83d8a Mon Sep 17 00:00:00 2001 From: Sweets Sweetman Date: Thu, 25 Jun 2026 14:57:20 -0500 Subject: [PATCH 1/2] docs: make `to` optional on POST /api/emails (defaults to account's own email) Follow-up enhancement on chat#1815. When `to` is omitted, the email is sent to the authenticated account's own email address, so a caller can "email me this" without restating their address (the common scheduled- report case). `to` stays `minItems: 1` when provided; the no-card recipient restriction is unchanged (own email is always allowed). Co-Authored-By: Claude Opus 4.8 (1M context) --- api-reference/openapi/accounts.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api-reference/openapi/accounts.json b/api-reference/openapi/accounts.json index f899c75e..161c1322 100644 --- a/api-reference/openapi/accounts.json +++ b/api-reference/openapi/accounts.json @@ -2795,7 +2795,6 @@ "SendEmailRequest": { "type": "object", "required": [ - "to", "subject" ], "properties": { @@ -2806,7 +2805,7 @@ "type": "string", "format": "email" }, - "description": "Recipient email address(es). Without a payment method on file, restricted to the account's own email; [add a payment method](/api-reference/credits/sessions-create) to send to any recipient.", + "description": "Recipient email address(es). Optional — when omitted, the email is sent to the authenticated account's own email address. Without a payment method on file, restricted to the account's own email; [add a payment method](/api-reference/credits/sessions-create) to send to any recipient.", "example": [ "recipient@example.com" ] From 6b24dd95d6fee94ef0a148ffb99252f889657767 Mon Sep 17 00:00:00 2001 From: Sweets Sweetman Date: Thu, 25 Jun 2026 16:29:12 -0500 Subject: [PATCH 2/2] docs: make subject optional on POST /api/emails (default from body) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Folded into the to-optional change. Resend requires a non-empty subject, but the caller shouldn't have to supply one for scheduled/agent sends — document subject as optional with a server-side default (first heading/line of the body, falling back to "Message from Recoup" when the body is empty). SendEmailRequest now has no required fields. CreateNotificationRequest is unchanged. API impl follows once these docs merge. Co-Authored-By: Claude Opus 4.8 (1M context) --- api-reference/openapi/accounts.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api-reference/openapi/accounts.json b/api-reference/openapi/accounts.json index 161c1322..79d11d3f 100644 --- a/api-reference/openapi/accounts.json +++ b/api-reference/openapi/accounts.json @@ -2794,9 +2794,6 @@ }, "SendEmailRequest": { "type": "object", - "required": [ - "subject" - ], "properties": { "to": { "type": "array", @@ -2823,7 +2820,7 @@ }, "subject": { "type": "string", - "description": "Email subject line", + "description": "Email subject line. Optional — when omitted, defaults to the first heading or line of the body, falling back to `Message from Recoup` if the body is empty.", "example": "Weekly Pulse Report" }, "text": {