Documentation
Sign inGet started

Update a mailbox

PATCH
/v1/email/mailboxes/{mailbox_id}
const mailbox = await bird.email.mailboxes.update("mbx_01abc", {
  receive_policy: "open",
});
console.log(mailbox.id, mailbox.receive_policy);
Updates a mailbox. The address and domain are immutable. Lowering the retention tier deletes any remembered message older than the new cutoff, so that request needs confirm=true before it will run.
Parámetros de consulta
confirm
boolean
Set to true when lowering retention_tier would delete remembered messages older than the new cutoff. The request is rejected without it in that case.
Cuerpo de la solicitud
display_name
nullable string
Display name used as the sender name on mail from this mailbox. Null clears it.
default_reply_to
nullable string
Default Reply-To address stamped on mail sent from this mailbox. Null clears it.
receive_policy
string
Which inbound mail the mailbox accepts.
Possible values: open, replies_only, allowlist, drop
retention_tier
string
How long the mailbox remembers message metadata and extracted text. Lowering the tier deletes remembered messages older than the new horizon, and requires confirm=true when that would happen.
Possible values: 30d
metadata
object
Replaces the mailbox's key/value data. Up to 2 KB. Keys starting with __bird are reserved.
Carga de respuesta
id
string
obligatorio
Mailbox ID.
address
string
obligatorio
The mailbox's email address. Immutable once created.
display_name
nullable string
obligatorio
Display name used as the sender name on mail from this mailbox. Null when unset.
default_reply_to
nullable string
obligatorio
Default Reply-To address stamped on mail sent from this mailbox. Null when unset.
receive_policy
string
obligatorio
Which inbound mail the mailbox accepts:
  • open: Accepts everything not blocked by a rule.
  • replies_only: Accepts only replies to messages this mailbox has sent. A reply must match a message the mailbox sent. Landing in an existing thread by itself does not count.
  • allowlist: Accepts only senders matching an allow rule. Replies to prior outbound mail are always admitted unless blocked.
  • drop: Stores nothing.
Possible values: open, replies_only, allowlist, drop
state
string
obligatorio
Lifecycle state. Suspended mailboxes stop emitting events. Inbound mail is retained as blocked.
Possible values: active, suspended
channel
string
obligatorio
The channel this mailbox receives on. Always email.
Possible values: email
owner
object
obligatorio
The principal that owns the mailbox. Always the workspace.
Mostrar atributos secundarios
owner.type
string
obligatorio
Owner principal type.
Possible values: workspace
owner.id
string
obligatorio
Owner principal ID.
inbound_address_id
string
obligatorio
The underlying inbound address that receives this mailbox's mail.
retention_tier
string
obligatorio
How long the mailbox remembers message metadata and extracted text. Original rendered source (HTML, raw message, attachments) is always available for 30 days regardless of tier.
Possible values: 30d, 90d, 1y
message_count
integer
obligatorio
Number of retained messages across all threads.
thread_count
integer
obligatorio
Number of retained threads.
unread_thread_count
nullable integer
Number of threads with unread messages in this mailbox, excluding trash. Null on create/update responses.
metadata
object
obligatorio
Your own key/value data attached to the mailbox. Up to 2 KB. Keys starting with __bird are reserved.
local_part_generated
boolean
Whether we generated the local part of the address. false means a custom handle was chosen at creation. On the shared inbox.ai domain a custom handle counts against your plan's custom-handle allowance.
created_at
string
obligatorio
When the mailbox was created.
updated_at
string
obligatorio
When the mailbox was last updated.
deleted_at
nullable string
When the mailbox was deleted, or null if it is active. A deleted mailbox stops receiving mail immediately but can be restored for 30 days, after which it and its remembered messages are permanently removed.