Skip to content

feat(inboxes): add label specific endpoints for threads - #1161

Merged
isabellaaquino merged 4 commits into
inboxes-releasefrom
feature/mes-2721-review-thread-update-label-parameters-for-api-consistency
Oct 16, 2026
Merged

isabellaaquino merged 4 commits into
inboxes-releasefrom
feature/mes-2721-review-thread-update-label-parameters-for-api-consistency

Conversation

@isabellaaquino

@isabellaaquino isabellaaquino commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary by cubic

Adds dedicated label endpoints for inbox threads, replacing the addLabelIds and removeLabelIds parameters on the update thread endpoint.

  • update no longer accepts addLabelIds and removeLabelIds; use the new labels sub-resource instead.
  • labels.add accepts 1–10 label IDs and labels.set accepts 0–100; labels.remove deletes a single label by ID.
  • All label endpoints return the thread's updated label list and work with inboxes addressed by email.

Additional fixes

  • Batch no longer mutates the payload when rendering React emails.
  • Publish chains for templates now preserve error response headers.
  • Requests with dot segments in the path are rejected before being sent.
  • Inbox agent tone is typed as one of the presets, and inbox labels accept plain string colors.
  • Inbox list and get responses now include created_at and updated_at.

Written for commit 4ae25fa. Summary will update on new commits.

View guided diff

@isabellaaquino
isabellaaquino requested a review from a team as a code owner October 15, 2026 22:14
@isabellaaquino
isabellaaquino requested review from drish and removed request for a team October 15, 2026 22:14
@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/resend@1161

commit: 4ae25fa

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 10 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread src/inboxes/threads/threads.ts Resolved
Comment thread src/inboxes/threads/labels/labels.ts Resolved
@isabellaaquino
isabellaaquino force-pushed the feature/mes-2721-review-thread-update-label-parameters-for-api-consistency branch from 25a704d to 81e87fc Compare October 15, 2026 22:25
@isabellaaquino
isabellaaquino changed the base branch from main to canary October 15, 2026 22:25

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 11 files

Confidence score: 4/5

  • The new labels.add, labels.set, and labels.remove operations may not enforce the API-key permission checks required by the SDK. Verify these methods reject keys without the needed permissions.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/inboxes/threads/labels/labels.spec.ts">

<violation number="1" location="src/inboxes/threads/labels/labels.spec.ts:35">
P3: Custom agent: **API Key Permission Check SDK Methods**

Per the API key permission check rule (66cdbcad), this PR ships new operations against Resend's API — `labels.add` (POST), `labels.set` (PUT), and `labels.remove` (DELETE) on `/inboxes/:inboxId/threads/:threadId/labels` — including the delete-by-label path. Confirm before merging that the API keys used in production have the permissions required for these new endpoints, so label operations don't fail after deployment.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

it('adds labels to a thread', async () => {
mockResponse();

const data = await resend.inboxes.threads.labels.add({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Custom agent: API Key Permission Check SDK Methods

Per the API key permission check rule (66cdbcad), this PR ships new operations against Resend's API — labels.add (POST), labels.set (PUT), and labels.remove (DELETE) on /inboxes/:inboxId/threads/:threadId/labels — including the delete-by-label path. Confirm before merging that the API keys used in production have the permissions required for these new endpoints, so label operations don't fail after deployment.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/inboxes/threads/labels/labels.spec.ts, line 35:

<comment>Per the API key permission check rule (66cdbcad), this PR ships new operations against Resend's API — `labels.add` (POST), `labels.set` (PUT), and `labels.remove` (DELETE) on `/inboxes/:inboxId/threads/:threadId/labels` — including the delete-by-label path. Confirm before merging that the API keys used in production have the permissions required for these new endpoints, so label operations don't fail after deployment.</comment>

<file context>
@@ -0,0 +1,115 @@
+    it('adds labels to a thread', async () => {
+      mockResponse();
+
+      const data = await resend.inboxes.threads.labels.add({
+        inboxId,
+        threadId,
</file context>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

View guided diff | Re-trigger cubic

@isabellaaquino
isabellaaquino changed the base branch from canary to inboxes-release October 16, 2026 14:37
@isabellaaquino
isabellaaquino force-pushed the feature/mes-2721-review-thread-update-label-parameters-for-api-consistency branch from 06e7e8b to 6f6bce5 Compare October 16, 2026 14:44
@isabellaaquino
isabellaaquino merged commit 1f90786 into inboxes-release Oct 16, 2026
10 checks passed
@isabellaaquino
isabellaaquino deleted the feature/mes-2721-review-thread-update-label-parameters-for-api-consistency branch October 16, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant