import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.labels.update({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
labelId: '7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34',
color: '#F76B15',
});
curl -X PATCH 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/labels/7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"color": "#F76B15"
}'
resend inboxes labels update b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34 \
--color '#F76B15'
{
"object": "inbox_label",
"id": "7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34"
}
Update Label
Rename or recolor an existing label.
PATCH
/
inboxes
/
:inbox_id
/
labels
/
:label_id
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.labels.update({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
labelId: '7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34',
color: '#F76B15',
});
curl -X PATCH 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/labels/7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"color": "#F76B15"
}'
resend inboxes labels update b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34 \
--color '#F76B15'
{
"object": "inbox_label",
"id": "7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34"
}
Inboxes are currently in private beta and only available to a limited
number of users. The response shape might change before GA.Get early access if you’re interested in testing this feature.Once you have access, upgrade your Resend SDK to use the new methods:
npm install resend@6.33.0
npm install -g resend-cli@2.25.0
Path Parameters
Body Parameters
Omitted fields keep their current value.string
A new name for the label. Max 64 characters. A name that another label in the
inbox already uses, compared without case, returns a
422.string
A new color for the label as a
#RRGGBB hex code, like #E93D82.Response Fields
string
Always
inbox_label.string
The ID of the label.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.labels.update({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
labelId: '7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34',
color: '#F76B15',
});
curl -X PATCH 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/labels/7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"color": "#F76B15"
}'
resend inboxes labels update b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34 \
--color '#F76B15'
{
"object": "inbox_label",
"id": "7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34"
}
Was this page helpful?
⌘I