docs(batch): document tags support#200
Conversation
Each batch email accepts the same fields as Resend::Emails.send, including scheduled_at, tags, and attachments. Add a spec that verifies these fields are passed through in the request body. Co-authored-by: cpenned <cpenned@users.noreply.github.com>
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Documents per-email fields (scheduled_at, tags, attachments) in batch.send method and adds a spec to verify serialization. No runtime code changes.
Re-trigger cubic
Batch emails support tags per email. scheduled_at and attachments are not supported in batch and are documented as such. Co-authored-by: cpenned <cpenned@users.noreply.github.com>
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Dismissed because Cubic found issues in a newer review.
Co-authored-by: cpenned <cpenned@users.noreply.github.com>
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="lib/resend/batch.rb">
<violation number="1" location="lib/resend/batch.rb:10">
P2: The docstring says "Each hash accepts the same fields as {Resend::Emails.send}, including:" but according to the Resend API docs, `attachments` and `scheduled_at` are explicitly **not supported** on the batch endpoint (`POST /emails/batch`). Saying "same fields" without the exception is misleading — users who read this will pass `attachments` or `scheduled_at` parameters and silently fail or get an error at runtime. The previous version (before this PR) had no field-level documentation, which was incomplete but not actively misleading. Recommend restoring the caveat that `attachments` and `scheduled_at` are not supported in batch, e.g. "Each hash accepts the same fields as {Resend::Emails.send}, including +tags+ per email, except +scheduled_at+ and +attachments+ which are not supported in batch."</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| # | ||
| # @param params [Array<Hash>] Array of email parameters (max 100 emails) | ||
| # Each email in +params+ accepts the same fields as {Resend::Emails.send}, | ||
| # including +tags+ per email. |
There was a problem hiding this comment.
P2: The docstring says "Each hash accepts the same fields as {Resend::Emails.send}, including:" but according to the Resend API docs, attachments and scheduled_at are explicitly not supported on the batch endpoint (POST /emails/batch). Saying "same fields" without the exception is misleading — users who read this will pass attachments or scheduled_at parameters and silently fail or get an error at runtime. The previous version (before this PR) had no field-level documentation, which was incomplete but not actively misleading. Recommend restoring the caveat that attachments and scheduled_at are not supported in batch, e.g. "Each hash accepts the same fields as {Resend::Emails.send}, including +tags+ per email, except +scheduled_at+ and +attachments+ which are not supported in batch."
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At lib/resend/batch.rb, line 10:
<comment>The docstring says "Each hash accepts the same fields as {Resend::Emails.send}, including:" but according to the Resend API docs, `attachments` and `scheduled_at` are explicitly **not supported** on the batch endpoint (`POST /emails/batch`). Saying "same fields" without the exception is misleading — users who read this will pass `attachments` or `scheduled_at` parameters and silently fail or get an error at runtime. The previous version (before this PR) had no field-level documentation, which was incomplete but not actively misleading. Recommend restoring the caveat that `attachments` and `scheduled_at` are not supported in batch, e.g. "Each hash accepts the same fields as {Resend::Emails.send}, including +tags+ per email, except +scheduled_at+ and +attachments+ which are not supported in batch."</comment>
<file context>
@@ -7,11 +7,10 @@ class << self
# Each email in +params+ accepts the same fields as {Resend::Emails.send},
- # except +scheduled_at+ and +attachments+, which are not supported in batch.
- # +tags+ are supported per email.
+ # including +tags+ per email.
#
# @param params [Array<Hash>] Array of email parameters (max 100 emails).
</file context>
Summary
The batch send API supports
tagsper email. This PR documents that support in the Ruby SDK.Changes
tagstagsare serialized in the request bodyNotes
No runtime code changes were required —
Resend::Batch.sendforwards the params array as JSON viaResend::Request.Summary by cubic
Documents per‑email
tagssupport inResend::Batch.send, noting each email accepts the same fields asResend::Emails.send. Adds a spec to verifytagsare serialized in the request body; no runtime changes.Written for commit b4884ef. Summary will update on new commits.