@messagebird/sdk 0.26.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -332,31 +332,31 @@ type VoiceMediaQuality = {
332
332
  *
333
333
  * Most of them you can fix yourself:
334
334
  *
335
- * - `source_not_allowed`: the call came from an IP address that is not in the
335
+ * - `source_not_allowed`: The call came from an IP address that is not in the
336
336
  * trunk's allowed-address list. Add the address your PBX sends from.
337
- * - `caller_id_not_verified`: the number in the `From` header is not a verified
337
+ * - `caller_id_not_verified`: The number in the `From` header is not a verified
338
338
  * caller ID for this workspace. Verify it, or present a number you have
339
339
  * already verified.
340
- * - `destination_not_enabled`: you have not turned on calling to this
340
+ * - `destination_not_enabled`: You have not turned on calling to this
341
341
  * destination country. Enable it in your voice destination settings.
342
- * - `insufficient_balance`: your wallet did not cover the call. Top up, or turn
342
+ * - `insufficient_balance`: Your wallet did not cover the call. Top up, or turn
343
343
  * on automatic top-ups.
344
- * - `daily_spend_exceeded`: the call would have passed your organization's daily
344
+ * - `daily_spend_exceeded`: The call would have passed your organization's daily
345
345
  * voice spend limit. The limit resets at the start of the next UTC day.
346
- * - `concurrent_calls_exceeded`: you already have as many calls in progress as
346
+ * - `concurrent_calls_exceeded`: You already have as many calls in progress as
347
347
  * your account allows. Wait for one to end, or ask support to raise the limit.
348
- * - `calls_per_second_exceeded`: you placed calls faster than your account
348
+ * - `calls_per_second_exceeded`: You placed calls faster than your account
349
349
  * allows. Slow the rate you dial at, then retry.
350
350
  *
351
351
  * The rest need Bird to act, so contact support and quote the call `id`:
352
352
  *
353
- * - `routing_not_configured`: no dial plan is attached to this trunk yet.
353
+ * - `routing_not_configured`: No dial plan is attached to this trunk yet.
354
354
  * Expected on a trunk that was just created.
355
- * - `no_route_found`: a dial plan is attached, but no rule in it covers this
355
+ * - `no_route_found`: A dial plan is attached, but no rule in it covers this
356
356
  * destination.
357
- * - `destination_blocked`: the destination is blocked by Bird's routing
357
+ * - `destination_blocked`: The destination is blocked by our routing
358
358
  * configuration.
359
- * - `call_not_permitted`: the call could not be priced for your account.
359
+ * - `call_not_permitted`: The call could not be priced for your account.
360
360
  *
361
361
  */
362
362
  type VoiceCallRejectionReason = "source_not_allowed" | "caller_id_not_verified" | "routing_not_configured" | "no_route_found" | "destination_blocked" | "destination_not_enabled" | "insufficient_balance" | "daily_spend_exceeded" | "concurrent_calls_exceeded" | "calls_per_second_exceeded" | "call_not_permitted";
@@ -788,14 +788,14 @@ type EventVerifyVerificationVerifiedData = EventVerifyBase & {
788
788
  */
789
789
  type VerificationChannel$1 = "email" | "sms" | "whatsapp" | (string & {});
790
790
  /**
791
- * The recipient to verify. Provide an `email_address`, a `phone_number`, or both; at least one is required. The addresses also identify the verification: a check must supply exactly the set used on the create call, so a verification created with both addresses is not found by either one alone.
791
+ * The recipient to verify. Provide an `email`, a `phone_number`, or both; at least one is required. The addresses also identify the verification: a check must supply exactly the set used on the create call, so a verification created with both addresses is not found by either one alone.
792
792
  *
793
793
  */
794
794
  type VerificationTo = {
795
795
  /**
796
796
  * The recipient's email address. Case does not matter; the address is lowercased before use.
797
797
  */
798
- email_address?: string;
798
+ email?: string;
799
799
  /**
800
800
  * The recipient's phone number in E.164 format, with the leading `+` and country code (for example `+15551234567`). A number in any other format is rejected as an invalid recipient (`422`).
801
801
  */
@@ -1693,7 +1693,17 @@ type EventEmailScheduled = {
1693
1693
  };
1694
1694
  /**
1695
1695
  * Why an email was rejected before delivery.
1696
- * `recipient_suppressed` means the recipient is on the workspace suppression list, so Bird did not attempt delivery. `transmission_failed` means the message could not be transmitted for delivery. `generation_failure` means the message could not be built for delivery (a template or content issue). `policy_rejection` means the message was refused by sending policy. `domain_unverified` means the sending domain was not verified. `quota_exceeded` means the organization's send quota was reached. `recipient_not_allowed` means a recipient was not permitted for this send (for shared onboarding-domain sends, recipients must be verified workspace members).
1696
+ *
1697
+ * - `recipient_suppressed`: The recipient is on the workspace suppression list, so
1698
+ * delivery was never attempted.
1699
+ * - `transmission_failed`: The message could not be transmitted for delivery.
1700
+ * - `generation_failure`: The message could not be built for delivery (template or
1701
+ * content issue).
1702
+ * - `policy_rejection`: The message was refused by sending policy.
1703
+ * - `domain_unverified`: The sending domain was not verified.
1704
+ * - `quota_exceeded`: The organization's send quota was reached.
1705
+ * - `recipient_not_allowed`: A recipient was not permitted for this send (for shared
1706
+ * onboarding-domain sends, recipients must be verified workspace members).
1697
1707
  *
1698
1708
  */
1699
1709
  type EmailRejectionReason = "recipient_suppressed" | "transmission_failed" | "generation_failure" | "policy_rejection" | "domain_unverified" | "quota_exceeded" | "recipient_not_allowed";
@@ -1722,7 +1732,7 @@ type EventEmailRejected = {
1722
1732
  */
1723
1733
  type EventEmailReceivedData = {
1724
1734
  /**
1725
- * ID of the received email. Use it with GET /v1/email/inbound-messages/{id} to fetch the body, raw content, and attachments.
1735
+ * ID of the received email. Fetch its parsed metadata with `GET /v1/email/inbound-messages/{id}`, and its content from that message's `/body`, `/raw`, and `/attachments` sub-resources.
1726
1736
  */
1727
1737
  inbound_message_id: InboundEmailMessageId;
1728
1738
  /**
@@ -1767,12 +1777,12 @@ type EventEmailReceivedData = {
1767
1777
  */
1768
1778
  dmarc_pass?: boolean | null;
1769
1779
  /**
1770
- * Spam score for the message. Always null at present; reserved for a future content-scoring capability.
1780
+ * Spam score carried on the received message, or null when it carries no score.
1771
1781
  */
1772
1782
  spam_score?: number | null;
1773
1783
  };
1774
1784
  /**
1775
- * Bird received and parsed an inbound email. The payload carries the message's identifiers, sender and recipients, subject, threading reference, and authentication results enough to route and triage without a fetch. Fetch the body, full headers, and attachments with GET /v1/email/inbound-messages/{id}.
1785
+ * Bird received and parsed an inbound email. The payload carries the message's identifiers, sender and recipients, subject, threading reference, and authentication results, which is enough to route and triage without a fetch. Content is fetched separately: the parsed body with `GET /v1/email/inbound-messages/{id}/body`, the original MIME with `GET /v1/email/inbound-messages/{id}/raw`, and attachment bytes with `GET /v1/email/inbound-messages/{id}/attachments/{attachment_id}`.
1776
1786
  */
1777
1787
  type EventEmailReceived = {
1778
1788
  /**
@@ -1827,7 +1837,13 @@ type EventEmailOutOfBandBounceData = EventEmailBase & {
1827
1837
  sending_ip: string | null;
1828
1838
  };
1829
1839
  /**
1830
- * Bounce classification. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
1840
+ * Bounce classification.
1841
+ *
1842
+ * - `hard`: A permanent failure, such as an invalid address or a domain that does not exist.
1843
+ * - `soft`: A transient failure, such as a full mailbox or a server that is temporarily unavailable.
1844
+ * - `block`: The receiving mail server refused the sending IP on reputation grounds.
1845
+ * - `admin`: An administrative refusal, such as relaying denied or a blocklisted domain.
1846
+ * - `undetermined`: The receiving server's response was ambiguous.
1831
1847
  *
1832
1848
  */
1833
1849
  type EmailBounceType = "hard" | "soft" | "undetermined" | "admin" | "block";
@@ -2261,25 +2277,35 @@ type EmailMailboxLabel = {
2261
2277
  */
2262
2278
  readonly name: string;
2263
2279
  /**
2264
- * `system` labels are built in and carry state — the placements `inbox`, `archive`, `spam`, `blocked`, and `sent`, plus `trash` and `unread`. `custom` labels are the workspace's own tags.
2280
+ * `system` labels are the built-in placements a message can be in:
2281
+ *
2282
+ * - Inbox.
2283
+ * - Archive.
2284
+ * - Spam.
2285
+ * - Blocked.
2286
+ * - Sent.
2287
+ * - Trash.
2288
+ * - Unread.
2289
+ *
2290
+ * `custom` labels are the workspace's own tags.
2265
2291
  */
2266
2292
  readonly type: "system" | "custom";
2267
2293
  };
2268
2294
  /**
2269
- * A new message sent from a mailbox, starting a new conversation. Mirrors the plain send request minus `from` the mailbox is the sender identity and minus `scheduled_at` (mailbox sends are immediate). Bird mints the RFC 5322 Message-ID so replies thread back to this conversation. At least one of `html` or `text` must be provided.
2295
+ * A new message sent from a mailbox, starting a new conversation. Mirrors the plain send request without `from`, because the mailbox is who the message comes from, and without `scheduled_at`, because a mailbox sends immediately. We set the RFC 5322 Message-ID so replies thread back into this conversation. At least one of `html` or `text` must be provided.
2270
2296
  *
2271
2297
  */
2272
2298
  type EmailMailboxComposeRequest = {
2273
2299
  /**
2274
- * Primary recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
2300
+ * Primary recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name.
2275
2301
  */
2276
2302
  to: Array<EmailAddressInput>;
2277
2303
  /**
2278
- * CC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
2304
+ * CC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name.
2279
2305
  */
2280
2306
  cc?: Array<EmailAddressInput>;
2281
2307
  /**
2282
- * BCC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
2308
+ * BCC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name.
2283
2309
  */
2284
2310
  bcc?: Array<EmailAddressInput>;
2285
2311
  /**
@@ -2300,7 +2326,7 @@ type EmailMailboxComposeRequest = {
2300
2326
  */
2301
2327
  reply_to?: Array<EmailAddressInput>;
2302
2328
  /**
2303
- * File attachments. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Attachment metadata endures on the message's `attachment_manifest`; the bytes are downloadable for 30 days.
2329
+ * File attachments. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Keep total raw attachment content at or below 15 MB for reliable headroom. Attachment metadata stays on the message's `attachment_manifest`, and the bytes are downloadable for 30 days.
2304
2330
  *
2305
2331
  */
2306
2332
  attachments?: Array<EmailAttachment>;
@@ -2319,41 +2345,40 @@ type EmailMailboxComposeRequest = {
2319
2345
  category?: EmailMessageCategory;
2320
2346
  };
2321
2347
  /**
2322
- * Content classification. Controls suppression policy: `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions, for receipts, password resets, and similar operational mail.
2348
+ * Content classification, which controls suppression policy:
2349
+ *
2350
+ * - `marketing`: Blocks on all suppression reasons.
2351
+ * - `transactional`: Allows delivery through complaint and unsubscribe suppressions, for receipts, password resets, and similar operational mail.
2323
2352
  *
2324
2353
  */
2325
2354
  type EmailMessageCategory = "marketing" | "transactional";
2326
2355
  /**
2327
- * File attached to an email send. The attachment bytes are passed as base64-encoded `content` directly in the request body (required). The `path` field (provide a URL and Bird fetches the attachment for you) is a preview feature and currently unavailable. Requests are rejected with 422 if `content` is missing — `path` alone does not satisfy the schema. When `path` becomes generally available, the schema will be relaxed so that exactly one of `content` or `path` is required.
2328
- * Inline images for `<img src="cid:..."/>` references in the HTML body use the `content_id` field together with `content`.
2329
- * Bird enforces a **20 MB estimated generated message size** cap. The estimate is the HTML and text body plus all attachments and inline images measured after base64 encoding. This is not a raw file-size cap. As a rule of thumb, keep total raw attachment content at or below **15 MB** so the generated message has enough room after encoding and MIME wrapping.
2330
- * Recipient-side delivery reality: downstream limits vary by product and tenant/server policy. Gmail personal and Outlook.com document 25 MB attachment limits. Exchange Online defaults to 35 MB send / 36 MB receive, but admins can configure limits; on-prem Exchange Server organizational defaults are 10 MB. Sends close to Bird's 20 MB generated-message cap may be accepted by Bird but bounce at the recipient's mail server.
2331
- * Batch sends can include attachments on individual message objects. Each message still has the 20 MB estimated generated-size cap, and the serialized JSON request body for the whole batch has a hard 20 MB cap. Certain executable / script content types are rejected at validation time.
2356
+ * A file attached to an email. Put the file's bytes in `content`, base64-encoded, and give it the `filename` the recipient will see.
2357
+ *
2358
+ * To show an image inline, so that `<img src="cid:..."/>` in your HTML body picks it up, set `content_id` alongside `content`.
2359
+ *
2360
+ * Each message can be at most **20 MB** once it has been generated. That figure covers the HTML body, the text body, and every attachment and inline image, all measured after base64 encoding rather than as raw files. Base64 and MIME wrapping add roughly a third, so keep the raw content of your attachments at or below **15 MB** to stay under the cap.
2361
+ *
2362
+ * A message we accept can still bounce at the other end, because every mail provider sets its own limit. Gmail and Outlook.com both publish a 25 MB limit. Exchange Online defaults to 35 MB for sending and 36 MB for receiving, though an administrator can change both, and on-premise Exchange Server defaults to 10 MB. So a message close to 20 MB is worth testing against the providers your recipients actually use.
2363
+ *
2364
+ * A batch send can attach files to each message in the batch. Every message is still held to the same 20 MB, and the whole request body is capped at 20 MB as well. Executable and script content types are refused when the request is validated.
2332
2365
  *
2333
2366
  */
2334
2367
  type EmailAttachment = {
2335
2368
  /**
2336
- * Filename shown to the recipient. Required.
2369
+ * The name the recipient sees on the attachment.
2337
2370
  */
2338
2371
  filename: string;
2339
2372
  /**
2340
- * Base64-encoded attachment bytes. Required. Counts toward the 20 MB estimated generated message-size cap after encoding and MIME wrapping.
2341
- *
2373
+ * The file's bytes, base64-encoded. What you send here counts toward the message's 20 MB limit after encoding and MIME wrapping, not at its raw size.
2342
2374
  */
2343
2375
  content: string;
2344
2376
  /**
2345
- * Preview feature provide a URL and Bird fetches the attachment for you. Currently unavailable. Use `content` instead. The schema currently requires `content`, so a request with only `path` is rejected with 422 for missing `content`; a request supplying both `content` and `path` is rejected with 422 `UnsupportedEmailFeature` until this preview ships. When generally available: HTTPS-only, single redirect followed and re-validated, private IP ranges blocked, request timeout enforced, fetched content counts toward the 20 MB estimated generated message-size cap after encoding and MIME wrapping.
2346
- *
2347
- */
2348
- path?: string;
2349
- /**
2350
- * MIME type. Inferred from `filename` extension when omitted. Used to enforce the blocklist of disallowed executable / script types.
2351
- *
2377
+ * The file's MIME type. Leave it out and we work it out from the extension on `filename`. This is what we check against the list of executable and script types we refuse.
2352
2378
  */
2353
2379
  content_type?: string;
2354
2380
  /**
2355
- * RFC 2392 Content-ID. When set, the attachment is rendered inline and can be referenced from the HTML body as `<img src="cid:{content_id}"/>`. When omitted, the attachment is rendered as a regular file attachment.
2356
- *
2381
+ * An RFC 2392 Content-ID for the file. Set it and the attachment is shown inline, so your HTML body can point at it with `<img src="cid:{content_id}"/>`. Leave it out and the file arrives as an ordinary attachment the recipient downloads.
2357
2382
  */
2358
2383
  content_id?: string;
2359
2384
  };
@@ -2371,7 +2396,7 @@ type EmailAddress = {
2371
2396
  name?: string;
2372
2397
  };
2373
2398
  /**
2374
- * A sender or recipient address. Accepts a plain email string (`jane@example.com`), an RFC 5322 mailbox string with an embedded display name (`Jane Doe <jane@example.com>`), or an object carrying the address and an optional display name. All forms can be mixed freely within one request; responses always return the object form.
2399
+ * A sender or recipient address. Accepts a plain email string (`jane@acme.com`), an RFC 5322 mailbox string with an embedded display name (`Jane Doe <jane@acme.com>`), or an object carrying the address and an optional display name. All forms can be mixed freely within one request. Responses always return the object form.
2375
2400
  *
2376
2401
  */
2377
2402
  type EmailAddressInput = string | EmailAddress;
@@ -2406,7 +2431,7 @@ type EmailThreadMessageReplyRequest = {
2406
2431
  };
2407
2432
  category?: EmailMessageCategory;
2408
2433
  /**
2409
- * File attachments to include with the reply. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Keep total raw attachment content at or below 15 MB for reliable headroom. Attachment metadata endures on the message's `attachment_manifest`; the bytes are downloadable for 30 days.
2434
+ * File attachments to include with the reply. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Keep total raw attachment content at or below 15 MB for reliable headroom. Attachment metadata stays on the message's `attachment_manifest`, and the bytes are downloadable for 30 days.
2410
2435
  *
2411
2436
  */
2412
2437
  attachments?: Array<EmailAttachment>;
@@ -2418,7 +2443,7 @@ type EmailThreadMessageAttachmentList = {
2418
2443
  data: Array<EmailThreadMessageAttachment>;
2419
2444
  };
2420
2445
  /**
2421
- * Attachment metadata on a conversation message. The metadata remains readable for the mailbox's retention period; the attachment bytes are downloadable for 30 days after the message occurred.
2446
+ * Attachment metadata on a conversation message. The metadata stays readable for the mailbox's retention tier. The attachment bytes are downloadable for 30 days after the message occurred.
2422
2447
  *
2423
2448
  */
2424
2449
  type EmailThreadMessageAttachment = {
@@ -2440,7 +2465,7 @@ type EmailThreadMessageAttachment = {
2440
2465
  readonly size: number;
2441
2466
  };
2442
2467
  /**
2443
- * The original rendered body of a conversation message. Available for 30 days after the message occurred; after that the endpoint returns `410 Gone` while the message's extracted text remains readable on the message itself.
2468
+ * The original rendered body of a conversation message. Available for 30 days after the message occurred. After that, the endpoint returns `410 Gone`, but the message's extracted text stays readable on the message itself.
2444
2469
  *
2445
2470
  */
2446
2471
  type EmailThreadMessageBody = {
@@ -2455,7 +2480,7 @@ type EmailThreadMessageBody = {
2455
2480
  };
2456
2481
  type ContactId = string;
2457
2482
  /**
2458
- * Label changes to apply. Labels in `add` are applied and labels in `remove` are taken off; other labels are left untouched. Adding a label that is already present, or removing one that is not, has no effect. System labels express state changes: on a conversation, adding `spam` files it as spam, adding `archive` files it away without deleting it, adding `inbox` (or removing `spam` or `archive`) returns it to the inbox, and removing `unread` marks all retained received messages as read in one call; on a message, adding or removing `unread` flips read state, and adding or removing `trash` moves it to or out of the trash. Changes that contradict this model are rejected: adding more than one placement label in one request, adding `blocked` (blocking a sender is a receive-rule decision), removing `inbox` without adding a destination, adding `trash` or `unread` to a conversation (removing `unread` is the mark-all-read shortcut; `trash` uses the DELETE verb), placement labels on a message (move its conversation instead), and `unread` on a sent message. Custom labels are 1-64 characters with no commas, control characters, or leading or trailing whitespace. System label names and a small reserved set (`all`, `archived`, `deleted`, `draft`, `drafts`, `flagged`, `important`, `junk`, `muted`, `none`, `outbox`, `pinned`, `read`, `scheduled`, `snoozed`, `starred`) cannot be used as custom labels, in any casing. A conversation or message carries at most 20 labels, system labels included.
2483
+ * Label changes to apply. Labels in `add` are applied and labels in `remove` are taken off; other labels are left untouched. Adding a label that is already present, or removing one that is not, has no effect. System labels express state changes: on a conversation, adding `spam` files it as spam, adding `archive` files it away without deleting it, adding `inbox` (or removing `spam`, `blocked`, or `archive`) returns it to the inbox, and removing `unread` marks all retained received messages as read in one call; on a message, adding or removing `unread` flips read state, and adding or removing `trash` moves it to or out of the trash. Changes that contradict this model are rejected: adding more than one placement label in one request, adding `blocked` (blocking a sender is a receive-rule decision), removing `inbox` without adding a destination, adding `trash` or `unread` to a conversation (removing `unread` is the mark-all-read shortcut; `trash` uses the DELETE verb), placement labels on a message (move its conversation instead), and `unread` on a sent message. Custom labels are 1-64 characters with no commas, control characters, or leading or trailing whitespace. System label names and a small reserved set (`all`, `archived`, `deleted`, `draft`, `drafts`, `flagged`, `important`, `junk`, `muted`, `none`, `outbox`, `pinned`, `read`, `scheduled`, `snoozed`, `starred`) cannot be used as custom labels, in any casing. A conversation or message has at most 20 labels, system labels included.
2459
2484
  *
2460
2485
  */
2461
2486
  type EmailLabelsUpdate = {
@@ -2469,7 +2494,7 @@ type EmailLabelsUpdate = {
2469
2494
  remove?: Array<string>;
2470
2495
  };
2471
2496
  /**
2472
- * Link to the message's entry in the received-message or sent-message log, which carries delivery analytics such as per-recipient events. Log entries expire 30 days after the message occurred.
2497
+ * Link to the message's entry in the received-message or sent-message log, which has delivery analytics such as per-recipient events. Log entries expire 30 days after the message occurred.
2473
2498
  *
2474
2499
  */
2475
2500
  type EmailThreadMessageSource = {
@@ -2483,7 +2508,7 @@ type EmailThreadMessageSource = {
2483
2508
  readonly available_until: string;
2484
2509
  };
2485
2510
  /**
2486
- * One recipient's terminal delivery outcome on a sent conversation message, folded into the message's durable memory when the outcome becomes known.
2511
+ * One recipient's terminal delivery outcome on a sent conversation message, recorded once the outcome becomes known.
2487
2512
  *
2488
2513
  */
2489
2514
  type EmailThreadMessageRecipient = {
@@ -2497,21 +2522,21 @@ type EmailThreadMessageRecipient = {
2497
2522
  readonly status: "delivered" | "failed";
2498
2523
  };
2499
2524
  /**
2500
- * A message in a mailbox conversation, either direction. Message metadata and extracted text remain readable for the mailbox's retention period; the original rendered source (HTML body, raw MIME, attachment bytes) is available through the body, raw, and attachment endpoints for 30 days after the message occurred.
2525
+ * A message in a mailbox conversation, either direction. Message metadata and extracted text stay readable for the mailbox's retention tier. The original rendered source (HTML body, raw MIME, attachment bytes) is available through the body, raw, and attachment endpoints for 30 days after the message occurred.
2501
2526
  *
2502
2527
  */
2503
2528
  type EmailThreadMessage = {
2504
2529
  /**
2505
- * Message ID. Received messages carry a `rem_` ID, sent messages an `em_` ID the same IDs used by the received-message and sent-message logs.
2530
+ * Message ID. Received messages have a `rem_` ID, sent messages an `em_` ID: the same IDs used by the received-message and sent-message logs.
2506
2531
  *
2507
2532
  */
2508
2533
  readonly id: string;
2509
2534
  /**
2510
- * Direction of the message `inbound` for a received message, `outbound` for a sent one.
2535
+ * Which way the message went. `inbound` means you received it, `outbound` means you sent it.
2511
2536
  */
2512
2537
  readonly direction: "inbound" | "outbound";
2513
2538
  /**
2514
- * Channel this message was carried on. Always `email`.
2539
+ * Channel this message lives on. Always `email`.
2515
2540
  */
2516
2541
  readonly channel: string;
2517
2542
  /**
@@ -2544,47 +2569,61 @@ type EmailThreadMessage = {
2544
2569
  */
2545
2570
  readonly preview: string | null;
2546
2571
  /**
2547
- * Plain-text content of the message with quoted history stripped readable for the mailbox's full retention period, both directions. Always present when fetching a single message; on list endpoints it is included only when the request sets `include=extracted_text`. Null when no text could be extracted.
2572
+ * Plain-text content of the message with quoted history stripped. Readable for the mailbox's full retention tier, in both directions. Always present when fetching a single message. On list endpoints it is included only when the request sets `include=extracted_text`. Null when no text could be extracted.
2548
2573
  *
2549
2574
  */
2550
2575
  readonly extracted_text?: string | null;
2551
2576
  /**
2552
- * Labels on this message. System labels carry its state: a received message holds exactly one placement label — `inbox` for accepted mail, `archive` when its conversation was filed away, `spam` (failed sender authentication), or `blocked` (rejected by the mailbox's receive policy or rules) — plus `unread` until it is read. `trash` marks a message in the trash, either direction. Custom labels share the same list; a message carries at most 20.
2577
+ * Labels on this message. A received message always has exactly one placement label:
2578
+ *
2579
+ * - `inbox`: Accepted mail.
2580
+ * - `archive`: The message's conversation was filed away.
2581
+ * - `spam`: The message failed sender authentication.
2582
+ * - `blocked`: The message was rejected by the mailbox's receive policy or rules.
2583
+ *
2584
+ * A received message also has `unread` until it is read. `trash` marks a message in the trash, in either direction. Custom labels share the same list, and a message has at most 20 labels in total.
2553
2585
  *
2554
2586
  */
2555
2587
  labels: Array<string>;
2556
2588
  /**
2557
- * Folded delivery status of a sent message: `accepted`, `sent` (provider handoff), `delivered` (all attempted recipients delivered), or `failed` (terminal failure). Null for received messages.
2589
+ * Folded delivery status of a sent message:
2590
+ *
2591
+ * - `accepted`: Accepted for sending.
2592
+ * - `sent`: Handed off to the provider.
2593
+ * - `delivered`: All attempted recipients delivered.
2594
+ * - `failed`: Terminal failure.
2595
+ *
2596
+ * Null for received messages.
2558
2597
  *
2559
2598
  */
2560
2599
  readonly status: string | null;
2561
2600
  /**
2562
- * Terminal per-recipient delivery outcomes of a sent message, folded in as they become known part of the message's durable memory. Null for received messages and before any recipient reaches a terminal state. Per-recipient event detail lives on the sent-message log (`source`) for 30 days.
2601
+ * Terminal per-recipient delivery outcomes of a sent message, filled in as each one becomes known and kept for the mailbox's full retention tier. Null for received messages and before any recipient reaches a terminal state. Per-recipient event detail lives on the sent-message log (`source`) for 30 days.
2563
2602
  *
2564
2603
  */
2565
2604
  readonly recipients: Array<EmailThreadMessageRecipient> | null;
2566
2605
  /**
2567
- * Whether the sender of a received message was authenticated. `pass` means the sender's identity was verified; `fail` means it was checked and did not verify; `unknown` means no verdict could be determined and the sender should not be treated as verified. Null for sent messages. Part of the message's durable memory — readable for the mailbox's full retention period, so the verdict survives after the 30-day inbound log has expired.
2606
+ * Whether the sender of a received message was authenticated. `pass` means the sender's identity was verified. `fail` means it was checked and did not verify. `unknown` means no verdict could be determined, and the sender should not be treated as verified. Null for sent messages. This field is readable for the mailbox's full retention tier, so the verdict is still available after the 30-day received-message log has expired.
2568
2607
  *
2569
2608
  */
2570
2609
  readonly authentication: "pass" | "fail" | "unknown" | null;
2571
2610
  /**
2572
- * Whether SPF passed for the sender of a received message. Null for sent messages and when no verdict is available. Durable for the mailbox's retention period.
2611
+ * Whether SPF passed for the sender of a received message. Null for sent messages and when no verdict is available. This field is kept for the mailbox's retention tier.
2573
2612
  *
2574
2613
  */
2575
2614
  readonly spf_pass: boolean | null;
2576
2615
  /**
2577
- * Whether DKIM passed for the sender of a received message. Null for sent messages and when no verdict is available. Durable for the mailbox's retention period.
2616
+ * Whether DKIM passed for the sender of a received message. Null for sent messages and when no verdict is available. This field is kept for the mailbox's retention tier.
2578
2617
  *
2579
2618
  */
2580
2619
  readonly dkim_pass: boolean | null;
2581
2620
  /**
2582
- * Whether DMARC passed for the sender of a received message. Null for sent messages and when no verdict is available. Durable for the mailbox's retention period.
2621
+ * Whether DMARC passed for the sender of a received message. Null for sent messages and when no verdict is available. This field is kept for the mailbox's retention tier.
2583
2622
  *
2584
2623
  */
2585
2624
  readonly dmarc_pass: boolean | null;
2586
2625
  /**
2587
- * When the message will be permanently deleted: the end of the mailbox's retention period, pulled nearer (at most 30 days out) while the message is in the trash. Restore a trashed message before then with `PATCH {"labels": {"remove": ["trash"]}}`.
2626
+ * When the message will be permanently deleted: the end of the mailbox's retention tier, pulled nearer (at most 30 days out) while the message is in the trash. Restore a trashed message before then with `PATCH {"labels": {"remove": ["trash"]}}`.
2588
2627
  *
2589
2628
  */
2590
2629
  readonly purge_at: string;
@@ -2593,7 +2632,7 @@ type EmailThreadMessage = {
2593
2632
  */
2594
2633
  readonly attachment_count: number;
2595
2634
  /**
2596
- * Attachment metadata (filename, content type, size). Remains readable for the mailbox's retention period even after the attachment bytes themselves have expired.
2635
+ * Attachment metadata (filename, content type, size). Stays readable for the mailbox's retention tier even after the attachment bytes themselves have expired.
2597
2636
  *
2598
2637
  */
2599
2638
  readonly attachment_manifest: Array<EmailThreadMessageAttachment>;
@@ -2636,7 +2675,7 @@ type EmailThreadHighlights = {
2636
2675
  text?: Array<string>;
2637
2676
  };
2638
2677
  /**
2639
- * A conversation in a mailbox. Threads group related messages both directions mail the mailbox received and replies it sent and carry the conversation-level read state, labels, and participant list. Message counts reflect the messages currently retained under the mailbox's retention period.
2678
+ * A conversation in a mailbox. It groups every message in both directions, the mail the mailbox received and the replies it sent, and it holds the conversation's read state, labels, and participant list. A message is retained until it is trashed or ages past the mailbox's retention tier. Only retained messages count toward the totals below.
2640
2679
  *
2641
2680
  */
2642
2681
  type EmailThread = {
@@ -2677,11 +2716,18 @@ type EmailThread = {
2677
2716
  */
2678
2717
  readonly last_message_at: string;
2679
2718
  /**
2680
- * Direction of the most recent message `inbound` for a received message, `outbound` for a sent one.
2719
+ * Direction of the most recent message: `inbound` for a received message, `outbound` for a sent one.
2681
2720
  */
2682
2721
  readonly last_direction: "inbound" | "outbound";
2683
2722
  /**
2684
- * Labels on this conversation. Exactly one system placement label is always present — `inbox`, `archive` (filed away, done for now), `spam` (the opening message failed sender authentication), or `blocked` (rejected by the mailbox's receive policy or rules) — set by the message that started the conversation. Move a conversation by updating its labels: add `spam` to file it as spam, add `archive` to clean it out of the inbox, and add `inbox` — or remove `spam`, `blocked`, or `archive` — to bring it back. An archived conversation returns to the inbox by itself when a new message arrives. Custom labels share the same list; a conversation carries at most 20.
2723
+ * Labels on this conversation. Exactly one system placement label is always present, set by the message that started the conversation:
2724
+ *
2725
+ * - `inbox`: The conversation is in the inbox.
2726
+ * - `archive`: The conversation was filed away and is done for now.
2727
+ * - `spam`: The conversation's opening message failed sender authentication.
2728
+ * - `blocked`: The conversation's opening message was rejected by the mailbox's receive policy or rules.
2729
+ *
2730
+ * Move a conversation by updating its labels. Add `spam` to file it as spam, add `archive` to clean it out of the inbox, and add `inbox`, or remove `spam`, `blocked`, or `archive`, to bring it back. An archived conversation returns to the inbox by itself when a new message arrives. Custom labels share the same list, and a conversation has at most 20 labels in total.
2685
2731
  *
2686
2732
  */
2687
2733
  labels: Array<string>;
@@ -2694,7 +2740,7 @@ type EmailThread = {
2694
2740
  */
2695
2741
  readonly updated_at: string;
2696
2742
  /**
2697
- * Matched search fragments, keyed by the field that matched. Returned only by thread search; omitted when listing threads.
2743
+ * Matched search fragments, keyed by the field that matched. Returned only by thread search. Omitted when listing threads.
2698
2744
  *
2699
2745
  */
2700
2746
  readonly highlights?: EmailThreadHighlights;
@@ -2752,7 +2798,7 @@ type ReceiveRule = {
2752
2798
  readonly created_at: string;
2753
2799
  };
2754
2800
  /**
2755
- * A mailbox's sent and received email statistics: a period-wide summary plus a bucketed time series. `period` echoes the range and grain the server computed against; `data` is one row per bucket in chronological order.
2801
+ * A mailbox's sent and received email statistics: a period-wide summary plus a bucketed time series. `period` echoes the range and grain actually used. `data` is one row per bucket in chronological order.
2756
2802
  *
2757
2803
  */
2758
2804
  type MailboxStatsResponse = {
@@ -2764,7 +2810,7 @@ type MailboxStatsResponse = {
2764
2810
  readonly data: Array<MailboxStatsPoint>;
2765
2811
  };
2766
2812
  /**
2767
- * Per-mailbox email activity for one time bucket, bucketed by event time. Sent-mail metrics carry the same delivery, engagement, and latency breakdowns as the email stats endpoints; `received` counts mail that arrived at the mailbox. Buckets with no activity are included with zero counts and null latency percentiles.
2813
+ * Per-mailbox email activity for one time bucket, bucketed by event time. Sent-mail metrics use the same delivery, engagement, and latency breakdowns as the email stats endpoints. `received` counts mail that arrived at the mailbox. Buckets with no activity are included with zero counts and null latency percentiles.
2768
2814
  *
2769
2815
  */
2770
2816
  type MailboxStatsPoint = {
@@ -2806,9 +2852,9 @@ type EmailLatencyQuantiles = {
2806
2852
  /**
2807
2853
  * Latency percentiles (p50, p95, p99) in milliseconds for the bucket. On the summary endpoint these are computed across the whole period rather than per bucket. Three families are reported:
2808
2854
  *
2809
- * - `processing`: time from accepting the send to handing the message off for delivery, covering internal queue depth and handoff. Measured per processed recipient; null when no recipient in the bucket has reached the processed stage.
2810
- * - `delivery`: time from handoff to the receiving mail server accepting the message, dominated by recipient-side delivery behaviour. Measured per delivered recipient; null when no deliveries occurred in the bucket.
2811
- * - `total`: end-to-end time from accepting the send to delivery, the most useful tile for a customer SLO. Measured per delivered recipient; null when no deliveries occurred in the bucket.
2855
+ * - `processing`: Time from accepting the send to handing the message off for delivery. Measured per processed recipient; null when no recipient in the bucket has reached the processed stage.
2856
+ * - `delivery`: Time from handoff to the receiving mail server accepting the message, dominated by recipient-side delivery behavior. Measured per delivered recipient; null when no deliveries occurred in the bucket.
2857
+ * - `total`: End-to-end time from accepting the send to delivery, and the number most worth watching against your own delivery targets. Measured per delivered recipient; null when no deliveries occurred in the bucket.
2812
2858
  *
2813
2859
  * Each family is reported independently and is omitted entirely when no qualifying event contributed a latency measurement in the bucket (including when latency for that stage has not yet been recorded for the workspace), so `processing` can be present while `delivery` and `total` are absent. A client must handle a missing family, and a null p50/p95/p99 within a present family, by rendering a placeholder rather than assuming a number.
2814
2860
  *
@@ -2819,7 +2865,7 @@ type EmailLatencyStats = {
2819
2865
  total?: EmailLatencyQuantiles;
2820
2866
  };
2821
2867
  /**
2822
- * Engagement counts and rates for the scope of the containing row (a time bucket, a breakdown dimension, or the whole period). `opens`, `opens_non_prefetched` and `clicks` count distinct engagement events (deduplicated occurrences); the `unique_*` fields count distinct recipients; `unsubscribes` counts distinct unsubscribe events. Counts are attributed by event time (not send time), so an open recorded today for a message sent earlier counts in today's row. Counts are deduplicated with a scalable approximate counting method, so very large counts are close estimates rather than exact tallies. Each rate divides the counts in this scope and is null when its denominator is zero.
2868
+ * Engagement counts and rates for the scope of the containing row (a time bucket, a breakdown dimension, or the whole period). `opens`, `opens_non_prefetched` and `clicks` count distinct engagement events (deduplicated occurrences). The `unique_*` fields count distinct recipients. `unsubscribes` counts distinct unsubscribe events. Counts are attributed by event time (not send time), so an open recorded today for a message sent earlier counts in today's row. Counts are deduplicated with a scalable approximate counting method, so very large counts are close estimates rather than exact tallies. Each rate divides the counts in this scope and is null when its denominator is zero.
2823
2869
  *
2824
2870
  */
2825
2871
  type EmailEngagementStats = {
@@ -2884,7 +2930,7 @@ type EmailBounceStatsWithRates = {
2884
2930
  */
2885
2931
  readonly soft: number;
2886
2932
  /**
2887
- * Distinct recipients bounced by an upstream policy block (relaying denied, blocklisted domain).
2933
+ * Distinct recipients refused by a policy at the receiving end, such as relaying denied or a blocklisted domain.
2888
2934
  */
2889
2935
  readonly admin: number;
2890
2936
  /**
@@ -2922,12 +2968,21 @@ type EmailBounceStatsWithRates = {
2922
2968
  readonly undetermined_rate: number | null;
2923
2969
  };
2924
2970
  /**
2925
- * Delivery pipeline counts and rates for the scope of the containing row (a time bucket, a breakdown dimension, or the whole period). Every count is the number of distinct recipients that reached the named lifecycle stage in scope (on the period summary, the sum of the per-bucket distinct counts), attributed by event time (not send time): a recipient delivered on Monday counts in Monday's row, and a recipient who bounced then succeeded on a retry can appear in both `bounced` and `delivered`. Counts are deduplicated with a scalable approximate counting method, so very large counts are close estimates rather than exact tallies. These counts are successive lifecycle stages, not interchangeable categories: `rejected` happens before any send attempt (suppression, policy, generation failure); `deferred` is a temporary in-flight delay still being retried; `bounced` (with its hard/soft/admin/block/undetermined sub-types) is a delivery failure; and `complained` is post-delivery spam feedback. Each rate is a fraction in the range 0 to 1 and is null when its denominator is zero. `accepted` is reported only where it can be attributed (time buckets and the period summary); breakdown rows omit it.
2971
+ * Delivery counts and rates for the scope of the containing row (a time bucket, a breakdown dimension, or the whole period). Every count is the number of distinct recipients that reached the named lifecycle stage in scope (on the period summary, the sum of the per-bucket distinct counts), attributed by event time (not send time): a recipient delivered on Monday counts in Monday's row, and a recipient who bounced then succeeded on a retry can appear in both `bounced` and `delivered`. Very large counts are close estimates rather than exact tallies.
2972
+ *
2973
+ * These counts are successive lifecycle stages, so a recipient can appear in more than one:
2974
+ *
2975
+ * - `rejected`: Happens before any send attempt, from suppression, policy, or a generation failure.
2976
+ * - `deferred`: A temporary in-flight delay that is still being retried.
2977
+ * - `bounced`: A delivery failure, with its own hard, soft, admin, block, and undetermined sub-types.
2978
+ * - `complained`: Post-delivery spam feedback.
2979
+ *
2980
+ * Each rate is a fraction in the range 0 to 1 and is null when its denominator is zero. `accepted` is reported only where it can be attributed (time buckets and the period summary). Breakdown rows omit it.
2926
2981
  *
2927
2982
  */
2928
2983
  type EmailDeliveryStats = {
2929
2984
  /**
2930
- * Distinct recipients accepted for delivery after suppression filtering. Reported on time buckets and the period summary; omitted on breakdown rows, whose rollups do not carry it.
2985
+ * Distinct recipients accepted for delivery after suppression filtering. Reported on time buckets and the period summary. Breakdown rows leave it out, because their rollups do not have it.
2931
2986
  */
2932
2987
  readonly accepted?: number;
2933
2988
  /**
@@ -2939,7 +2994,7 @@ type EmailDeliveryStats = {
2939
2994
  */
2940
2995
  readonly delivered: number;
2941
2996
  /**
2942
- * Distinct recipients whose delivery failed. Approximately the sum of the five `bounces.*` sub-counts (hard, soft, admin, block, undetermined); the totals are computed independently so they may differ slightly at the approximation error.
2997
+ * Distinct recipients whose delivery failed. This is approximately the sum of the five `bounces.*` sub-counts (hard, soft, admin, block, undetermined). The two totals are worked out independently, so they can differ slightly.
2943
2998
  *
2944
2999
  */
2945
3000
  readonly bounced: number;
@@ -2981,7 +3036,7 @@ type EmailDeliveryStats = {
2981
3036
  */
2982
3037
  readonly delivery_rate: number | null;
2983
3038
  /**
2984
- * Share of this scope's delivery attempts that ultimately failed (inband or out-of-band), computed as `all_bounces / (delivered + bounced)`. Because `oob_bounces` counts events rather than recipients, `all_bounces` can exceed the attempt count; the rate is clamped to 1. Null when there were no attempts.
3039
+ * Share of this scope's delivery attempts that ultimately failed (inband or out-of-band), computed as `all_bounces / (delivered + bounced)`. Because `oob_bounces` counts events rather than recipients, `all_bounces` can exceed the attempt count. The rate is clamped to 1. Null when there were no attempts.
2985
3040
  *
2986
3041
  */
2987
3042
  readonly bounce_rate: number | null;
@@ -2992,7 +3047,7 @@ type EmailDeliveryStats = {
2992
3047
  readonly complaint_rate: number | null;
2993
3048
  };
2994
3049
  /**
2995
- * Single-row aggregate of the mailbox's email activity across the full requested period. Counts are sums of per-bucket counts across the window; latency percentiles are computed across the whole period rather than summed per bucket. Rates are null when their denominator is zero.
3050
+ * Single-row aggregate of the mailbox's email activity across the full requested period. Counts are sums of per-bucket counts across the window. Latency percentiles are computed across the whole period rather than summed per bucket. Rates are null when their denominator is zero.
2996
3051
  *
2997
3052
  */
2998
3053
  type MailboxStatsSummary = {
@@ -3018,22 +3073,22 @@ type StatsGrain = "day" | "hour";
3018
3073
  */
3019
3074
  type EmailStatsSeriesPeriod = {
3020
3075
  /**
3021
- * Inclusive start of the window. A calendar day (YYYY-MM-DD, in the requested `timezone`) on the day grain; on the hour grain, an RFC 3339 UTC instant marking the start of the first hour bucket, which falls on a local hour boundary when `timezone` is set.
3076
+ * Inclusive start of the window. A calendar day (YYYY-MM-DD, in the requested `timezone`) on the day grain. On the hour grain, an RFC 3339 UTC instant marking the start of the first hour bucket, which falls on a local hour boundary when `timezone` is set.
3022
3077
  */
3023
3078
  readonly from: string;
3024
3079
  /**
3025
- * Inclusive end of the window. A calendar day (YYYY-MM-DD, in the requested `timezone`) on the day grain; on the hour grain, an RFC 3339 UTC instant marking the start of the last hour bucket, which falls on a local hour boundary when `timezone` is set.
3080
+ * Inclusive end of the window. A calendar day (YYYY-MM-DD, in the requested `timezone`) on the day grain. On the hour grain, an RFC 3339 UTC instant marking the start of the last hour bucket, which falls on a local hour boundary when `timezone` is set.
3026
3081
  */
3027
3082
  readonly to: string;
3028
3083
  readonly grain: StatsGrain;
3029
3084
  /**
3030
- * The instant the statistics in this response are current to: events recorded up to roughly this time are reflected, while more recent events may not be yet. Statistics are served from a rolling aggregation that refreshes every few seconds, so a response is near-real-time but not live; use this field to label data freshness rather than assuming the numbers are to-the-second. Null when the freshness boundary is not being reported.
3085
+ * The instant the statistics in this response are current to: events recorded up to roughly this time are reflected, while more recent events may not be yet. Statistics are served from a rolling aggregation that refreshes every few seconds, so a response reflects data from up to a few seconds ago. Use this field to label data freshness rather than assuming the numbers are to-the-second. Null when the freshness boundary is not being reported.
3031
3086
  *
3032
3087
  */
3033
3088
  readonly data_as_of?: string | null;
3034
3089
  };
3035
3090
  /**
3036
- * Fields to update on a mailbox. Omitted fields are unchanged; fields set to null are cleared. The address and domain are immutable.
3091
+ * Fields to update on a mailbox. Omitted fields are unchanged. Fields set to null are cleared. The address and domain are immutable.
3037
3092
  */
3038
3093
  type MailboxUpdate = {
3039
3094
  /**
@@ -3049,11 +3104,11 @@ type MailboxUpdate = {
3049
3104
  */
3050
3105
  receive_policy?: "open" | "replies_only" | "allowlist" | "drop";
3051
3106
  /**
3052
- * How long the mailbox remembers message metadata and extracted text. Lowering the tier deletes memory older than the new horizon and requires `confirm=true` when messages older than the new horizon would be deleted. Only `30d` is available today; additional tiers are planned.
3107
+ * 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.
3053
3108
  */
3054
3109
  retention_tier?: "30d";
3055
3110
  /**
3056
- * Replaces the mailbox's key/value data. Up to 2 KB; keys starting with `__bird` are reserved.
3111
+ * Replaces the mailbox's key/value data. Up to 2 KB. Keys starting with `__bird` are reserved.
3057
3112
  */
3058
3113
  metadata?: {
3059
3114
  [key: string]: unknown;
@@ -3064,11 +3119,11 @@ type MailboxUpdate = {
3064
3119
  */
3065
3120
  type MailboxCreate = {
3066
3121
  /**
3067
- * The local part of the mailbox address (the part before `@`). Letters, digits, dots, underscores, and hyphens; stored lowercase. On the shared `inbox.ai` domain, separators must sit between letters or digits (no leading, trailing, or repeated separators), reserved names such as `postmaster` or `abuse` are unavailable, and choosing your own local part uses one of your plan's custom-handle allowance slots (generated addresses are always available). Omit to have Bird generate a random local part.
3122
+ * The local part of the mailbox address (the part before `@`). Letters, digits, dots, underscores, and hyphens. Stored lowercase. On the shared `inbox.ai` domain, separators must sit between letters or digits (no leading, trailing, or repeated separators), reserved names such as `postmaster` or `abuse` are unavailable, and choosing your own local part uses one of your plan's custom-handle allowance slots (generated addresses are always available). Omit it and we generate a random local part.
3068
3123
  */
3069
3124
  local_part?: string;
3070
3125
  /**
3071
- * The domain the address lives under. Defaults to `inbox.ai`, Bird's shared mailbox domain, where creating the mailbox claims the address for your organization: first come, first served, and permanently reserved to your organization even after the mailbox is deleted. May instead name one of your own domains that is enabled for receiving email.
3126
+ * The domain the address lives under. Defaults to `inbox.ai`, our shared mailbox domain, where creating the mailbox claims the address for your organization: first come, first served, and permanently reserved to your organization even after the mailbox is deleted. May instead name one of your own domains that is enabled for receiving email.
3072
3127
  */
3073
3128
  domain?: string;
3074
3129
  /**
@@ -3080,15 +3135,23 @@ type MailboxCreate = {
3080
3135
  */
3081
3136
  default_reply_to?: string;
3082
3137
  /**
3083
- * 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, not merely land in an existing thread); `allowlist` accepts only senders matching an allow rule; `drop` stores nothing.
3138
+ * Which inbound mail the mailbox accepts:
3139
+ *
3140
+ * - `open`: Accepts everything not blocked by a rule.
3141
+ * - `replies_only`: Accepts only replies to messages this mailbox has
3142
+ * sent. A reply must match a message the mailbox sent. Landing in an
3143
+ * existing thread by itself does not count.
3144
+ * - `allowlist`: Accepts only senders matching an allow rule.
3145
+ * - `drop`: Stores nothing.
3146
+ *
3084
3147
  */
3085
3148
  receive_policy?: "open" | "replies_only" | "allowlist" | "drop";
3086
3149
  /**
3087
- * How long the mailbox remembers message metadata and extracted text. Original rendered source is always available for 30 days regardless of tier. Only `30d` is available today; additional tiers are planned.
3150
+ * How long the mailbox remembers message metadata and extracted text. Original rendered source is always available for 30 days regardless of tier.
3088
3151
  */
3089
3152
  retention_tier?: "30d";
3090
3153
  /**
3091
- * Your own key/value data to attach to the mailbox. Up to 2 KB; keys starting with `__bird` are reserved.
3154
+ * Your own key/value data to attach to the mailbox. Up to 2 KB. Keys starting with `__bird` are reserved.
3092
3155
  */
3093
3156
  metadata?: {
3094
3157
  [key: string]: unknown;
@@ -3130,11 +3193,20 @@ type Mailbox = {
3130
3193
  */
3131
3194
  default_reply_to: string | null;
3132
3195
  /**
3133
- * 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, not merely land in an existing thread); `allowlist` accepts only senders matching an allow rule (replies to prior outbound are always admitted unless blocked); `drop` stores nothing.
3196
+ * Which inbound mail the mailbox accepts:
3197
+ *
3198
+ * - `open`: Accepts everything not blocked by a rule.
3199
+ * - `replies_only`: Accepts only replies to messages this mailbox has
3200
+ * sent. A reply must match a message the mailbox sent. Landing in an
3201
+ * existing thread by itself does not count.
3202
+ * - `allowlist`: Accepts only senders matching an allow rule. Replies to
3203
+ * prior outbound mail are always admitted unless blocked.
3204
+ * - `drop`: Stores nothing.
3205
+ *
3134
3206
  */
3135
3207
  receive_policy: "open" | "replies_only" | "allowlist" | "drop";
3136
3208
  /**
3137
- * Lifecycle state. Suspended mailboxes stop emitting events; inbound mail is retained as blocked.
3209
+ * Lifecycle state. Suspended mailboxes stop emitting events. Inbound mail is retained as blocked.
3138
3210
  */
3139
3211
  readonly state: "active" | "suspended";
3140
3212
  /**
@@ -3147,7 +3219,7 @@ type Mailbox = {
3147
3219
  */
3148
3220
  readonly inbound_address_id: InboundAddressId;
3149
3221
  /**
3150
- * 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. `3y` and `10y` are reserved future tiers.
3222
+ * 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.
3151
3223
  */
3152
3224
  retention_tier: "30d" | "90d" | "1y";
3153
3225
  /**
@@ -3164,13 +3236,13 @@ type Mailbox = {
3164
3236
  */
3165
3237
  readonly unread_thread_count?: number | null;
3166
3238
  /**
3167
- * Your own key/value data attached to the mailbox. Up to 2 KB; keys starting with `__bird` are reserved.
3239
+ * Your own key/value data attached to the mailbox. Up to 2 KB. Keys starting with `__bird` are reserved.
3168
3240
  */
3169
3241
  metadata: {
3170
3242
  [key: string]: unknown;
3171
3243
  };
3172
3244
  /**
3173
- * Whether Bird 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.
3245
+ * 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.
3174
3246
  */
3175
3247
  readonly local_part_generated?: boolean;
3176
3248
  /**
@@ -3512,17 +3584,17 @@ type EmailStatsByBroadcastResponse = {
3512
3584
  */
3513
3585
  readonly data: Array<EmailBroadcastStatsPoint>;
3514
3586
  /**
3515
- * Total number of distinct broadcasts with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
3587
+ * Total number of distinct broadcasts with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
3516
3588
  *
3517
3589
  */
3518
3590
  readonly total: number;
3519
3591
  };
3520
3592
  /**
3521
- * Aggregate delivery, engagement, and latency stats for the messages of a single broadcast over the requested period.
3593
+ * Delivery, engagement and latency figures for one broadcast's messages over the period you asked for.
3522
3594
  */
3523
3595
  type EmailBroadcastStatsPoint = {
3524
3596
  /**
3525
- * The broadcast this row aggregates, the same identifier returned by the broadcast endpoints. Only messages sent as part of a broadcast carry a broadcast identifier; one-off and transactional sends are not included in this breakdown.
3597
+ * The broadcast this row covers, the same ID the broadcast endpoints return. Only mail sent as part of a broadcast has a broadcast ID, so one-off and transactional sends do not appear in this breakdown at all.
3526
3598
  */
3527
3599
  readonly broadcast_id: string;
3528
3600
  readonly delivery: EmailDeliveryStats;
@@ -3530,7 +3602,7 @@ type EmailBroadcastStatsPoint = {
3530
3602
  readonly latency: EmailLatencyStats;
3531
3603
  };
3532
3604
  /**
3533
- * The date range the server actually computed against. Echoed back so clients can render the period without tracking it themselves and so cached responses can be keyed by what was queried.
3605
+ * The date range this response was actually computed against. Echoed back so clients can render the period without tracking it themselves and so cached responses can be keyed by what was queried.
3534
3606
  *
3535
3607
  */
3536
3608
  type EmailStatsPeriod = {
@@ -3543,7 +3615,7 @@ type EmailStatsPeriod = {
3543
3615
  */
3544
3616
  readonly to: string;
3545
3617
  /**
3546
- * The instant the statistics in this response are current to: events recorded up to roughly this time are reflected, while more recent events may not be yet. Statistics are served from a rolling aggregation that refreshes every few seconds, so a response is near-real-time but not live; use this field to label data freshness (for example "as of 14:03") rather than assuming the numbers are to-the-second. Null when the freshness boundary is not being reported.
3618
+ * The instant the statistics in this response are current to: events recorded up to roughly this time are reflected, while more recent events may not be yet. Statistics are served from a rolling aggregation that refreshes every few seconds, so a response reflects data from up to a few seconds ago. Use this field to label data freshness (for example "as of 14:03") rather than assuming the numbers are to-the-second. Null when the freshness boundary is not being reported.
3547
3619
  *
3548
3620
  */
3549
3621
  readonly data_as_of?: string | null;
@@ -3561,13 +3633,13 @@ type EmailStatsByComplaintTypeResponse = {
3561
3633
  */
3562
3634
  readonly data: Array<EmailComplaintTypeStatsPoint>;
3563
3635
  /**
3564
- * Total number of distinct feedback types with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
3636
+ * Total number of distinct feedback types with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
3565
3637
  *
3566
3638
  */
3567
3639
  readonly total: number;
3568
3640
  };
3569
3641
  /**
3570
- * Complaint counts for a single feedback-loop complaint type over the requested period. A complaint type is recorded only on spam-complaint events, so this breakdown reports the complained count for each type and nothing else (a complaint event carries no delivery or engagement context to aggregate).
3642
+ * Complaint counts for a single feedback-loop complaint type over the requested period. A complaint type is recorded only on spam-complaint events, so this breakdown reports the complained count for each type and nothing else. A complaint event has no delivery or engagement information attached to it, so there is nothing else here to count.
3571
3643
  *
3572
3644
  */
3573
3645
  type EmailComplaintTypeStatsPoint = {
@@ -3593,7 +3665,7 @@ type EmailStatsByBounceCodeResponse = {
3593
3665
  */
3594
3666
  readonly data: Array<EmailBounceCodeStatsPoint>;
3595
3667
  /**
3596
- * Total number of distinct SMTP error codes with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
3668
+ * Total number of distinct SMTP error codes with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
3597
3669
  *
3598
3670
  */
3599
3671
  readonly total: number;
@@ -3614,7 +3686,7 @@ type EmailBounceStats = {
3614
3686
  */
3615
3687
  readonly soft: number;
3616
3688
  /**
3617
- * Distinct recipients bounced by an upstream policy block (relaying denied, blocklisted domain). Triage usually focuses on content or sender configuration rather than recipient cleanup.
3689
+ * Distinct recipients refused by a policy at the receiving end, such as relaying denied or a blocklisted domain. Fixing these usually means changing your content or your sender configuration, not cleaning up the recipient list.
3618
3690
  *
3619
3691
  */
3620
3692
  readonly admin: number;
@@ -3630,7 +3702,7 @@ type EmailBounceStats = {
3630
3702
  readonly undetermined: number;
3631
3703
  };
3632
3704
  /**
3633
- * Bounce counts for a single SMTP status code over the requested period, with the per-type breakdown. This is a deliverability-debugging view keyed on what the receiving server returned, so it reports the failure side only (bounced recipients and their hard/soft/admin/block/undetermined split) and carries no delivered, open, or rate fields.
3705
+ * Bounce counts for a single SMTP status code over the requested period, with the per-type breakdown. This is a deliverability-debugging view keyed on what the receiving mail server returned, so it only reports the failure side: bounced recipients, and their `hard`, `soft`, `admin`, `block`, and `undetermined` split. It has no delivered, open, or rate fields.
3634
3706
  *
3635
3707
  */
3636
3708
  type EmailBounceCodeStatsPoint = {
@@ -3639,7 +3711,7 @@ type EmailBounceCodeStatsPoint = {
3639
3711
  */
3640
3712
  readonly smtp_error_code: string;
3641
3713
  /**
3642
- * Distinct recipients whose delivery failed with this SMTP status code. Approximately the sum of the five `bounces.*` sub-counts; the totals are computed independently so they may differ slightly at the approximation error.
3714
+ * Distinct recipients whose delivery failed with this SMTP status code, approximately equal to the sum of the five `bounces.*` sub-counts. The two are computed independently, so they can differ slightly because of approximation.
3643
3715
  */
3644
3716
  readonly bounced: number;
3645
3717
  readonly bounces: EmailBounceStats;
@@ -3657,13 +3729,13 @@ type EmailStatsByClientResponse = {
3657
3729
  */
3658
3730
  readonly data: Array<EmailClientStatsPoint>;
3659
3731
  /**
3660
- * Total number of distinct values of the requested `group_by` facet with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
3732
+ * Total number of distinct values of the requested `group_by` facet with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
3661
3733
  *
3662
3734
  */
3663
3735
  readonly total: number;
3664
3736
  };
3665
3737
  /**
3666
- * Open and click counts for a breakdown row whose dimension is resolved from engagement events only. `opens`, `opens_non_prefetched` and `clicks` count distinct engagement events (deduplicated occurrences); the `unique_*` fields count distinct recipients. Rates and unsubscribe counts are not included: there is no per-dimension delivered denominator for a rate, and unsubscribe events do not carry the engagement context this breakdown is keyed on.
3738
+ * Open and click counts for a breakdown row whose dimension is resolved from engagement events only. `opens`, `opens_non_prefetched`, and `clicks` count events, not people: the same recipient opening or clicking more than once counts each time. The `unique_*` fields count distinct recipients instead, so a recipient who opened five times only counts once there. Rates and unsubscribe counts are not included here. There is no per-dimension delivered count to use as a rate's denominator, and an unsubscribe event has none of the information this breakdown is grouped by, so it cannot be placed on a row.
3667
3739
  *
3668
3740
  */
3669
3741
  type EmailEngagementCounts = {
@@ -3695,20 +3767,20 @@ type EmailEngagementCounts = {
3695
3767
  readonly unique_clicks: number;
3696
3768
  };
3697
3769
  /**
3698
- * Engagement counts for messages opened or clicked from a single email client, operating system, or device type over the requested period. The reading environment is resolved from open and click events only, so this breakdown reports engagement activity (opens, clicks, and the recipients behind them); it carries no delivery counts and no open/click rates, because the receiving mail server reports delivery without a client or device, leaving no per-client delivered denominator to divide by. Exactly one of `email_client`, `os`, and `device_type` is populated, selected by the request's `group_by`; the other two are null. Engagement environment is detected from the opening client and is subject to the same inbox-privacy prefetch effects as the open counts (the `opens_non_prefetched` figure excludes auto-fetched opens).
3770
+ * Engagement counts for messages opened or clicked from a single email client, operating system, or device type over the requested period. The reading environment is resolved from open and click events only, so this breakdown reports engagement activity: opens, clicks, and the recipients behind them. It has no delivery counts and no open or click rates, because the receiving mail server reports delivery without a client or device, so there is no per-client delivered denominator to divide by. Exactly one of `email_client`, `os`, and `device_type` is populated, selected by the request's `group_by`. The other two are null. The detected client is also affected by inbox-privacy prefetching, the same way open counts are: `opens_non_prefetched` excludes opens that were auto-fetched by an inbox privacy feature rather than by a person actually opening the message.
3699
3771
  *
3700
3772
  */
3701
3773
  type EmailClientStatsPoint = {
3702
3774
  /**
3703
- * The mail client this row aggregates (for example `Gmail`, `Apple Mail`, `Outlook`). Populated only when `group_by=email_client`; null otherwise.
3775
+ * The mail client this row aggregates (for example `Gmail`, `Apple Mail`, `Outlook`). Populated only when `group_by=email_client`. Null otherwise.
3704
3776
  */
3705
3777
  readonly email_client: string | null;
3706
3778
  /**
3707
- * The operating system this row aggregates (for example `iOS`, `Android`, `Windows`, `macOS`). Populated only when `group_by=os`; null otherwise.
3779
+ * The operating system this row aggregates (for example `iOS`, `Android`, `Windows`, `macOS`). Populated only when `group_by=os`. Null otherwise.
3708
3780
  */
3709
3781
  readonly os: string | null;
3710
3782
  /**
3711
- * The device type this row aggregates (for example `mobile`, `desktop`, `tablet`). Populated only when `group_by=device_type`; null otherwise.
3783
+ * The device type this row aggregates (for example `mobile`, `desktop`, `tablet`). Populated only when `group_by=device_type`. Null otherwise.
3712
3784
  */
3713
3785
  readonly device_type: string | null;
3714
3786
  readonly engagement: EmailEngagementCounts;
@@ -3726,13 +3798,13 @@ type EmailStatsByLocationResponse = {
3726
3798
  */
3727
3799
  readonly data: Array<EmailLocationStatsPoint>;
3728
3800
  /**
3729
- * Total number of distinct locations at the requested `group_by` level with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
3801
+ * Total number of distinct locations at the requested `group_by` level with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
3730
3802
  *
3731
3803
  */
3732
3804
  readonly total: number;
3733
3805
  };
3734
3806
  /**
3735
- * Open and click counts for messages engaged with from a single location over the requested period. Location is resolved from open and click events only, so this breakdown reports engagement activity (opens, clicks, and the recipients behind them); it carries no delivery counts and no open/click rates, because the receiving mail server reports delivery without a recipient location, leaving no per-location delivered denominator to divide by. Each row always includes all three of `country`, `region`, and `city`; the levels below the requested `group_by` are null.
3807
+ * Open and click counts for messages engaged with from a single location over the requested period. Location is resolved from open and click events only, so this breakdown reports engagement activity: opens, clicks, and the recipients behind them. It has no delivery counts and no open or click rates, because the receiving mail server reports delivery without a recipient location, so there is no per-location delivered denominator to divide by. Each row always includes all three of `country`, `region`, and `city`; the levels below the requested `group_by` are null.
3736
3808
  *
3737
3809
  */
3738
3810
  type EmailLocationStatsPoint = {
@@ -3756,25 +3828,28 @@ type EmailLocationStatsPoint = {
3756
3828
  */
3757
3829
  type EmailEngagementSortMetric = "opens" | "opens_non_prefetched" | "unique_opens" | "unique_opens_non_prefetched" | "clicks" | "unique_clicks";
3758
3830
  /**
3759
- * Per-template breakdown for the requested period, ranked by the `sort` metric (default `processed`) descending and capped at the requested `limit` (default 50, max 200).
3831
+ * A breakdown of stats per template for the requested period. Rows are ranked by the `sort` metric (`processed` by default) descending, and capped at the requested `limit` (50 by default, 200 at most).
3832
+ *
3760
3833
  */
3761
3834
  type EmailStatsByTemplateResponse = {
3762
3835
  /**
3763
- * The date range the response covers (echoed back from the request), plus `data_as_of`, the freshness boundary the data is current to.
3836
+ * The date range this response covers, echoed back from what you requested, plus `data_as_of`: how far the underlying data is currently up to date.
3837
+ *
3764
3838
  */
3765
3839
  period: EmailStatsPeriod;
3766
3840
  /**
3767
- * Template breakdown rows, ranked by the `sort` metric (default `processed`) descending. Empty when no templated messages were active in the period.
3841
+ * One row per template, ranked by the `sort` metric (`processed` by default) descending. Empty when no messages were sent with a template during the period.
3842
+ *
3768
3843
  */
3769
3844
  readonly data: Array<EmailTemplateStatsPoint>;
3770
3845
  /**
3771
- * Total number of distinct templates with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
3846
+ * How many distinct templates had activity in the period, regardless of `limit`. When this is higher than the number of rows in `data`, the ranking got cut off. Raise `limit` (up to 200), or narrow the date range, to see the rest.
3772
3847
  *
3773
3848
  */
3774
3849
  readonly total: number;
3775
3850
  };
3776
3851
  /**
3777
- * One point in a breakdown row's trend series: the headline delivery and engagement rates for that row's dimension value over a single day or hour. Returned only when `include_trend=true`; the bucket grain (day or hour) follows the `trend_grain` parameter. Counts and rates are approximate at scale.
3852
+ * One point in a breakdown row's trend series: the headline delivery and engagement rates for that row's dimension value over a single day or hour. Returned only when `include_trend=true`. The bucket grain (day or hour) follows the `trend_grain` parameter. Counts and rates are approximate at scale.
3778
3853
  *
3779
3854
  */
3780
3855
  type EmailStatsSeriesPoint = {
@@ -3799,32 +3874,34 @@ type EmailStatsSeriesPoint = {
3799
3874
  */
3800
3875
  readonly bounce_rate: number | null;
3801
3876
  /**
3802
- * Complaint rate for this bucket, as a fraction; event-time attribution can push it above 1 when complaints outrun the bucket's deliveries. Null when nothing was delivered in the bucket. On a sending-IP row complaints are not attributed to the IP, so this reads 0 in buckets that had deliveries and null in buckets that had none.
3877
+ * Complaint rate for this bucket, as a fraction. Event-time attribution can push it above 1 when complaints outrun the bucket's deliveries. Null when nothing was delivered in the bucket. On a sending-IP row complaints are not attributed to the IP, so this reads 0 in buckets that had deliveries and null in buckets that had none.
3803
3878
  */
3804
3879
  readonly complaint_rate: number | null;
3805
3880
  /**
3806
- * Open rate for this bucket, as a fraction; event-time attribution can push it above 1 when opens outrun the bucket's deliveries. Null when nothing was delivered in the bucket. On a sending-IP row engagement is not attributed to the IP, so this reads 0 in buckets that had deliveries and null in buckets that had none.
3881
+ * Open rate for this bucket, as a fraction. Event-time attribution can push it above 1 when opens outrun the bucket's deliveries. Null when nothing was delivered in the bucket. On a sending-IP row engagement is not attributed to the IP, so this reads 0 in buckets that had deliveries and null in buckets that had none.
3807
3882
  */
3808
3883
  readonly open_rate: number | null;
3809
3884
  /**
3810
- * Click rate for this bucket, as a fraction; event-time attribution can push it above 1 when clicks outrun the bucket's deliveries. Null when nothing was delivered in the bucket. On a sending-IP row engagement is not attributed to the IP, so this reads 0 in buckets that had deliveries and null in buckets that had none.
3885
+ * Click rate for this bucket, as a fraction. Event-time attribution can push it above 1 when clicks outrun the bucket's deliveries. Null when nothing was delivered in the bucket. On a sending-IP row engagement is not attributed to the IP, so this reads 0 in buckets that had deliveries and null in buckets that had none.
3811
3886
  */
3812
3887
  readonly click_rate: number | null;
3813
3888
  };
3814
3889
  type EmailTemplateId = string;
3815
3890
  /**
3816
- * Aggregate delivery, engagement, and latency stats for the messages sent with a single template over the requested period.
3891
+ * Delivery, engagement, and latency numbers for every message sent with one template over the requested period.
3817
3892
  */
3818
3893
  type EmailTemplateStatsPoint = {
3819
3894
  /**
3820
- * The template this row aggregates, the same identifier returned by the email-template endpoints. Only messages sent with a template appear in this breakdown; a template deleted after sending still appears by its ID.
3895
+ * The template this row is about, using the same `id` the email template endpoints return. Only messages sent with a template appear in this breakdown at all. If the template was deleted after it was used to send, this row still appears, keyed by that same `id`.
3896
+ *
3821
3897
  */
3822
3898
  readonly template_id: EmailTemplateId;
3823
3899
  readonly delivery: EmailDeliveryStats;
3824
3900
  readonly engagement: EmailEngagementStats;
3825
3901
  readonly latency: EmailLatencyStats;
3826
3902
  /**
3827
- * Per-bucket rate series for this template over the window. Present only when `include_trend=true`.
3903
+ * A short series of this template's delivery and engagement rates, one point per time bucket over the window. Only present when you set `include_trend=true` on the request.
3904
+ *
3828
3905
  */
3829
3906
  readonly trend?: Array<EmailStatsSeriesPoint>;
3830
3907
  };
@@ -3841,7 +3918,7 @@ type EmailStatsByRecipientDomainResponse = {
3841
3918
  */
3842
3919
  readonly data: Array<EmailRecipientDomainStatsPoint>;
3843
3920
  /**
3844
- * Total number of distinct recipient domains with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
3921
+ * Total number of distinct recipient domains with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
3845
3922
  *
3846
3923
  */
3847
3924
  readonly total: number;
@@ -3875,7 +3952,7 @@ type EmailStatsByMailboxProviderRegionResponse = {
3875
3952
  */
3876
3953
  readonly data: Array<EmailMailboxProviderRegionStatsPoint>;
3877
3954
  /**
3878
- * Total number of distinct mailbox provider and region pairs with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
3955
+ * Total number of distinct mailbox provider and region pairs with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
3879
3956
  *
3880
3957
  */
3881
3958
  readonly total: number;
@@ -3883,10 +3960,10 @@ type EmailStatsByMailboxProviderRegionResponse = {
3883
3960
  /**
3884
3961
  * Latency percentiles (p50, p95, p99) in milliseconds for the messages in this breakdown row, for breakdowns whose dimension is known only from delivery onward (sending IP, mailbox provider).
3885
3962
  *
3886
- * - `delivery`: time from handing the message off to the receiving mail server accepting it. Null when no deliveries occurred for this row in the period.
3887
- * - `total`: end-to-end time from accepting the send to delivery. Null when no deliveries occurred for this row in the period.
3963
+ * - `delivery`: Time from handing the message off to the receiving mail server accepting it. Null when no deliveries occurred for this row in the period.
3964
+ * - `total`: End-to-end time from accepting the send to delivery. Null when no deliveries occurred for this row in the period.
3888
3965
  *
3889
- * These breakdowns have no `processing` latency family. Bird only learns a row's dimension (the sending IP or recipient mailbox provider) after the upstream mail-transfer system reports delivery, bounce, deferral, or late bounce; the accept-to-processed phase happens before that binding decision, so it cannot be attributed to the dimension. Use `GET /v1/email/stats/daily` for workspace-wide processing-latency percentiles.
3966
+ * These breakdowns have no `processing` latency family. Which row a message belongs to, meaning which sending IP carried it or which mailbox provider received it, is only known once the receiving mail server has reported back with a delivery, a bounce, a deferral or a late bounce. The accept-to-processed phase is over before then, so there is no way to attribute it to a row. Use `GET /v1/email/stats/daily` for processing-latency percentiles across the whole workspace.
3890
3967
  *
3891
3968
  */
3892
3969
  type EmailDeliveryLatencyStats = {
@@ -3894,7 +3971,7 @@ type EmailDeliveryLatencyStats = {
3894
3971
  total: EmailLatencyQuantiles;
3895
3972
  };
3896
3973
  /**
3897
- * Delivery counts and rates for messages attributed to a single recipient mailbox provider. Per-provider results do not include `accepted` or `processed` counts because Bird only learns the recipient's mailbox provider after the upstream mail transfer system reports delivery/bounce/deferral/late bounce. Earlier lifecycle states (accepted, processed) cannot be attributed to a specific provider.
3974
+ * Delivery counts and rates for messages attributed to a single recipient mailbox provider. Per-provider results do not include `accepted` or `processed` counts, because we only learn the recipient's mailbox provider once the receiving mail server reports delivery, a bounce, a deferral, or a late bounce. Earlier lifecycle states (accepted, processed) cannot be attributed to a specific provider.
3898
3975
  *
3899
3976
  */
3900
3977
  type EmailMailboxProviderDeliveryStats = {
@@ -3965,18 +4042,18 @@ type EmailStatsByMailboxProviderResponse = {
3965
4042
  */
3966
4043
  readonly data: Array<EmailMailboxProviderStatsPoint>;
3967
4044
  /**
3968
- * Total number of distinct mailbox providers with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
4045
+ * Total number of distinct mailbox providers with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
3969
4046
  *
3970
4047
  */
3971
4048
  readonly total: number;
3972
4049
  };
3973
4050
  /**
3974
- * Delivery, engagement, and deliverability stats for messages grouped by a single recipient mailbox provider (`gmail`, `microsoft`, `yahoo`, `apple`, ...) over the requested period. A recipient's mailbox provider is reported by the receiving mail system, so per-provider rows cover the delivery stage onward: they omit the `accepted` and `processed` counts and the `processing` latency family, which never appear (they are not returned as null). Engagement (opens, clicks, and their rates) is included because those events are post-delivery and carry the mailbox provider.
4051
+ * Delivery, engagement, and deliverability stats for messages grouped by a single recipient mailbox provider (`gmail`, `microsoft`, `yahoo`, `apple`, ...) over the requested period. We learn a recipient's mailbox provider from the receiving mail server, so per-provider rows cover the delivery stage onward: they omit the `accepted` and `processed` counts and the `processing` latency family, which never appear at all rather than appearing as null. Engagement (opens and clicks, and their rates) is included because those events happen after delivery, once the mailbox provider is already known.
3975
4052
  *
3976
4053
  */
3977
4054
  type EmailMailboxProviderStatsPoint = {
3978
4055
  /**
3979
- * The recipient mailbox provider this row aggregates, as a lowercased classifier bucket (e.g. `gmail`, `yahoo`, `microsoft`, `apple`). The set is open and grows as new providers are categorised.
4056
+ * The recipient mailbox provider this row aggregates, as a lowercased classifier bucket (e.g. `gmail`, `yahoo`, `microsoft`, `apple`). The set is open and grows as new providers are categorized.
3980
4057
  */
3981
4058
  readonly mailbox_provider: string;
3982
4059
  readonly delivery: EmailMailboxProviderDeliveryStats;
@@ -3988,7 +4065,7 @@ type EmailMailboxProviderStatsPoint = {
3988
4065
  readonly trend?: Array<EmailStatsSeriesPoint>;
3989
4066
  };
3990
4067
  /**
3991
- * Metric to rank rows by, applied descending. Shared by the breakdowns whose attribution begins at delivery (mailbox providers, mailbox provider regions): `processed`, `rejected`, and `oob_bounces` are not part of those rows, so they are not sortable. Any count or rate the rows carry may be used; rows whose rate is undefined (zero denominator) sort last. Bounce sub-types are addressed by their nested location in each row, for example `bounces.hard` and `bounces.hard_rate`.
4068
+ * Metric to rank rows by, applied descending. Shared by the breakdowns whose attribution begins at delivery (mailbox providers, mailbox provider regions): `processed`, `rejected`, and `oob_bounces` are not part of those rows, so they are not sortable. Any count or rate on the row can be used; rows whose rate is undefined (zero denominator) sort last. Bounce sub-types use their nested location in each row, for example `bounces.hard` and `bounces.hard_rate`.
3992
4069
  *
3993
4070
  */
3994
4071
  type EmailMailboxProviderSortMetric = "delivered" | "bounced" | "complained" | "deferred" | "bounces.hard" | "bounces.soft" | "bounces.admin" | "bounces.block" | "bounces.undetermined" | "opens" | "opens_non_prefetched" | "unique_opens" | "unique_opens_non_prefetched" | "clicks" | "unique_clicks" | "unsubscribes" | "delivery_rate" | "bounce_rate" | "complaint_rate" | "open_rate" | "click_rate" | "unsubscribe_rate" | "bounces.hard_rate" | "bounces.soft_rate" | "bounces.admin_rate" | "bounces.block_rate" | "bounces.undetermined_rate";
@@ -4005,7 +4082,7 @@ type EmailStatsByCategoryResponse = {
4005
4082
  */
4006
4083
  readonly data: Array<EmailCategoryStatsPoint>;
4007
4084
  /**
4008
- * Total number of distinct categories with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
4085
+ * Total number of distinct categories with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
4009
4086
  *
4010
4087
  */
4011
4088
  readonly total: number;
@@ -4015,7 +4092,7 @@ type EmailStatsByCategoryResponse = {
4015
4092
  */
4016
4093
  type EmailCategoryStatsPoint = {
4017
4094
  /**
4018
- * The category this row aggregates, as set at send time. `transactional` is one-to-one mail triggered by a user action; `marketing` is bulk sending. New categories may be added over time.
4095
+ * The category this row aggregates, as set at send time. `transactional` is one-to-one mail triggered by a user action. `marketing` is bulk sending. New categories may be added over time.
4019
4096
  */
4020
4097
  readonly category: string;
4021
4098
  readonly delivery: EmailDeliveryStats;
@@ -4039,7 +4116,7 @@ type EmailStatsBySendingDomainResponse = {
4039
4116
  */
4040
4117
  readonly data: Array<EmailSendingDomainStatsPoint>;
4041
4118
  /**
4042
- * Total number of distinct sending domains with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
4119
+ * Total number of distinct sending domains with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
4043
4120
  *
4044
4121
  */
4045
4122
  readonly total: number;
@@ -4073,13 +4150,13 @@ type EmailStatsBySendingIpResponse = {
4073
4150
  */
4074
4151
  readonly data: Array<EmailSendingIpStatsPoint>;
4075
4152
  /**
4076
- * Total number of distinct sending IP addresses with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
4153
+ * Total number of distinct sending IP addresses with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
4077
4154
  *
4078
4155
  */
4079
4156
  readonly total: number;
4080
4157
  };
4081
4158
  /**
4082
- * Delivery counts and rates for messages attributed to a single sending IP. Per-IP results do not include `accepted` or `processed` counts because Bird only learns which sending IP a message used after the upstream mail transfer system reports delivery/bounce/deferral/late bounce. Earlier lifecycle states (accepted, processed) cannot be attributed to a specific IP. Spam complaints and out-of-band bounce notifications are also not attributed per IP on this breakdown, so `complained` and `oob_bounces` read 0 (their rates read 0 where the denominator is non-zero, null where it is zero), `effective_delivered` equals `delivered`, and `all_bounces` equals `bounced`.
4159
+ * Delivery counts and rates for messages attributed to a single sending IP. Per-IP results do not include `accepted` or `processed` counts: we only learn which sending IP a message used once it has been delivered, bounced, deferred, or bounced late, so those earlier lifecycle states cannot be attributed to a specific IP. Spam complaints and out-of-band bounce notifications are also not attributed per IP on this breakdown, so `complained` and `oob_bounces` read 0 (their rates read 0 where the denominator is non-zero, null where it is zero), `effective_delivered` equals `delivered`, and `all_bounces` equals `bounced`.
4083
4160
  *
4084
4161
  */
4085
4162
  type EmailSendingIpDeliveryStats = {
@@ -4088,11 +4165,11 @@ type EmailSendingIpDeliveryStats = {
4088
4165
  */
4089
4166
  readonly delivered: number;
4090
4167
  /**
4091
- * Distinct recipients whose delivery failed. Approximately the sum of the five `bounces.*` sub-counts (hard, soft, admin, block, undetermined); the totals are computed independently so they may differ slightly at the approximation error.
4168
+ * Distinct recipients whose delivery failed. This is approximately the sum of the five `bounces.*` sub-counts (hard, soft, admin, block, undetermined). The two are computed independently, so they can differ slightly.
4092
4169
  */
4093
4170
  readonly bounced: number;
4094
4171
  /**
4095
- * Distinct recipients who reported the message as spam. Complaints are not attributed to a sending IP, so this reads 0 on this breakdown; read complaint counts from the summary or time-series statistics instead.
4172
+ * Distinct recipients who reported the message as spam. Complaints are not attributed to a sending IP, so this reads 0 on this breakdown. Read complaint counts from the summary or time-series statistics instead.
4096
4173
  */
4097
4174
  readonly complained: number;
4098
4175
  /**
@@ -4100,7 +4177,7 @@ type EmailSendingIpDeliveryStats = {
4100
4177
  */
4101
4178
  readonly deferred: number;
4102
4179
  /**
4103
- * Out-of-band bounce events: failure notifications received after the receiving server had initially confirmed delivery. Not attributed to a sending IP on this breakdown, so this reads 0; workspace-wide out-of-band counts are on the summary and time-series statistics.
4180
+ * Out-of-band bounce events: failure notifications received after the receiving server had initially confirmed delivery. Not attributed to a sending IP on this breakdown, so this reads 0. Workspace-wide out-of-band counts are on the summary and time-series statistics.
4104
4181
  *
4105
4182
  */
4106
4183
  readonly oob_bounces: number;
@@ -4135,7 +4212,7 @@ type EmailSendingIpDeliveryStats = {
4135
4212
  };
4136
4213
  type IpPoolId = string;
4137
4214
  /**
4138
- * Delivery and latency stats for messages sent from a single IP address over the requested period. Per-IP attribution begins only after a message is processed: the upstream mail-transfer system reports the IP it used on delivery, bounce, deferral, and late-bounce events, but not at acceptance or processing time. As a result, per-IP rows omit the `accepted` and `processed` counts and the `processing` latency family, which never appear (they are not returned as null).
4215
+ * Delivery and latency stats for messages sent from a single IP address over the requested period. Per-IP attribution begins only after a message is processed: we learn which IP a message used only from its delivery, bounce, deferral, and late-bounce events, not from its acceptance or processing. As a result, per-IP rows omit the `accepted` and `processed` counts and the `processing` latency family. Those fields never appear on a per-IP row. They are not returned as null.
4139
4216
  *
4140
4217
  */
4141
4218
  type EmailSendingIpStatsPoint = {
@@ -4156,9 +4233,21 @@ type EmailSendingIpStatsPoint = {
4156
4233
  readonly trend?: Array<EmailStatsSeriesPoint>;
4157
4234
  };
4158
4235
  /**
4159
- * Single-row aggregate across the full requested period, including delivery and engagement counts plus derived rates. Use this endpoint for KPI tiles, campaign reporting, and any metric that needs a meaningful denominator; the daily and hourly endpoints carry the same rates per bucket, dividing each bucket's own counts.
4236
+ * A single row that aggregates delivery and engagement counts, plus derived
4237
+ * rates, across the whole requested period. Use this endpoint for KPI
4238
+ * tiles, campaign reporting, and anywhere you need a rate with a meaningful
4239
+ * denominator. The daily and hourly endpoints report the same rates, but
4240
+ * per bucket, each one dividing that bucket's own counts.
4160
4241
  *
4161
- * Every count is a sum of per-bucket counts across the window (per day for day windows, per hour for hour windows), so a recipient (or message) active in two buckets contributes one to each bucket and two to the period total. This matches common provider reporting and is not double-counting; it does not yield a period-distinct count. Latency percentiles, by contrast, are computed across the whole period rather than summed per bucket. Rates are null when their denominator is zero.
4242
+ * Every count is a sum of per-bucket counts across the window (per day for
4243
+ * day windows, per hour for hour windows). A recipient, or a message, that
4244
+ * is active in two buckets contributes to each of them, so it is counted
4245
+ * twice in the period total. This matches how most mailbox providers report
4246
+ * their own numbers. The effect to plan for is that the total is a sum of
4247
+ * per-bucket activity rather than a count of distinct recipients or messages
4248
+ * across the whole period. Latency percentiles work differently: they are computed
4249
+ * once across the whole period rather than summed from the buckets. A rate
4250
+ * is null when its denominator is zero.
4162
4251
  *
4163
4252
  */
4164
4253
  type EmailStatsSummary = {
@@ -4176,7 +4265,7 @@ type EmailStatsSummary = {
4176
4265
  readonly comparison?: EmailStatsComparison;
4177
4266
  };
4178
4267
  /**
4179
- * The change in each headline metric from the preceding period to the requested one. A `*_pct_change` is a signed relative change in a count, computed as `(current - previous) / previous` (so `0.5` means 50% higher, `-0.2` means 20% lower), and is null when the previous period's count was zero. A `*_rate_pp` is the signed arithmetic difference between the two periods' rate values, where each rate is a fraction in `[0,1]` (so `0.012` means the rate rose by 0.012, i.e. 1.2 percentage points; `-0.003` means it fell by 0.3 points), and is null when either period's rate is undefined (its denominator was zero). A `*_rate_pp` value ranges from `-1` to `1`: the most a rate can move between periods is from 0 to 1, or 1 to 0.
4268
+ * The change in each headline metric from the preceding period to the requested one. A `*_pct_change` field is a signed relative change in a count, computed as `(current - previous) / previous`, so `0.5` means 50% higher and `-0.2` means 20% lower. It is null when the previous period's count was zero, because there is nothing to compute a relative change from. A `*_rate_pp` field is the signed difference between the two periods' rate values, each expressed as a fraction, so `0.012` means the rate rose by 1.2 percentage points and `-0.003` means it fell by 0.3 points. It is null when either period's rate is undefined, because its denominator was zero. `delivery_rate_pp` and `bounce_rate_pp` range from `-1` to `1`, because the rates behind them cannot exceed 1. The engagement deltas have no fixed bound, because events are counted when they arrive rather than when the message was sent, which can push their rate above 1.
4180
4269
  *
4181
4270
  */
4182
4271
  type EmailStatsComparisonDelta = {
@@ -4244,20 +4333,20 @@ type EmailStatsComparison = {
4244
4333
  readonly delta: EmailStatsComparisonDelta;
4245
4334
  };
4246
4335
  /**
4247
- * The window the server actually computed against. The summary serves two window grains: calendar days (bounds are YYYY-MM-DD) and hours (bounds are RFC 3339 instants). The grain of `from` and `to` mirrors the grain of the request's bounds; days and hour boundaries follow the requested `timezone` (UTC when omitted).
4336
+ * The window this response was actually computed against. The summary serves two window grains: calendar days (bounds are YYYY-MM-DD) and hours (bounds are RFC 3339 instants). The grain of `from` and `to` mirrors the grain of the request's bounds. Days and hour boundaries follow the requested `timezone` (UTC when omitted).
4248
4337
  *
4249
4338
  */
4250
4339
  type EmailStatsSummaryPeriod = {
4251
4340
  /**
4252
- * Inclusive start of the window the response covers. A calendar day (YYYY-MM-DD, in the requested `timezone`) for day windows; for hour windows, an RFC 3339 UTC instant marking the start of the first hour, which falls on a local hour boundary when `timezone` is set.
4341
+ * Inclusive start of the window the response covers. A calendar day (YYYY-MM-DD, in the requested `timezone`) for day windows. For hour windows, an RFC 3339 UTC instant marking the start of the first hour, which falls on a local hour boundary when `timezone` is set.
4253
4342
  */
4254
4343
  readonly from: string;
4255
4344
  /**
4256
- * Inclusive end of the window the response covers. A calendar day (YYYY-MM-DD, in the requested `timezone`) for day windows; for hour windows, an RFC 3339 UTC instant marking the start of the last hour, which falls on a local hour boundary when `timezone` is set.
4345
+ * Inclusive end of the window the response covers. A calendar day (YYYY-MM-DD, in the requested `timezone`) for day windows. For hour windows, an RFC 3339 UTC instant marking the start of the last hour, which falls on a local hour boundary when `timezone` is set.
4257
4346
  */
4258
4347
  readonly to: string;
4259
4348
  /**
4260
- * The instant the statistics in this response are current to: events recorded up to roughly this time are reflected, while more recent events may not be yet. Statistics are served from a rolling aggregation that refreshes every few seconds, so a response is near-real-time but not live; use this field to label data freshness (for example "as of 14:03") rather than assuming the numbers are to-the-second. Null when the freshness boundary is not being reported.
4349
+ * The instant the statistics in this response are current to: events recorded up to roughly this time are reflected, while more recent events may not be yet. Statistics are served from a rolling aggregation that refreshes every few seconds, so a response reflects data from up to a few seconds ago. Use this field to label data freshness (for example "as of 14:03") rather than assuming the numbers are to-the-second. Null when the freshness boundary is not being reported.
4261
4350
  *
4262
4351
  */
4263
4352
  readonly data_as_of?: string | null;
@@ -4275,7 +4364,7 @@ type EmailStatsTagsResponse = {
4275
4364
  */
4276
4365
  readonly data: Array<EmailTagStatsPoint>;
4277
4366
  /**
4278
- * Total number of distinct tags (name and value pairs) with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped; raise `limit` (up to 200) or narrow the window to see more.
4367
+ * Total number of distinct tags (name and value pairs) with activity in the period, regardless of `limit`. When it exceeds the number of rows returned, the ranking was capped. Raise `limit` (up to 200) or narrow the window to see more.
4279
4368
  *
4280
4369
  */
4281
4370
  readonly total: number;
@@ -4298,12 +4387,12 @@ type EmailTagStatsPoint = {
4298
4387
  readonly trend?: Array<EmailStatsSeriesPoint>;
4299
4388
  };
4300
4389
  /**
4301
- * Metric to rank breakdown rows by, applied descending. Shared by the breakdowns whose rows carry the full delivery, engagement, and latency block (tags, sending domains, categories, recipient domains, templates, broadcasts). Any count or rate may be used; rows whose rate is undefined (zero denominator) sort last. Bounce sub-types are addressed by their nested location in each row, for example `bounces.hard` and `bounces.hard_rate`.
4390
+ * Metric to rank breakdown rows by, applied descending. Shared by the breakdowns whose rows have the full delivery, engagement, and latency block: tags, sending domains, categories, recipient domains, templates, and broadcasts. Any count or rate can be used. A row whose rate is undefined, because its denominator was zero, sorts last. A bounce sub-type is nested under `bounces` in each row, so its sort name reflects that, for example `bounces.hard` and `bounces.hard_rate`.
4302
4391
  *
4303
4392
  */
4304
4393
  type EmailStatsSortMetric = "processed" | "delivered" | "bounced" | "complained" | "deferred" | "rejected" | "oob_bounces" | "bounces.hard" | "bounces.soft" | "bounces.admin" | "bounces.block" | "bounces.undetermined" | "opens" | "opens_non_prefetched" | "unique_opens" | "unique_opens_non_prefetched" | "clicks" | "unique_clicks" | "unsubscribes" | "delivery_rate" | "bounce_rate" | "complaint_rate" | "open_rate" | "click_rate" | "unsubscribe_rate" | "bounces.hard_rate" | "bounces.soft_rate" | "bounces.admin_rate" | "bounces.block_rate" | "bounces.undetermined_rate";
4305
4394
  /**
4306
- * Time-series stats payload. `period` echoes the range and bucket grain the server computed against; `data` is one row per bucket in chronological order.
4395
+ * Time-series stats payload. `period` echoes the range and bucket grain actually computed against. `data` is one row per bucket in chronological order.
4307
4396
  *
4308
4397
  */
4309
4398
  type EmailStatsResponse = {
@@ -4319,7 +4408,7 @@ type EmailStatsResponse = {
4319
4408
  */
4320
4409
  type EmailStatsPoint = {
4321
4410
  /**
4322
- * The day (YYYY-MM-DD, in the requested `timezone`) or hour this point covers, matching the period's grain. An hour bucket is an RFC 3339 UTC instant marking the start of the hour; it falls on a local hour boundary when `timezone` is set, which is on the UTC hour only for whole-hour offsets.
4411
+ * The day (YYYY-MM-DD, in the requested `timezone`) or hour this point covers, matching the period's grain. An hour bucket is an RFC 3339 UTC instant marking the start of the hour. It falls on a local hour boundary when `timezone` is set, which is on the UTC hour only for whole-hour offsets.
4323
4412
  */
4324
4413
  readonly bucket: string;
4325
4414
  /**
@@ -4456,7 +4545,7 @@ type WhatsAppMessageTemplateComponent = {
4456
4545
  */
4457
4546
  type LanguageTag = string;
4458
4547
  /**
4459
- * A template's slug: its permanent, workspace-unique handle and API address. Lowercase letters, numbers, hyphens, and underscores. Fixed at creation, so anything that references it never breaks; the display name is the label to change freely.
4548
+ * A template's slug: what you send it by, for example `welcome-email`. You choose it when you create the template, and it cannot be changed afterwards. It can contain lowercase letters, numbers, hyphens, and underscores, has to start and end with a letter or a number, and can be up to 63 characters long.
4460
4549
  *
4461
4550
  */
4462
4551
  type TemplateSlug = string;
@@ -4661,6 +4750,316 @@ type VerificationOptions = {
4661
4750
  */
4662
4751
  channels?: Array<VerificationChannel$1>;
4663
4752
  };
4753
+ /**
4754
+ * What we can tell you about an email address: whether it will accept mail, how confident that is, why not when it will not, and what the address looks like it was meant to be when it looks misspelled.
4755
+ *
4756
+ * `result` is the field to decide on; `delivery_confidence` grades it, and `flags` describes the address itself rather than its deliverability, so a perfectly valid address can still have `role` or `disposable`.
4757
+ *
4758
+ * Fields with nothing behind them are left out rather than sent as null, so anything you can read in the response is something we actually resolved.
4759
+ *
4760
+ */
4761
+ type EmailLookup = {
4762
+ /**
4763
+ * The address that was looked up, exactly as you sent it.
4764
+ */
4765
+ readonly email: string;
4766
+ /**
4767
+ * Whether the address is well-formed and its domain is set up to receive mail at all. It says nothing about the mailbox itself, so a `valid` domain with no such mailbox is `true` here and `undeliverable` in `result`.
4768
+ */
4769
+ readonly valid: boolean;
4770
+ readonly result: EmailLookupResult$1;
4771
+ /**
4772
+ * How likely mail to this address is to be delivered, from 0 (certain not to be) to 100 (certain to be). Read it alongside `result` rather than instead of it, because the same score can sit under `neutral` or `risky` for different reasons.
4773
+ */
4774
+ readonly delivery_confidence: number;
4775
+ /**
4776
+ * Notable characteristics of the address. Empty when none apply.
4777
+ */
4778
+ readonly flags: Array<EmailLookupFlag$1>;
4779
+ /**
4780
+ * Why the address cannot receive mail. Absent unless `result` is `undeliverable`.
4781
+ */
4782
+ readonly reason?: EmailLookupReason$1;
4783
+ /**
4784
+ * The address this one looks like a misspelling of. Absent unless a correction was found, which in practice means `result` is `typo`. Offer it to whoever typed the original rather than sending to it unasked, because it is a guess and the address they meant may be neither one.
4785
+ */
4786
+ readonly did_you_mean?: string;
4787
+ };
4788
+ /**
4789
+ * Why an address cannot receive mail. `invalid_syntax` means the address is not a well-formed address at all, `invalid_domain` means the domain does not accept mail anywhere, and `invalid_recipient` means the domain accepts mail but this mailbox does not exist.
4790
+ *
4791
+ * Open enum: further reasons may be added over time, so treat an unrecognized value as a future one rather than an error. `result` is what to branch on; this field explains it.
4792
+ *
4793
+ */
4794
+ type EmailLookupReason$1 = "invalid_syntax" | "invalid_domain" | "invalid_recipient" | (string & {});
4795
+ /**
4796
+ * A notable characteristic of an email address. `role` means it addresses a function rather than a person (`support@`, `info@`), so replies and consent are ambiguous and complaints are more likely. `disposable` means it belongs to a throwaway-address provider and will stop existing. `free_provider` means it belongs to a consumer mailbox provider such as Gmail or Outlook.com, which is ordinary for consumer mail and a signal when you expected a business address.
4797
+ *
4798
+ * Open enum: more flags may be added over time, so treat an unrecognized value as a future flag rather than an error.
4799
+ *
4800
+ */
4801
+ type EmailLookupFlag$1 = "role" | "disposable" | "free_provider" | (string & {});
4802
+ /**
4803
+ * The verdict on the address, and the one field to decide on.
4804
+ *
4805
+ * `valid` means the address exists and accepts mail. `neutral` means it could not be confirmed either way, usually because the receiving domain answers every recipient the same. `risky` means it will probably accept the mail but is likelier than most to bounce or complain (a role, disposable, or low-reputation address). `undeliverable` means it will not accept mail, and `reason` says why. `typo` means the address looks like a misspelling of a real one, and `did_you_mean` has the correction.
4806
+ *
4807
+ * Open enum: further verdicts may be added over time, so treat an unrecognized value as a future one rather than an error. Branch on the values you know and fall back on `delivery_confidence`, which is always present and always comparable.
4808
+ *
4809
+ */
4810
+ type EmailLookupResult$1 = "valid" | "neutral" | "risky" | "undeliverable" | "typo" | (string & {});
4811
+ type EmailLookupRequest = {
4812
+ /**
4813
+ * The email address to look up. Send it exactly as you hold it: the part before the `@` is case-sensitive, so nothing is lowercased for you, and a display-name form such as `Aisha <aisha@example.com>` is rejected rather than unwrapped.
4814
+ *
4815
+ */
4816
+ email: string;
4817
+ };
4818
+ /**
4819
+ * What Bird knows about a phone number.
4820
+ *
4821
+ * The number, its flags and its line type are the free baseline and are always present; the country and the two networks join them whenever they could be identified. Each property you request through `type` comes back as a block of the same name, carrying its own `status`. A property you did not request is absent altogether, and a property that could not be answered is present with its `status` alone. You are billed for exactly the properties whose status is `ok`.
4822
+ *
4823
+ * Fields with nothing behind them are left out rather than sent as null, so anything you can read in the response is something Bird actually resolved.
4824
+ *
4825
+ */
4826
+ type PhoneNumberLookup = {
4827
+ /**
4828
+ * The number that was looked up, in E.164 format.
4829
+ */
4830
+ readonly phone_number: string;
4831
+ /**
4832
+ * The ISO 3166-1 alpha-2 country of the number. Absent when the number belongs to no single country, as a non-geographic range does.
4833
+ */
4834
+ readonly country_code?: CountryCode | null;
4835
+ /**
4836
+ * The network that serves the number today. Absent when no network could be identified.
4837
+ */
4838
+ readonly network_info?: LookupNetworkInfo | null;
4839
+ /**
4840
+ * The network that issued the number's range. It differs from `network_info` when the number has been ported. Absent when the issuing network could not be identified.
4841
+ */
4842
+ readonly original_network_info?: LookupNetworkInfo | null;
4843
+ /**
4844
+ * Notable characteristics of the number. Empty when none apply.
4845
+ */
4846
+ readonly flags: Array<LookupFlag$1>;
4847
+ readonly line_type: LookupLineType;
4848
+ /**
4849
+ * The allocated service of the number's range. Absent unless you requested the `classification` property.
4850
+ */
4851
+ readonly classification?: LookupClassification;
4852
+ /**
4853
+ * Whether the number is live on its network. Absent unless you requested the `presence` property.
4854
+ */
4855
+ readonly presence?: LookupPresence;
4856
+ /**
4857
+ * Whether the number is roaming. Absent unless you requested the `roaming` property.
4858
+ */
4859
+ readonly roaming?: LookupRoaming;
4860
+ /**
4861
+ * When the number's SIM last changed. Absent unless you requested the `sim_swap` property.
4862
+ */
4863
+ readonly sim_swap?: LookupSimSwap;
4864
+ /**
4865
+ * The number's porting record. Absent unless you requested the `porting` property.
4866
+ */
4867
+ readonly porting?: LookupPorting;
4868
+ /**
4869
+ * The number's credibility score. Absent unless you requested the `score` property.
4870
+ */
4871
+ readonly score?: LookupScore;
4872
+ };
4873
+ /**
4874
+ * A credibility score for the number. Returned when you request the `score` property.
4875
+ */
4876
+ type LookupScore = {
4877
+ readonly status: LookupPropertyStatus$1;
4878
+ /**
4879
+ * Credibility from 0 (low) to 100 (high). A low score means the number looks less credible than a typical subscriber line in the same range; it is a signal to weigh, not a verdict. It is a composite and is not derivable from the other properties. Present only when `status` is `ok`.
4880
+ *
4881
+ */
4882
+ readonly value?: number;
4883
+ };
4884
+ /**
4885
+ * How a requested property resolved.
4886
+ *
4887
+ * `ok` means the property was answered and its value is in the response.
4888
+ *
4889
+ * `unavailable` means no answer arrived, so the property adds nothing: its block is null, or for `classification`, `line_type` is left as the free baseline resolved it. The property is not billed.
4890
+ *
4891
+ * `inconclusive` means an answer arrived but does not resolve the property, either because the number is outside the coverage of the data behind it or because the answer is one we cannot yet place. It is a real answer rather than a missing one, and it is not billed either.
4892
+ *
4893
+ * Open enum: further statuses may be added over time, so treat an unrecognized value as a future one rather than an error. Only `ok` carries a value and only `ok` is billed, so branching on `ok` and treating everything else as "not answered" stays correct however the vocabulary grows.
4894
+ *
4895
+ */
4896
+ type LookupPropertyStatus$1 = "ok" | "unavailable" | "inconclusive" | (string & {});
4897
+ /**
4898
+ * One recorded move of a number between networks.
4899
+ */
4900
+ type LookupPortingEvent = {
4901
+ /**
4902
+ * When the move was recorded, null when the record carries no date.
4903
+ */
4904
+ readonly occurred_at: string | null;
4905
+ /**
4906
+ * What the record describes, as the number's registry reports it. Registries use their own short codes rather than a shared vocabulary, so treat this as a label to display rather than a value to branch on.
4907
+ */
4908
+ readonly action: string | null;
4909
+ };
4910
+ /**
4911
+ * Whether the number has ever moved network, when it last did, and its full porting record. Returned when you request the `porting` property; the baseline only reports whether a number has ever ported, through the `ported` flag.
4912
+ *
4913
+ */
4914
+ type LookupPorting = {
4915
+ readonly status: LookupPropertyStatus$1;
4916
+ /**
4917
+ * Whether the number has ever moved network. False is a positive finding rather than a lack of one: the registry was consulted and holds no move for this number. Present only when `status` is `ok`.
4918
+ *
4919
+ */
4920
+ readonly ported?: boolean;
4921
+ /**
4922
+ * When the number last moved network. Absent when it has never ported or when no date is on record.
4923
+ */
4924
+ readonly last_ported_at?: string | null;
4925
+ /**
4926
+ * Whether `last_ported_at` is an approximation. Some registries record only the period a move happened in, not the day.
4927
+ */
4928
+ readonly last_ported_at_is_approximate?: boolean;
4929
+ /**
4930
+ * Every move on record, oldest first. Absent when the number has never ported or when its registry publishes no history.
4931
+ */
4932
+ readonly history?: Array<LookupPortingEvent>;
4933
+ };
4934
+ /**
4935
+ * When the number's SIM last changed. Returned when you request the `sim_swap` property.
4936
+ */
4937
+ type LookupSimSwap = {
4938
+ readonly status: LookupPropertyStatus$1;
4939
+ /**
4940
+ * When the SIM was last changed. Absent when only a recency band is known.
4941
+ */
4942
+ readonly last_swapped_at?: string | null;
4943
+ /**
4944
+ * The lower bound, in days, of how long ago the SIM was last changed. Networks that do not release an exact date report a band instead; absent when no lower bound is known.
4945
+ */
4946
+ readonly min_days?: number | null;
4947
+ /**
4948
+ * The upper bound, in days, of how long ago the SIM was last changed. Absent when no upper bound is known; with a lower bound present, that means the change was at least `min_days` ago.
4949
+ */
4950
+ readonly max_days?: number | null;
4951
+ };
4952
+ /**
4953
+ * Whether the number is roaming, and on which network. Returned when you request the `roaming` property.
4954
+ */
4955
+ type LookupRoaming = {
4956
+ readonly status: LookupPropertyStatus$1;
4957
+ /**
4958
+ * Whether the number is currently roaming outside its home network. Present only when `status` is `ok`.
4959
+ */
4960
+ readonly is_roaming?: boolean;
4961
+ /**
4962
+ * The mobile country code of the visited network. Absent when the number is not roaming or the visited network is not reported.
4963
+ */
4964
+ readonly mcc?: string | null;
4965
+ /**
4966
+ * The mobile network code of the visited network. Absent when the number is not roaming or the visited network is not reported.
4967
+ */
4968
+ readonly mnc?: string | null;
4969
+ };
4970
+ /**
4971
+ * Whether the number is live on its network right now. Returned when you request the `presence` property.
4972
+ *
4973
+ * This is the one property no database can answer: it is a real-time query to the network the number is registered on.
4974
+ *
4975
+ */
4976
+ type LookupPresence = {
4977
+ readonly status: LookupPropertyStatus$1;
4978
+ /**
4979
+ * Whether the number is registered on a network and able to receive traffic. False means the network answered and reported the number as not currently reachable, which is different from us being unable to find out. Present only when `status` is `ok`.
4980
+ *
4981
+ */
4982
+ readonly reachable?: boolean;
4983
+ };
4984
+ /**
4985
+ * The allocated service of the number's range, at the precision the intelligence source publishes it.
4986
+ *
4987
+ * This is a finer vocabulary than `line_type`, which reports what the carrier platform alone can tell. Eleven of these values have no carrier equivalent at all: a number the carrier can only call `service` may be `premium_rate`, `shared_cost`, `universal_access` or a voicemail platform, and those carry very different cost and fraud implications. Where the two fields do overlap, they are two independent opinions rather than one refining the other.
4988
+ *
4989
+ */
4990
+ type LookupClassificationValue = "mobile" | "fixed_line" | "fixed_line_or_mobile" | "voip" | "toll_free" | "premium_rate" | "shared_cost" | "local_rate" | "national_rate" | "personal_number" | "universal_access" | "satellite" | "pager" | "payphone" | "m2m" | "isp" | "vpn" | "voice_mail" | "calling_cards" | "short_codes" | "service" | "other";
4991
+ /**
4992
+ * The allocated service of the number's range. Returned when you request the `classification` property.
4993
+ *
4994
+ * This sits beside `line_type` rather than replacing it, so you can always see which source answered: `line_type` is what the carrier platform reports and costs nothing, `classification` is what the intelligence source reports and is what you paid for.
4995
+ *
4996
+ */
4997
+ type LookupClassification = {
4998
+ readonly status: LookupPropertyStatus$1;
4999
+ /**
5000
+ * The allocated service of the range. Present only when `status` is `ok`.
5001
+ */
5002
+ readonly value?: LookupClassificationValue;
5003
+ };
5004
+ /**
5005
+ * What kind of line the number is, as reported by the carrier platform.
5006
+ *
5007
+ * This is part of the free baseline and is returned on every lookup, whatever you request. It never changes with what you buy. `unknown` means the carrier platform holds no classification for the range, and `other` means it holds one that has no equivalent here.
5008
+ *
5009
+ * For the allocated service of the range at finer precision, request the `classification` property. That answers from a different source, with its own wider vocabulary, and is reported separately so you can always tell the two apart.
5010
+ *
5011
+ */
5012
+ type LookupLineType = "mobile" | "fixed_line" | "voip" | "toll_free" | "premium_rate" | "satellite" | "pager" | "payphone" | "m2m" | "service" | "other" | "unknown";
5013
+ /**
5014
+ * A notable characteristic of a number. `ported` means the number has moved from the network that issued it to another one, so `network_info` and `original_network_info` name different carriers.
5015
+ *
5016
+ * Open enum: more flags may be added over time, so treat an unrecognized value as a future flag rather than an error.
5017
+ *
5018
+ */
5019
+ type LookupFlag$1 = "ported" | (string & {});
5020
+ /**
5021
+ * The network a number belongs to.
5022
+ */
5023
+ type LookupNetworkInfo = {
5024
+ /**
5025
+ * The carrier's name, absent when the carrier could not be identified.
5026
+ */
5027
+ readonly carrier_name?: string | null;
5028
+ /**
5029
+ * The mobile country code, absent for a network that has none or could not be identified.
5030
+ */
5031
+ readonly mcc?: string | null;
5032
+ /**
5033
+ * The mobile network code, absent for a network that has none or could not be identified.
5034
+ */
5035
+ readonly mnc?: string | null;
5036
+ };
5037
+ /**
5038
+ * ISO 3166-1 alpha-2 country code.
5039
+ */
5040
+ type CountryCode = string;
5041
+ type PhoneNumberLookupRequest = {
5042
+ /**
5043
+ * The phone number to look up, in E.164 format, which is a leading `+`, the country calling code, then the national number.
5044
+ */
5045
+ phone_number: string;
5046
+ /**
5047
+ * The paid properties to enrich the answer with. Omit it, or send an empty array, to get the free baseline and make no vendor call.
5048
+ *
5049
+ * Each delivered property is billed on top of the lookup itself. A property that could not be answered is reported in `properties` and is not billed.
5050
+ *
5051
+ */
5052
+ type?: Array<LookupProperty>;
5053
+ };
5054
+ /**
5055
+ * An intelligence property you can buy for a number, beyond the free baseline.
5056
+ *
5057
+ * `classification` resolves `line_type` to its precise allocated service (premium rate, satellite, machine-to-machine, payphone) where the baseline only distinguishes broad categories. `porting` returns when the number last moved network and its full porting record. `presence` reports whether the number is live on the network right now. `roaming` reports whether it is roaming and on which network. `sim_swap` returns when its SIM last changed. `score` returns a credibility score from 0 to 100.
5058
+ *
5059
+ * Each property you request is billed separately, and only when it is delivered.
5060
+ *
5061
+ */
5062
+ type LookupProperty = "classification" | "porting" | "presence" | "roaming" | "sim_swap" | "score";
4664
5063
  /**
4665
5064
  * Bucket grain for a stats trend series.
4666
5065
  */
@@ -4673,30 +5072,30 @@ type SmsTemplateList = {
4673
5072
  };
4674
5073
  type SmsTemplateVersionId = string;
4675
5074
  /**
4676
- * A single variable slot a template fills in from the values supplied when sending. Shared across channels (SMS, email) so template introspection reads the same everywhere.
5075
+ * One variable a template's content uses, filled in from the values you give when you send. Templates on every channel report their variables this way, so this reads the same whether you are looking at an SMS template or an email one.
4677
5076
  *
4678
5077
  */
4679
5078
  type TemplateVariable = {
4680
5079
  /**
4681
- * The parameter key this slot is filled with.
5080
+ * The variable's name, the key you use for it in `parameters` when you send.
4682
5081
  */
4683
5082
  readonly key: string;
4684
5083
  /**
4685
- * The value type this slot accepts. Open enum treat any unrecognized value as a future type rather than an error. SMS templates use the typed slots (`code`, `amount`, …); email templates use `text`.
5084
+ * The value type this variable accepts. We can add new types to this list over time, so treat a value you do not recognize as a new type rather than as an error. SMS templates use the typed values, such as `code` and `amount`. Email templates only use `text`.
4686
5085
  *
4687
5086
  */
4688
5087
  readonly type: string;
4689
5088
  /**
4690
- * Whether the slot must be supplied when sending. A send that leaves a required slot unset is rejected.
5089
+ * Whether a value has to be supplied when sending. A send that leaves a required variable unset is rejected.
4691
5090
  *
4692
5091
  */
4693
5092
  readonly required: boolean;
4694
5093
  /**
4695
- * A human-readable description of the accepted values.
5094
+ * A plain-language description of what values this variable accepts.
4696
5095
  */
4697
5096
  readonly constraint: string;
4698
5097
  /**
4699
- * Whether this slot's value is redacted before it reaches storage. A sensitive slot's rendered value never appears in message content read back through the API: a stand-in placeholder is stored instead.
5098
+ * Whether this variable's value gets redacted before it is stored. When it does, the rendered value never appears in message content you read back through the API: a placeholder is stored in its place instead.
4700
5099
  *
4701
5100
  */
4702
5101
  readonly sensitive?: boolean;
@@ -4706,11 +5105,11 @@ type TemplateVariable = {
4706
5105
  */
4707
5106
  type SmsMessageCategory = "transactional" | "marketing" | "authentication" | "service";
4708
5107
  /**
4709
- * Whether the template is a built-in Bird template (`system`) or one your workspace authored (`workspace`).
5108
+ * Whether the template is one of our built-in templates (`system`) or one your workspace created (`workspace`).
4710
5109
  */
4711
5110
  type TemplateScope = "system" | "workspace";
4712
5111
  /**
4713
- * A template's send-by handle the stable reference used in place of the template id when sending. Lowercase letters, numbers, hyphens, and underscores; starts and ends with a letter or number.
5112
+ * A template's name: the stable handle you send it by, used in place of the template id. It can contain lowercase letters, numbers, hyphens, and underscores, has to start and end with a letter or a number, and can be up to 63 characters long.
4714
5113
  *
4715
5114
  */
4716
5115
  type TemplateName = string;
@@ -4792,6 +5191,17 @@ type SmsBatchSummary = {
4792
5191
  */
4793
5192
  accepted_count: number;
4794
5193
  };
5194
+ /**
5195
+ * The settings Bird applied to this message. Every option is reported, whether you set it on the send or took the default that was in force at the time.
5196
+ *
5197
+ */
5198
+ type SmsMessageEffectiveOptions = {
5199
+ /**
5200
+ * Whether Bird replaced characters outside the GSM-7 alphabet in this message's body with their closest equivalent before sending it. When `true`, `text` is the body as sent and `segments` describes that body.
5201
+ *
5202
+ */
5203
+ smart_encoding: boolean;
5204
+ };
4795
5205
  /**
4796
5206
  * Delivery status. `accepted` (the initial status of an outbound send) means Bird accepted the request and it is awaiting handoff to the carrier network. `sent` means it was handed to the carrier and is awaiting a delivery receipt. `delivered` is confirmed delivery. `undelivered` is a non-permanent non-delivery (handset off or unreachable). `failed` is a terminal permanent failure. `rejected` means Bird refused it before it reached the carrier (for example insufficient balance). `expired` means the validity period elapsed without a terminal receipt. `scheduled` means the message is queued to send at a future time and has not been dispatched yet, and `canceled` means a scheduled message was canceled before it was sent. `received` applies to inbound messages.
4797
5207
  *
@@ -4845,6 +5255,11 @@ type SmsMessage = {
4845
5255
  metadata?: {
4846
5256
  [key: string]: unknown;
4847
5257
  };
5258
+ /**
5259
+ * Settings Bird applied to this message, with any option you omitted filled in with the default that was in force when you sent it. Absent on inbound messages, and on outbound messages sent before Bird began recording these settings.
5260
+ *
5261
+ */
5262
+ readonly options?: SmsMessageEffectiveOptions;
4848
5263
  /**
4849
5264
  * How long, in seconds, Bird keeps trying to deliver before the message transitions to `expired`.
4850
5265
  */
@@ -4901,6 +5316,29 @@ type SmsTemplateSend = unknown & {
4901
5316
  [key: string]: unknown;
4902
5317
  };
4903
5318
  };
5319
+ /**
5320
+ * Settings that change how Bird processes this message. Each option applies to this send only; omit one to use its default.
5321
+ *
5322
+ */
5323
+ type SmsSendOptions = {
5324
+ /**
5325
+ * Replace characters outside the GSM-7 alphabet with their closest GSM-7 equivalent before sending: typically curly quotes, dashes, ellipses, fullwidth forms, and non-breaking spaces.
5326
+ *
5327
+ * One such character forces the whole body into `UCS2`, which more than halves the characters that fit in a segment, so replacing them often lowers the segment count and the cost.
5328
+ *
5329
+ * Disabled by default, because it alters the body you composed. The replacement is all-or-nothing: a body that still holds a character outside the alphabet afterwards, such as an emoji or a non-Latin script, is sent exactly as you supplied it. Read the message back to see what was applied: `text` is the body as sent.
5330
+ *
5331
+ */
5332
+ smart_encoding?: boolean;
5333
+ /**
5334
+ * Preview feature: link click tracking. Defaults to `false`. Currently unavailable; setting this to `true` returns `422 SMSUnsupportedFeature`.
5335
+ */
5336
+ track_clicks?: boolean;
5337
+ /**
5338
+ * Preview feature: per-segment price ceiling. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
5339
+ */
5340
+ max_price_per_segment?: number;
5341
+ };
4904
5342
  type SmsMessageSendRequest = unknown & {
4905
5343
  /**
4906
5344
  * Recipient phone number in E.164 format (for example `+15551234567`). One recipient per message.
@@ -4938,6 +5376,11 @@ type SmsMessageSendRequest = unknown & {
4938
5376
  metadata?: {
4939
5377
  [key: string]: unknown;
4940
5378
  };
5379
+ /**
5380
+ * What Bird does to this message on its way out, such as `smart_encoding`. The message being relayed stays at the top level: its recipient, sender, content, and the delivery instructions the carrier acts on.
5381
+ *
5382
+ */
5383
+ options?: SmsSendOptions;
4941
5384
  /**
4942
5385
  * Preview feature: multimedia (MMS) attachments. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
4943
5386
  */
@@ -4975,20 +5418,12 @@ type SmsMessageSendRequest = unknown & {
4975
5418
  * Preview feature: topic-gated sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
4976
5419
  */
4977
5420
  topic_id?: string;
4978
- /**
4979
- * Preview feature: per-segment price ceiling. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
4980
- */
4981
- max_price_per_segment?: number;
4982
5421
  /**
4983
5422
  * Preview feature: per-recipient substitution for batch sends. Currently unavailable; supplying this field returns `422 SMSUnsupportedFeature`.
4984
5423
  */
4985
5424
  personalization?: {
4986
5425
  [key: string]: unknown;
4987
5426
  };
4988
- /**
4989
- * Preview feature: link click tracking. Defaults to `false`. Currently unavailable; setting this to `true` returns `422 SMSUnsupportedFeature`.
4990
- */
4991
- track_clicks?: boolean;
4992
5427
  };
4993
5428
  /**
4994
5429
  * Whether a message was sent from the workspace (`outbound`) or received by it (`inbound`).
@@ -4996,13 +5431,13 @@ type SmsMessageSendRequest = unknown & {
4996
5431
  type MessageDirection = "outbound" | "inbound";
4997
5432
  type AudienceContactsRemoveRequest = {
4998
5433
  /**
4999
- * Contacts to remove from the audience. Removing a contact that is not a member has no effect; duplicate IDs in the list are collapsed. If any ID does not exist in the workspace, the whole request fails with a validation error and no memberships are removed.
5434
+ * Contacts to remove from the audience. Removing a contact that is not a member has no effect. Duplicate IDs in the list are collapsed. If any ID does not exist in the workspace, the whole request fails with a validation error and no memberships are removed.
5000
5435
  */
5001
5436
  contact_ids: Array<ContactId>;
5002
5437
  };
5003
5438
  type AudienceContactsAddRequest = {
5004
5439
  /**
5005
- * Contacts to add to the audience. Adding a contact that is already a member has no effect and keeps its original join time; duplicate IDs in the list are collapsed. If any ID does not exist in the workspace, the whole request fails with a validation error and no contacts are added.
5440
+ * Contacts to add to the audience. Adding a contact that is already a member has no effect and keeps its original join time. Duplicate IDs in the list are collapsed. If any ID does not exist in the workspace, the whole request fails with a validation error and no contacts are added.
5006
5441
  */
5007
5442
  contact_ids: Array<ContactId>;
5008
5443
  };
@@ -5032,7 +5467,7 @@ type Contact = {
5032
5467
  /**
5033
5468
  * The contact's phone number in normalized international form (a leading `+` and four to 15 digits), which may differ from the form it was supplied in. Bird normalizes formatting but does not verify the number against numbering-plan metadata. Unique within the workspace. Carriers recycle disconnected numbers, so a long-stored number can come to belong to someone else; `external_id` is the durable key for your own records. Null when the contact has no phone number.
5034
5469
  */
5035
- phone: string | null;
5470
+ phone_number: string | null;
5036
5471
  /**
5037
5472
  * The contact's first name. Available in broadcast templates as `bird.contact.first_name`.
5038
5473
  */
@@ -5070,7 +5505,7 @@ type AudienceMember = {
5070
5505
  };
5071
5506
  type AudienceUpdateRequest = {
5072
5507
  /**
5073
- * New display name for the audience. Omit to keep the current name; the name cannot be cleared, and a whitespace-only value returns a validation error.
5508
+ * New display name for the audience. Omit to keep the current name. The name cannot be cleared, and a whitespace-only value returns a validation error.
5074
5509
  */
5075
5510
  name?: string;
5076
5511
  /**
@@ -5088,10 +5523,9 @@ type AudienceCreateRequest = {
5088
5523
  */
5089
5524
  description?: string;
5090
5525
  /**
5091
- * How the audience's recipients are determined. `static` (the default) is an explicit member list you manage via the API. `dynamic` and `external` are preview values and currently unavailable; creating an audience with either returns a validation error.
5092
- *
5526
+ * How the audience's recipients are determined. `static` is an explicit member list you manage by adding and removing contacts.
5093
5527
  */
5094
- type?: "static" | "dynamic" | "external";
5528
+ type?: "static";
5095
5529
  };
5096
5530
  type ContactPropertyUpdateRequest = {
5097
5531
  /**
@@ -5151,10 +5585,9 @@ type Audience = {
5151
5585
  */
5152
5586
  description?: string | null;
5153
5587
  /**
5154
- * How the audience's recipients are determined. `static` (the default) is an explicit member list you manage via the API. `dynamic` and `external` are preview values and currently unavailable; creating an audience with either returns a validation error.
5155
- *
5588
+ * How the audience's recipients are determined. `static` is an explicit member list you manage by adding and removing contacts.
5156
5589
  */
5157
- type: "static" | "dynamic" | "external";
5590
+ type: "static";
5158
5591
  } & Timestamps;
5159
5592
  type ContactUpdateRequest = {
5160
5593
  /**
@@ -5164,7 +5597,7 @@ type ContactUpdateRequest = {
5164
5597
  /**
5165
5598
  * New phone number for the contact, in E.164 format with the leading `+` and country code. Spaces and punctuation are accepted and stripped. Stored in its canonical form, which may differ from what you send, and unique within the workspace. Omit to keep the current number; set to null to remove it, as long as the contact keeps at least one identifier. An empty string behaves as null.
5166
5599
  */
5167
- phone?: string | null;
5600
+ phone_number?: string | null;
5168
5601
  /**
5169
5602
  * The contact's first name. Set to null to clear.
5170
5603
  */
@@ -5208,7 +5641,7 @@ type ContactUpsertError = {
5208
5641
  /**
5209
5642
  * Which identifier matched a batch entry to an existing contact. Null when the entry created a new contact.
5210
5643
  */
5211
- type ContactMatchedOn = "email" | "phone" | "external_id" | null;
5644
+ type ContactMatchedOn = "email" | "phone_number" | "external_id" | null;
5212
5645
  /**
5213
5646
  * The identifiers a batch entry supplied, in the normalized form they were matched with, null where the entry carried none. An echo of the request row for correlation, never the contact's current state.
5214
5647
  */
@@ -5220,7 +5653,7 @@ type ContactUpsertEntry = {
5220
5653
  /**
5221
5654
  * Phone number this entry carried, in its normalized international form. Null when the entry carried none. A row rejected for an invalid phone echoes the value as sent, trimmed, since no normalized form exists.
5222
5655
  */
5223
- phone: string | null;
5656
+ phone_number: string | null;
5224
5657
  /**
5225
5658
  * Your own identifier for this entry, when the entry supplied one.
5226
5659
  */
@@ -5268,7 +5701,7 @@ type ContactUpsertRequest = {
5268
5701
  /**
5269
5702
  * A contact identifier a batch entry can be matched on.
5270
5703
  */
5271
- type ContactMatchKey = "email" | "phone" | "external_id";
5704
+ type ContactMatchKey = "email" | "phone_number" | "external_id";
5272
5705
  type ContactCreateRequest = {
5273
5706
  /**
5274
5707
  * The contact's email address. Trimmed and lowercased before it is stored and checked for uniqueness. Unique within the workspace. Supply an email address, a phone number, or both.
@@ -5277,7 +5710,7 @@ type ContactCreateRequest = {
5277
5710
  /**
5278
5711
  * The contact's phone number in E.164 format, including the leading `+` and country code. Spaces and punctuation are accepted and stripped; the number is stored in its canonical form, which may differ from what you send, and is unique within the workspace. An empty string is treated as if the field were omitted. Supply an email address, a phone number, or both.
5279
5712
  */
5280
- phone?: string;
5713
+ phone_number?: string;
5281
5714
  /**
5282
5715
  * The contact's first name.
5283
5716
  */
@@ -5299,9 +5732,9 @@ type ContactCreateRequest = {
5299
5732
  };
5300
5733
  };
5301
5734
  /**
5302
- * Which identifier a contact has on file, `email` for an email address or `phone` for a phone number.
5735
+ * Which identifier a contact has on file, `email` for an email address or `phone_number` for a phone number.
5303
5736
  */
5304
- type ContactIdentifierFilter = "email" | "phone";
5737
+ type ContactIdentifierFilter = "email" | "phone_number";
5305
5738
  type EmailMessageBatchResponse = {
5306
5739
  /**
5307
5740
  * One entry per message in the batch, in submission order.
@@ -5328,7 +5761,7 @@ type EmailMessageBatchItem = {
5328
5761
  */
5329
5762
  readonly requested_language?: LanguageTag | null;
5330
5763
  /**
5331
- * The template language this item was actually delivered in, in canonical form. Null when the item used no template. A value here differing from `requested_language` means the template did not carry the language asked for and its `on_missing_language` policy chose this one.
5764
+ * The template language this item was actually delivered in, in canonical form. Null when the item used no template. A value here differing from `requested_language` means the template did not have the language asked for and its `on_missing_language` policy chose this one.
5332
5765
  *
5333
5766
  */
5334
5767
  readonly resolved_language?: LanguageTag | null;
@@ -5358,12 +5791,16 @@ type EmailTemplateSend = unknown & {
5358
5791
  */
5359
5792
  slug?: TemplateSlug;
5360
5793
  /**
5361
- * Which of the template's languages to send. Omit it to send the template's default language, unless the template sets `language_source_required`, in which case a send naming no language is rejected. When the template does not carry the language you ask for, its own `on_missing_language` setting decides whether the closest available language is sent instead or the send is rejected.
5794
+ * Which of the template's languages to send. Omit it to send the template's default language, unless the template sets `language_source_required`, in which case a send naming no language is rejected. When the template does not have the language you ask for, its own `on_missing_language` setting decides whether the closest available language is sent instead or the send is rejected.
5362
5795
  *
5363
5796
  */
5364
5797
  language?: LanguageTag;
5365
5798
  /**
5366
- * Values for the template's parameters, keyed by parameter name. A parameter name is a single word, and every parameter the template's `variables` lists needs a value here: a send that omits one is rejected rather than delivered with a blank. Send everything `variables` lists rather than only what you expect the chosen language to use, since languages need not reference the same parameters and a value no language uses is ignored. Cap: 16 KB serialized.
5799
+ * Values for the template's variables, keyed by the variable name. A variable name is a single word.
5800
+ *
5801
+ * Every variable the template's `variables` lists needs a value here. A send that leaves one out is rejected rather than delivered with a blank in it. Send values for everything in that list rather than only what you expect the language you are sending to use, because languages do not have to use the same variables and a value no language uses is simply ignored.
5802
+ *
5803
+ * `bird` is reserved for the values we fill in ourselves, so a send that sets it is rejected. `parameters` is capped at 16 KB once serialized.
5367
5804
  *
5368
5805
  */
5369
5806
  parameters?: {
@@ -5372,23 +5809,23 @@ type EmailTemplateSend = unknown & {
5372
5809
  };
5373
5810
  type EmailMessageSendRequest = {
5374
5811
  /**
5375
- * Sender address, as a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name. Must be from a verified domain in this workspace.
5812
+ * Sender address, as a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name. Must be from a verified domain in this workspace.
5376
5813
  */
5377
5814
  from: EmailAddressInput;
5378
5815
  /**
5379
- * Primary recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
5816
+ * Primary recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name.
5380
5817
  */
5381
5818
  to: Array<EmailAddressInput>;
5382
5819
  /**
5383
- * CC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
5820
+ * CC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name.
5384
5821
  */
5385
5822
  cc?: Array<EmailAddressInput>;
5386
5823
  /**
5387
- * BCC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
5824
+ * BCC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@acme.com>`), or an object with an optional display name.
5388
5825
  */
5389
5826
  bcc?: Array<EmailAddressInput>;
5390
5827
  /**
5391
- * Message subject line. Required for inline sends; omit it when sending a `template` (the template supplies the subject).
5828
+ * Message subject line. Required for inline sends. Omit it when sending a `template` (the template supplies the subject).
5392
5829
  */
5393
5830
  subject?: string;
5394
5831
  /**
@@ -5400,24 +5837,30 @@ type EmailMessageSendRequest = {
5400
5837
  */
5401
5838
  text?: string;
5402
5839
  /**
5403
- * Reply-To addresses, each a plain email string, an RFC 5322 mailbox string, or an object with an optional display name. RFC 5322 allows multiple. Every recipient reply hits all listed addresses, so 1-2 is typical; the 25 cap exists to prevent runaway header sizes that some MTAs reject.
5840
+ * Reply-To addresses, each a plain email string, an RFC 5322 mailbox string, or an object with an optional display name. RFC 5322 allows multiple. Every recipient reply hits all listed addresses, so 1-2 is typical. The 25 cap exists to prevent header sizes that some receiving mail servers reject.
5404
5841
  *
5405
5842
  */
5406
5843
  reply_to?: Array<EmailAddressInput>;
5407
5844
  /**
5408
- * Custom email headers as key-value pairs (for example `References`, `In-Reply-To`, or your own `X-*` headers). Reserved headers are rejected with a `422`: set the message's addressing and subject through the dedicated fields (`from`, `to`, `cc`, `bcc`, `reply_to`, `subject`) rather than here, and headers the platform generates for you `Content-Type`, `Content-Transfer-Encoding`, `DKIM-Signature`, `Received`, and `Return-Path` cannot be overridden. `List-Unsubscribe` and `List-Unsubscribe-Post` are honored as-is on `transactional` sends; on `marketing` sends the platform sets a compliant unsubscribe header for you, so supplying them there is rejected with a `422`. Header values may not contain carriage-return or line-feed characters.
5845
+ * Custom email headers as key-value pairs (for example `References`, `In-Reply-To`, or your own `X-*` headers). Reserved headers are rejected with a `422`. Set the message's addressing and subject through the dedicated fields (`from`, `to`, `cc`, `bcc`, `reply_to`, `subject`) rather than here, and the headers generated for you automatically (`Content-Type`, `Content-Transfer-Encoding`, `DKIM-Signature`, `Received`, and `Return-Path`) cannot be overridden. `List-Unsubscribe` and `List-Unsubscribe-Post` are honored as-is on `transactional` sends. On a `marketing` send a compliant unsubscribe header is set for you, so supplying either one there is rejected with a `422`. Header values may not contain carriage-return or line-feed characters. Up to 25 headers per send, each value up to 998 characters.
5409
5846
  *
5410
5847
  */
5411
5848
  headers?: {
5412
5849
  [key: string]: string;
5413
5850
  };
5414
5851
  /**
5415
- * Structured `{name, value}` labels for **filtering and analytics**. Tags become first-class query dimensions: filter the list endpoint by tag name, slice analytics rollups by tag, and surface in webhook payloads. Cap: 20 tags per send. Use tags for low-cardinality dimensions (`category`, `experiment_variant`, `template_id`). For arbitrary structured context that you do not need as a filter dimension, use `metadata` instead.
5852
+ * Structured `{name, value}` labels for **filtering and analytics**. Tags become first-class query dimensions:
5853
+ *
5854
+ * - Filter the list endpoint by tag name.
5855
+ * - Slice analytics rollups by tag.
5856
+ * - Surface in webhook payloads.
5857
+ *
5858
+ * Cap: 20 tags per send. Use tags for low-cardinality dimensions (`category`, `experiment_variant`, `template_id`). For arbitrary structured context that you do not need as a filter dimension, use `metadata` instead.
5416
5859
  *
5417
5860
  */
5418
5861
  tags?: Array<Tag>;
5419
5862
  /**
5420
- * Arbitrary JSON object **stored, returned on API reads, and echoed in webhook payloads**. Path-queryable in analytics (e.g. filter on `metadata.order_id`) but not surfaced as a first-class dashboard filter dimension. Cap: 2 KB serialized. Use metadata for per-send context like internal IDs, foreign keys, and structured payloads you want round-tripped through events. For low-cardinality filterable labels, use `tags` instead.
5863
+ * Arbitrary JSON object **stored, returned on API reads, and echoed in webhook payloads**. Path-queryable in analytics (for example, filter on `metadata.order_id`) but not surfaced as a first-class dashboard filter dimension. Cap: 2 KB serialized. Use metadata for per-send context like internal IDs, foreign keys, and structured payloads you want round-tripped through events. For low-cardinality filterable labels, use `tags` instead.
5421
5864
  *
5422
5865
  */
5423
5866
  metadata?: {
@@ -5431,7 +5874,7 @@ type EmailMessageSendRequest = {
5431
5874
  [key: string]: unknown;
5432
5875
  };
5433
5876
  /**
5434
- * Send a stored template instead of inline content. When set, omit `subject`/`html`/`text` the template supplies them; personalize with `template.parameters`.
5877
+ * Send a stored template instead of inline content. When set, omit `subject`, `html` and `text`, because the template supplies them. Personalize with `template.parameters`. A template send goes out immediately: `template` and `scheduled_at` are mutually exclusive, and combining them is rejected with a `422`.
5435
5878
  *
5436
5879
  */
5437
5880
  template?: EmailTemplateSend;
@@ -5449,37 +5892,29 @@ type EmailMessageSendRequest = {
5449
5892
  */
5450
5893
  ip_pool_id?: string;
5451
5894
  /**
5452
- * Content classification. Controls suppression policy: `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions, for receipts, password resets, and similar operational mail. When you send with `template` and omit this field, the message takes the template's own classification, so a template created as `transactional` sends as transactional. Set this field to classify a single send differently from its template; it always takes precedence. Sends that carry no template and no category are `marketing`.
5895
+ * Content classification, which controls suppression policy:
5896
+ *
5897
+ * - `marketing`: Blocks on all suppression reasons.
5898
+ * - `transactional`: Allows delivery through complaint and unsubscribe suppressions, for receipts, password resets, and similar operational mail.
5899
+ *
5900
+ * When you send with `template` and omit this field, the message takes the template's own classification, so a template created as `transactional` sends as transactional. Set this field to classify a single send differently from its template. It always takes precedence. A send with no template and no category defaults to `marketing`.
5453
5901
  *
5454
5902
  */
5455
5903
  category?: EmailMessageCategory;
5456
5904
  /**
5457
- * Preview feature threaded replies. Currently unavailable; supplying this field returns `422 UnsupportedEmailFeature`. When generally available, sets In-Reply-To and References headers automatically.
5458
- */
5459
- in_reply_to_message_id?: EmailId;
5460
- /**
5461
- * File attachments. Bird rejects sends whose estimated generated message size exceeds 20 MB. The estimate is the HTML and text body plus all attachments and inline images measured after base64 encoding. Keep total raw attachment content at or below 15 MB for reliable headroom. In batch sends, this per-message cap still applies and the serialized JSON request body for the whole batch has a hard 20 MB cap. See the EmailAttachment schema for the full field contract.
5905
+ * Files to attach, up to 20 per message. A message can be at most 20 MB once it has been generated, and we refuse a send that would go over. That figure covers the HTML body, the text body and every attachment and inline image, all measured after base64 encoding, which adds roughly a third. So 15 MB of raw files already accounts for most of the budget, and the body competes for the same space. A batch send is held to the same 20 MB per message, and the whole request body is capped at 20 MB as well.
5462
5906
  *
5463
5907
  */
5464
5908
  attachments?: Array<EmailAttachment>;
5465
5909
  /**
5466
- * Schedule the message to send at a future time instead of immediately. Must be at least 30 seconds and at most 30 days ahead outside that range the request is rejected with `422`. The message returns with status `accepted` and shows as `scheduled` on reads until it sends; cancel it before then with the message cancel endpoint. Scheduled sends count against your plan's monthly scheduled-email allowance; exceeding it is rejected with a `422`.
5910
+ * Schedule the message to send at a future time instead of immediately. Must be at least 30 seconds and at most 30 days ahead. Outside that range the request is rejected with `422`. The message returns with status `accepted` and shows as `scheduled` on reads until it sends. Cancel it before then with the message cancel endpoint. Scheduled sends count against your plan's monthly scheduled-email allowance. Exceeding it is rejected with a `422`. A scheduled message has inline content: `scheduled_at` and `template` are mutually exclusive, and combining them is rejected with a `422`. This field is only accepted on a single send, not on a batch item.
5467
5911
  *
5468
5912
  */
5469
5913
  scheduled_at?: string;
5470
- /**
5471
- * Preview feature — contact-targeted sends. Currently unavailable; supplying this field returns `422 UnsupportedEmailFeature`.
5472
- */
5473
- contact_id?: string;
5474
- /**
5475
- * Preview feature — topic-gated sends. Currently unavailable; supplying this field returns `422 UnsupportedEmailFeature`. When generally available, a non-empty `topic_id` gates delivery on the recipient's opt-in state for that topic — if the recipient is opt_out, the send is silently suppressed and an `email.suppressed` event fires with `reason: topic_opt_out`.
5476
- *
5477
- */
5478
- topic_id?: string;
5479
5914
  };
5480
5915
  type EmailAttachmentId = string;
5481
5916
  /**
5482
- * Attachment metadata returned on API reads. The original content is not echoed back inline only the metadata needed for display and audit. To download the raw attachment bytes (while content storage is enabled and within the retention window), use `GET /v1/email/messages/{message_id}/attachments/{attachment_id}`, which returns the file with its own content type and a Content-Disposition filename.
5917
+ * Attachment metadata returned on API reads. The original content is not sent back inline, only the metadata you need to display and audit it. To download the raw attachment bytes (while content storage is enabled and within the retention window), use `GET /v1/email/messages/{message_id}/attachments/{attachment_id}`, which returns the file with its own content type and a Content-Disposition filename.
5483
5918
  *
5484
5919
  */
5485
5920
  type EmailAttachmentRef = {
@@ -5512,19 +5947,20 @@ type EmailAttachmentRef = {
5512
5947
  /**
5513
5948
  * Aggregate delivery status of an email, derived from its recipients' states.
5514
5949
  *
5515
- * In flight: `scheduled` means the message is queued to send at a future time and has
5516
- * not been dispatched yet; `accepted` (the initial status of an immediate send) means
5517
- * Bird has queued the message for its recipients; `processed` means delivery is underway
5518
- * (at least one recipient has been handed to the delivery pipeline and none has failed);
5519
- * `deferred` means at least one recipient's mailbox provider asked Bird to retry and
5520
- * delivery attempts continue.
5950
+ * In flight:
5521
5951
  *
5522
- * Final: `delivered` means every recipient's mail server accepted the message; `bounced`
5523
- * means every recipient permanently failed (bounced or was rejected); `rejected` means
5524
- * every recipient was rejected before a delivery attempt (for example, all recipients
5525
- * suppressed); `partial_failure` means some recipients permanently failed while others
5526
- * were delivered or are still in flight; `canceled` means a scheduled message was
5527
- * canceled before it was sent.
5952
+ * - `scheduled`: The message is queued to send at a future time and has not been dispatched yet.
5953
+ * - `accepted`: The initial status of an immediate send. The message is queued for its recipients.
5954
+ * - `processed`: Delivery is underway, so at least one recipient's message is on its way out and none has failed.
5955
+ * - `deferred`: At least one recipient's mailbox provider asked for a retry, and delivery attempts continue.
5956
+ *
5957
+ * Final:
5958
+ *
5959
+ * - `delivered`: Every recipient's mail server accepted the message.
5960
+ * - `bounced`: Every recipient permanently failed (bounced or was rejected).
5961
+ * - `rejected`: Every recipient was rejected before a delivery attempt (for example, all recipients were suppressed).
5962
+ * - `partial_failure`: Some recipients permanently failed while others were delivered or are still in flight.
5963
+ * - `canceled`: A scheduled message was canceled before it was sent.
5528
5964
  *
5529
5965
  * `complained` takes precedence over every other status: at least one recipient reported
5530
5966
  * the message as spam, regardless of what happened to the rest.
@@ -5541,7 +5977,7 @@ type EmailMessage = {
5541
5977
  */
5542
5978
  from: EmailAddress;
5543
5979
  /**
5544
- * Primary recipients. Length is the recipient count; use the broadcasts endpoint for audience-targeted sends. Each entry's `name` is present when a display name was provided on the send.
5980
+ * Primary recipients. Length is the recipient count. Use the broadcasts endpoint for audience-targeted sends. Each entry's `name` is present when a display name was provided on the send.
5545
5981
  */
5546
5982
  to: Array<EmailAddress>;
5547
5983
  /**
@@ -5562,21 +5998,17 @@ type EmailMessage = {
5562
5998
  * Reply-To addresses, if set on the send. Empty/null when no Reply-To was provided.
5563
5999
  */
5564
6000
  reply_to?: Array<EmailAddress> | null;
5565
- /**
5566
- * Aggregate delivery status derived from recipient states. `scheduled` means the message is queued to send at a future time and has not been dispatched yet. `accepted` means Bird has the send and is preparing to deliver. `processed` means Bird has processed the message and queued it for delivery to the recipient's mail server. `canceled` means a scheduled message was canceled before it was sent.
5567
- *
5568
- */
5569
6001
  readonly status: EmailMessageStatus;
5570
6002
  /**
5571
- * Number of recipients currently in the `accepted` state Bird has the send and is preparing to deliver.
6003
+ * How many recipients are in the `accepted` state, meaning we have the message and are getting ready to deliver it.
5572
6004
  */
5573
6005
  readonly accepted_count: number;
5574
6006
  /**
5575
- * Number of recipients for whom Bird has processed the message and queued it for delivery.
6007
+ * How many recipients the message has been prepared for and queued for delivery.
5576
6008
  */
5577
6009
  readonly processed_count: number;
5578
6010
  /**
5579
- * Number of recipients whose messages were accepted by the remote MTA.
6011
+ * How many recipients' messages were accepted by their mail server.
5580
6012
  */
5581
6013
  readonly delivered_count: number;
5582
6014
  /**
@@ -5588,16 +6020,16 @@ type EmailMessage = {
5588
6020
  */
5589
6021
  readonly complained_count: number;
5590
6022
  /**
5591
- * Number of recipients in transient delivery deferral; the provider is retrying.
6023
+ * Number of recipients in transient delivery deferral. Their mail server asked for a retry, and delivery attempts continue.
5592
6024
  */
5593
6025
  readonly deferred_count: number;
5594
6026
  /**
5595
- * Number of recipients rejected before delivery. See the per-recipient `rejection_reason` field on `GET /v1/email/messages/{message_id}/recipients` for the specific cause (suppression match, transmission failure, generation failure, or policy refusal).
6027
+ * Number of recipients rejected before delivery. Read the per-recipient `rejection_reason` field on `GET /v1/email/messages/{message_id}/recipients` for the specific cause.
5596
6028
  *
5597
6029
  */
5598
6030
  readonly rejected_count: number;
5599
6031
  /**
5600
- * Time between Bird accepting the send and the message being processed for delivery, in milliseconds, for the fastest recipient. Null until the first recipient reaches `processed`.
6032
+ * Time between the send being accepted and the message being prepared for delivery, in milliseconds, for the fastest recipient. Null until the first recipient reaches `processed`.
5601
6033
  *
5602
6034
  */
5603
6035
  readonly processing_latency_ms?: number | null;
@@ -5640,11 +6072,11 @@ type EmailMessage = {
5640
6072
  */
5641
6073
  readonly template_version_id?: EmailTemplateVersionId | null;
5642
6074
  /**
5643
- * Structured `{name, value}` filter labels applied to this send. See EmailMessageSendRequest for the tags vs metadata distinction.
6075
+ * Labels on this message, each one a `name` and a `value`, that you can filter and search messages by. Use tags for anything you want to find messages by later, and `metadata` for data you only want handed back to you.
5644
6076
  */
5645
6077
  tags?: Array<Tag>;
5646
6078
  /**
5647
- * Arbitrary JSON metadata stored on the message object and echoed in webhook payloads. See EmailMessageSendRequest for the tags vs metadata distinction.
6079
+ * Any JSON you kept on the message. We store it and hand it back in webhook payloads, and that is all it does. If you want to search or filter by it, use `tags` instead.
5648
6080
  */
5649
6081
  metadata?: {
5650
6082
  [key: string]: unknown;
@@ -5657,7 +6089,7 @@ type EmailMessage = {
5657
6089
  [key: string]: unknown;
5658
6090
  } | null;
5659
6091
  /**
5660
- * Attachment metadata for the send. Empty when no attachments were included. Raw content is not echoed; when content storage is enabled, download an attachment by its `id` via the message's attachment endpoint.
6092
+ * Attachment metadata for the send. Empty when no attachments were included. Raw content is not echoed. When content storage is enabled, download an attachment by its `id` via the message's attachment endpoint.
5661
6093
  */
5662
6094
  attachments?: Array<EmailAttachmentRef>;
5663
6095
  /**
@@ -5673,7 +6105,7 @@ type EmailMessage = {
5673
6105
  */
5674
6106
  readonly created_at: string;
5675
6107
  /**
5676
- * Thread this message belongs to. Null until threading is enabled.
6108
+ * Thread this message belongs to, or null when the message is not part of one.
5677
6109
  */
5678
6110
  readonly thread_id?: string | null;
5679
6111
  /**
@@ -5835,15 +6267,16 @@ type PublishRealtimeAppEventData = {
5835
6267
  */
5836
6268
  "X-Workspace-Id"?: string;
5837
6269
  /**
5838
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6270
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6271
+ *
5839
6272
  * Two distinct 409 errors signal misuse:
5840
- * - `request_in_progress` (E01004): the same key is currently being
5841
- * processed by a concurrent request. Wait briefly and retry; the lock
5842
- * expires within 30 seconds.
5843
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6273
+ *
6274
+ * - `request_in_progress` (E01004): The same key is currently being
6275
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6276
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
5844
6277
  * against a different request body or method. Generate a new key.
5845
6278
  *
5846
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6279
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
5847
6280
  *
5848
6281
  */
5849
6282
  "Idempotency-Key"?: string;
@@ -5865,15 +6298,16 @@ type PublishRealtimeAppBatchData = {
5865
6298
  */
5866
6299
  "X-Workspace-Id"?: string;
5867
6300
  /**
5868
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6301
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6302
+ *
5869
6303
  * Two distinct 409 errors signal misuse:
5870
- * - `request_in_progress` (E01004): the same key is currently being
5871
- * processed by a concurrent request. Wait briefly and retry; the lock
5872
- * expires within 30 seconds.
5873
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6304
+ *
6305
+ * - `request_in_progress` (E01004): The same key is currently being
6306
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6307
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
5874
6308
  * against a different request body or method. Generate a new key.
5875
6309
  *
5876
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6310
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
5877
6311
  *
5878
6312
  */
5879
6313
  "Idempotency-Key"?: string;
@@ -5947,15 +6381,16 @@ type SendRealtimeAppMemberEventData = {
5947
6381
  */
5948
6382
  "X-Workspace-Id"?: string;
5949
6383
  /**
5950
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6384
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6385
+ *
5951
6386
  * Two distinct 409 errors signal misuse:
5952
- * - `request_in_progress` (E01004): the same key is currently being
5953
- * processed by a concurrent request. Wait briefly and retry; the lock
5954
- * expires within 30 seconds.
5955
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6387
+ *
6388
+ * - `request_in_progress` (E01004): The same key is currently being
6389
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6390
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
5956
6391
  * against a different request body or method. Generate a new key.
5957
6392
  *
5958
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6393
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
5959
6394
  *
5960
6395
  */
5961
6396
  "Idempotency-Key"?: string;
@@ -6002,7 +6437,7 @@ type ListEmailMessagesData = {
6002
6437
  */
6003
6438
  status?: EmailMessageStatus;
6004
6439
  /**
6005
- * Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (e.g. `category:welcome`). Repeat the parameter to AND-combine several tag filters.
6440
+ * Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (for example `category:welcome`). Repeat the parameter to add more tags. A message must match every tag listed to be returned.
6006
6441
  *
6007
6442
  */
6008
6443
  tag?: Array<string>;
@@ -6011,12 +6446,12 @@ type ListEmailMessagesData = {
6011
6446
  */
6012
6447
  category?: EmailMessageCategory;
6013
6448
  /**
6014
- * Filter by recipient address. Exact match against any `to`/`cc`/`bcc` recipient on the message; normalised to lowercase before comparison.
6449
+ * Filter by recipient address. Exact match against any `to`/`cc`/`bcc` recipient on the message. The address is normalized to lowercase before comparison.
6015
6450
  *
6016
6451
  */
6017
6452
  to?: string;
6018
6453
  /**
6019
- * Filter by sender address. Exact match against the message `from` field; normalised to lowercase before comparison.
6454
+ * Filter by sender address. Exact match against the message `from` field. The address is normalized to lowercase before comparison.
6020
6455
  *
6021
6456
  */
6022
6457
  from?: string;
@@ -6034,7 +6469,7 @@ type ListContactsData = {
6034
6469
  /**
6035
6470
  * Return the contact with exactly this phone number in international E.164 form. Encode the leading plus sign as `%2B` (an unencoded `+` arrives as a space and is rejected). Phone numbers are unique within a workspace, so this matches at most one contact. Non-canonical forms of the same number match the contact they canonicalize to; a value that is not a phone number shape, or an empty value, is a validation error, never an unfiltered page.
6036
6471
  */
6037
- phone?: string;
6472
+ phone_number?: string;
6038
6473
  /**
6039
6474
  * Return the contact with exactly this external_id (your own identifier for the contact). Unique within a workspace, so this matches at most one contact. An empty value is a validation error, never an unfiltered page.
6040
6475
  */
@@ -6070,15 +6505,16 @@ type CreateContactData = {
6070
6505
  body: ContactCreateRequest;
6071
6506
  headers?: {
6072
6507
  /**
6073
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6508
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6509
+ *
6074
6510
  * Two distinct 409 errors signal misuse:
6075
- * - `request_in_progress` (E01004): the same key is currently being
6076
- * processed by a concurrent request. Wait briefly and retry; the lock
6077
- * expires within 30 seconds.
6078
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6511
+ *
6512
+ * - `request_in_progress` (E01004): The same key is currently being
6513
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6514
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6079
6515
  * against a different request body or method. Generate a new key.
6080
6516
  *
6081
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6517
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6082
6518
  *
6083
6519
  */
6084
6520
  "Idempotency-Key"?: string;
@@ -6091,15 +6527,16 @@ type CreateContactBatchData = {
6091
6527
  body: ContactUpsertRequest;
6092
6528
  headers?: {
6093
6529
  /**
6094
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6530
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6531
+ *
6095
6532
  * Two distinct 409 errors signal misuse:
6096
- * - `request_in_progress` (E01004): the same key is currently being
6097
- * processed by a concurrent request. Wait briefly and retry; the lock
6098
- * expires within 30 seconds.
6099
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6533
+ *
6534
+ * - `request_in_progress` (E01004): The same key is currently being
6535
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6536
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6100
6537
  * against a different request body or method. Generate a new key.
6101
6538
  *
6102
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6539
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6103
6540
  *
6104
6541
  */
6105
6542
  "Idempotency-Key"?: string;
@@ -6112,15 +6549,16 @@ type UpdateContactData = {
6112
6549
  body: ContactUpdateRequest;
6113
6550
  headers?: {
6114
6551
  /**
6115
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6552
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6553
+ *
6116
6554
  * Two distinct 409 errors signal misuse:
6117
- * - `request_in_progress` (E01004): the same key is currently being
6118
- * processed by a concurrent request. Wait briefly and retry; the lock
6119
- * expires within 30 seconds.
6120
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6555
+ *
6556
+ * - `request_in_progress` (E01004): The same key is currently being
6557
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6558
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6121
6559
  * against a different request body or method. Generate a new key.
6122
6560
  *
6123
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6561
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6124
6562
  *
6125
6563
  */
6126
6564
  "Idempotency-Key"?: string;
@@ -6157,15 +6595,16 @@ type CreateContactPropertyData = {
6157
6595
  body: ContactPropertyCreateRequest;
6158
6596
  headers?: {
6159
6597
  /**
6160
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6598
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6599
+ *
6161
6600
  * Two distinct 409 errors signal misuse:
6162
- * - `request_in_progress` (E01004): the same key is currently being
6163
- * processed by a concurrent request. Wait briefly and retry; the lock
6164
- * expires within 30 seconds.
6165
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6601
+ *
6602
+ * - `request_in_progress` (E01004): The same key is currently being
6603
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6604
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6166
6605
  * against a different request body or method. Generate a new key.
6167
6606
  *
6168
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6607
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6169
6608
  *
6170
6609
  */
6171
6610
  "Idempotency-Key"?: string;
@@ -6178,15 +6617,16 @@ type UpdateContactPropertyData = {
6178
6617
  body: ContactPropertyUpdateRequest;
6179
6618
  headers?: {
6180
6619
  /**
6181
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6620
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6621
+ *
6182
6622
  * Two distinct 409 errors signal misuse:
6183
- * - `request_in_progress` (E01004): the same key is currently being
6184
- * processed by a concurrent request. Wait briefly and retry; the lock
6185
- * expires within 30 seconds.
6186
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6623
+ *
6624
+ * - `request_in_progress` (E01004): The same key is currently being
6625
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6626
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6187
6627
  * against a different request body or method. Generate a new key.
6188
6628
  *
6189
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6629
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6190
6630
  *
6191
6631
  */
6192
6632
  "Idempotency-Key"?: string;
@@ -6227,15 +6667,16 @@ type CreateAudienceData = {
6227
6667
  body: AudienceCreateRequest;
6228
6668
  headers?: {
6229
6669
  /**
6230
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6670
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6671
+ *
6231
6672
  * Two distinct 409 errors signal misuse:
6232
- * - `request_in_progress` (E01004): the same key is currently being
6233
- * processed by a concurrent request. Wait briefly and retry; the lock
6234
- * expires within 30 seconds.
6235
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6673
+ *
6674
+ * - `request_in_progress` (E01004): The same key is currently being
6675
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6676
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6236
6677
  * against a different request body or method. Generate a new key.
6237
6678
  *
6238
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6679
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6239
6680
  *
6240
6681
  */
6241
6682
  "Idempotency-Key"?: string;
@@ -6248,15 +6689,16 @@ type UpdateAudienceData = {
6248
6689
  body: AudienceUpdateRequest;
6249
6690
  headers?: {
6250
6691
  /**
6251
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6692
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6693
+ *
6252
6694
  * Two distinct 409 errors signal misuse:
6253
- * - `request_in_progress` (E01004): the same key is currently being
6254
- * processed by a concurrent request. Wait briefly and retry; the lock
6255
- * expires within 30 seconds.
6256
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6695
+ *
6696
+ * - `request_in_progress` (E01004): The same key is currently being
6697
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6698
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6257
6699
  * against a different request body or method. Generate a new key.
6258
6700
  *
6259
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6701
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6260
6702
  *
6261
6703
  */
6262
6704
  "Idempotency-Key"?: string;
@@ -6302,15 +6744,16 @@ type AssignAudienceContactsData = {
6302
6744
  body: AudienceContactsAddRequest;
6303
6745
  headers?: {
6304
6746
  /**
6305
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6747
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6748
+ *
6306
6749
  * Two distinct 409 errors signal misuse:
6307
- * - `request_in_progress` (E01004): the same key is currently being
6308
- * processed by a concurrent request. Wait briefly and retry; the lock
6309
- * expires within 30 seconds.
6310
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6750
+ *
6751
+ * - `request_in_progress` (E01004): The same key is currently being
6752
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6753
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6311
6754
  * against a different request body or method. Generate a new key.
6312
6755
  *
6313
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6756
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6314
6757
  *
6315
6758
  */
6316
6759
  "Idempotency-Key"?: string;
@@ -6328,15 +6771,16 @@ type UnassignAudienceContactsData = {
6328
6771
  body: AudienceContactsRemoveRequest;
6329
6772
  headers?: {
6330
6773
  /**
6331
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6774
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6775
+ *
6332
6776
  * Two distinct 409 errors signal misuse:
6333
- * - `request_in_progress` (E01004): the same key is currently being
6334
- * processed by a concurrent request. Wait briefly and retry; the lock
6335
- * expires within 30 seconds.
6336
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6777
+ *
6778
+ * - `request_in_progress` (E01004): The same key is currently being
6779
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6780
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6337
6781
  * against a different request body or method. Generate a new key.
6338
6782
  *
6339
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6783
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6340
6784
  *
6341
6785
  */
6342
6786
  "Idempotency-Key"?: string;
@@ -6401,7 +6845,7 @@ type ListSmsMessagesData = {
6401
6845
  */
6402
6846
  from?: string;
6403
6847
  /**
6404
- * Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (e.g. `category:welcome`). Repeat the parameter to AND-combine several tag filters.
6848
+ * Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (for example `category:welcome`). Repeat the parameter to add more tags. A message must match every tag listed to be returned.
6405
6849
  *
6406
6850
  */
6407
6851
  tag?: Array<string>;
@@ -6429,6 +6873,58 @@ type ListSmsTemplatesData = {
6429
6873
  };
6430
6874
  url: "/v1/sms/templates";
6431
6875
  };
6876
+ type CreatePhoneNumberLookupData = {
6877
+ body: PhoneNumberLookupRequest;
6878
+ headers?: {
6879
+ /**
6880
+ * Workspace context. Required for session auth; derived from API key otherwise.
6881
+ */
6882
+ "X-Workspace-Id"?: string;
6883
+ /**
6884
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6885
+ *
6886
+ * Two distinct 409 errors signal misuse:
6887
+ *
6888
+ * - `request_in_progress` (E01004): The same key is currently being
6889
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6890
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6891
+ * against a different request body or method. Generate a new key.
6892
+ *
6893
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6894
+ *
6895
+ */
6896
+ "Idempotency-Key"?: string;
6897
+ };
6898
+ path?: never;
6899
+ query?: never;
6900
+ url: "/v1/lookup/phone-number";
6901
+ };
6902
+ type CreateEmailLookupData = {
6903
+ body: EmailLookupRequest;
6904
+ headers?: {
6905
+ /**
6906
+ * Workspace context. Required for session auth; derived from API key otherwise.
6907
+ */
6908
+ "X-Workspace-Id"?: string;
6909
+ /**
6910
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6911
+ *
6912
+ * Two distinct 409 errors signal misuse:
6913
+ *
6914
+ * - `request_in_progress` (E01004): The same key is currently being
6915
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6916
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6917
+ * against a different request body or method. Generate a new key.
6918
+ *
6919
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6920
+ *
6921
+ */
6922
+ "Idempotency-Key"?: string;
6923
+ };
6924
+ path?: never;
6925
+ query?: never;
6926
+ url: "/v1/lookup/email";
6927
+ };
6432
6928
  type CreateVerificationData = {
6433
6929
  body: VerificationCreateRequest;
6434
6930
  headers?: {
@@ -6437,15 +6933,16 @@ type CreateVerificationData = {
6437
6933
  */
6438
6934
  "X-Workspace-Id"?: string;
6439
6935
  /**
6440
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6936
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6937
+ *
6441
6938
  * Two distinct 409 errors signal misuse:
6442
- * - `request_in_progress` (E01004): the same key is currently being
6443
- * processed by a concurrent request. Wait briefly and retry; the lock
6444
- * expires within 30 seconds.
6445
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6939
+ *
6940
+ * - `request_in_progress` (E01004): The same key is currently being
6941
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6942
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6446
6943
  * against a different request body or method. Generate a new key.
6447
6944
  *
6448
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6945
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6449
6946
  *
6450
6947
  */
6451
6948
  "Idempotency-Key"?: string;
@@ -6462,15 +6959,16 @@ type CreateVerificationCheckData = {
6462
6959
  */
6463
6960
  "X-Workspace-Id"?: string;
6464
6961
  /**
6465
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6962
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6963
+ *
6466
6964
  * Two distinct 409 errors signal misuse:
6467
- * - `request_in_progress` (E01004): the same key is currently being
6468
- * processed by a concurrent request. Wait briefly and retry; the lock
6469
- * expires within 30 seconds.
6470
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6965
+ *
6966
+ * - `request_in_progress` (E01004): The same key is currently being
6967
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6968
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6471
6969
  * against a different request body or method. Generate a new key.
6472
6970
  *
6473
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6971
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6474
6972
  *
6475
6973
  */
6476
6974
  "Idempotency-Key"?: string;
@@ -6487,15 +6985,16 @@ type CreateVerificationNextChannelData = {
6487
6985
  */
6488
6986
  "X-Workspace-Id"?: string;
6489
6987
  /**
6490
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
6988
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
6989
+ *
6491
6990
  * Two distinct 409 errors signal misuse:
6492
- * - `request_in_progress` (E01004): the same key is currently being
6493
- * processed by a concurrent request. Wait briefly and retry; the lock
6494
- * expires within 30 seconds.
6495
- * - `idempotency_key_reuse` (E01005): the same key has already completed
6991
+ *
6992
+ * - `request_in_progress` (E01004): The same key is currently being
6993
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
6994
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
6496
6995
  * against a different request body or method. Generate a new key.
6497
6996
  *
6498
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
6997
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
6499
6998
  *
6500
6999
  */
6501
7000
  "Idempotency-Key"?: string;
@@ -6550,7 +7049,7 @@ type ListWhatsAppMessagesData = {
6550
7049
  */
6551
7050
  category?: WhatsAppTemplateCategory$1;
6552
7051
  /**
6553
- * Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (e.g. `category:welcome`). Repeat the parameter to AND-combine several tag filters.
7052
+ * Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (for example `category:welcome`). Repeat the parameter to add more tags. A message must match every tag listed to be returned.
6554
7053
  *
6555
7054
  */
6556
7055
  tag?: Array<string>;
@@ -6677,7 +7176,7 @@ type GetEmailStatsByTagData = {
6677
7176
  path?: never;
6678
7177
  query?: {
6679
7178
  /**
6680
- * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to 29 days before `to`, keeping the defaulted window within the 720-hour trend cap.
7179
+ * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.
6681
7180
  */
6682
7181
  from?: string;
6683
7182
  /**
@@ -6690,11 +7189,11 @@ type GetEmailStatsByTagData = {
6690
7189
  */
6691
7190
  timezone?: string;
6692
7191
  /**
6693
- * Not supported on breakdown endpoints; supplying it returns 422. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.
7192
+ * Not supported on breakdown endpoints. Supplying it returns 422. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.
6694
7193
  */
6695
7194
  category?: string;
6696
7195
  /**
6697
- * Metric to rank rows by, applied descending. Any count or rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `processed`.
7196
+ * Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `processed`.
6698
7197
  *
6699
7198
  */
6700
7199
  sort?: EmailStatsSortMetric;
@@ -6703,7 +7202,7 @@ type GetEmailStatsByTagData = {
6703
7202
  */
6704
7203
  limit?: number;
6705
7204
  /**
6706
- * When true, each row also carries a `trend` array: a short per-bucket series of that row's delivery and engagement rates over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422. When `from` is omitted and `trend_grain=hourly`, the default window is 30 days (720 hours), so a request built entirely from defaults always fits the cap.
7205
+ * When true, each row also gets a `trend` array: a short per-bucket series showing that tag's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a 422. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.
6707
7206
  *
6708
7207
  */
6709
7208
  include_trend?: boolean;
@@ -6775,7 +7274,7 @@ type GetEmailStatsBySendingIpData = {
6775
7274
  path?: never;
6776
7275
  query?: {
6777
7276
  /**
6778
- * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to 29 days before `to`, keeping the defaulted window within the 720-hour trend cap.
7277
+ * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.
6779
7278
  */
6780
7279
  from?: string;
6781
7280
  /**
@@ -6788,11 +7287,11 @@ type GetEmailStatsBySendingIpData = {
6788
7287
  */
6789
7288
  timezone?: string;
6790
7289
  /**
6791
- * Not supported on breakdown endpoints; supplying it returns 422. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.
7290
+ * Not supported on breakdown endpoints. Supplying it returns 422. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.
6792
7291
  */
6793
7292
  category?: string;
6794
7293
  /**
6795
- * Metric to rank IPs by, applied descending. `bounces.block` surfaces the IPs whose reputation is most likely degraded. Rows whose rate is undefined (zero denominator) sort last. Defaults to `delivered`. Engagement metrics (a sending IP carries no engagement), `processed`, `rejected`, and `oob_bounces` are not sortable here.
7294
+ * Metric to rank IPs by, applied descending. Sorting by `bounces.block` puts the IPs whose reputation is most likely degraded at the top. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `delivered`. A sending IP has no engagement, so engagement metrics aren't sortable here, and neither are `processed`, `rejected`, or `oob_bounces`.
6796
7295
  *
6797
7296
  */
6798
7297
  sort?: "delivered" | "bounced" | "complained" | "deferred" | "bounces.hard" | "bounces.soft" | "bounces.admin" | "bounces.block" | "bounces.undetermined" | "delivery_rate" | "bounce_rate" | "complaint_rate" | "bounces.hard_rate" | "bounces.soft_rate" | "bounces.admin_rate" | "bounces.block_rate" | "bounces.undetermined_rate";
@@ -6801,7 +7300,7 @@ type GetEmailStatsBySendingIpData = {
6801
7300
  */
6802
7301
  limit?: number;
6803
7302
  /**
6804
- * When true, each row also carries a `trend` array: a short per-bucket series of that IP's delivery rates over the window (per-IP rows have no engagement, so each trend point's open and click rates read 0 in buckets that had deliveries and null in buckets that had none). Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422. When `from` is omitted and `trend_grain=hourly`, the default window is 30 days (720 hours), so a request built entirely from defaults always fits the cap.
7303
+ * When true, each row also gets a `trend` array: a short per-bucket series showing that IP's delivery rates over the window. A trend point's open and click rates read `0` in a bucket that had deliveries and `null` in one that had none, because a sending IP has no engagement data. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a 422. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.
6805
7304
  *
6806
7305
  */
6807
7306
  include_trend?: boolean;
@@ -6817,7 +7316,7 @@ type GetEmailStatsBySendingDomainData = {
6817
7316
  path?: never;
6818
7317
  query?: {
6819
7318
  /**
6820
- * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to 29 days before `to`, keeping the defaulted window within the 720-hour trend cap.
7319
+ * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.
6821
7320
  */
6822
7321
  from?: string;
6823
7322
  /**
@@ -6830,11 +7329,11 @@ type GetEmailStatsBySendingDomainData = {
6830
7329
  */
6831
7330
  timezone?: string;
6832
7331
  /**
6833
- * Not supported on breakdown endpoints; supplying it returns 422. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.
7332
+ * Not supported on breakdown endpoints. Supplying it returns 422. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.
6834
7333
  */
6835
7334
  category?: string;
6836
7335
  /**
6837
- * Metric to rank rows by, applied descending. Any count or rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `processed`.
7336
+ * Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `processed`.
6838
7337
  *
6839
7338
  */
6840
7339
  sort?: EmailStatsSortMetric;
@@ -6843,7 +7342,7 @@ type GetEmailStatsBySendingDomainData = {
6843
7342
  */
6844
7343
  limit?: number;
6845
7344
  /**
6846
- * When true, each row also carries a `trend` array: a short per-bucket series of that row's delivery and engagement rates over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422. When `from` is omitted and `trend_grain=hourly`, the default window is 30 days (720 hours), so a request built entirely from defaults always fits the cap.
7345
+ * When true, each row also gets a `trend` array: a short per-bucket series showing that domain's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a 422. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.
6847
7346
  *
6848
7347
  */
6849
7348
  include_trend?: boolean;
@@ -6859,7 +7358,7 @@ type GetEmailStatsByCategoryData = {
6859
7358
  path?: never;
6860
7359
  query?: {
6861
7360
  /**
6862
- * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to 29 days before `to`, keeping the defaulted window within the 720-hour trend cap.
7361
+ * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.
6863
7362
  */
6864
7363
  from?: string;
6865
7364
  /**
@@ -6872,7 +7371,7 @@ type GetEmailStatsByCategoryData = {
6872
7371
  */
6873
7372
  timezone?: string;
6874
7373
  /**
6875
- * Metric to rank rows by, applied descending. Any count or rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `processed`.
7374
+ * Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `processed`.
6876
7375
  *
6877
7376
  */
6878
7377
  sort?: EmailStatsSortMetric;
@@ -6881,7 +7380,7 @@ type GetEmailStatsByCategoryData = {
6881
7380
  */
6882
7381
  limit?: number;
6883
7382
  /**
6884
- * When true, each row also carries a `trend` array: a short per-bucket series of that category's delivery and engagement rates over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422. When `from` is omitted and `trend_grain=hourly`, the default window is 30 days (720 hours), so a request built entirely from defaults always fits the cap.
7383
+ * When true, each row also gets a `trend` array: a short per-bucket series showing that category's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a 422. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.
6885
7384
  *
6886
7385
  */
6887
7386
  include_trend?: boolean;
@@ -6897,7 +7396,7 @@ type GetEmailStatsByMailboxProviderData = {
6897
7396
  path?: never;
6898
7397
  query?: {
6899
7398
  /**
6900
- * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to 29 days before `to`, keeping the defaulted window within the 720-hour trend cap.
7399
+ * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.
6901
7400
  */
6902
7401
  from?: string;
6903
7402
  /**
@@ -6914,7 +7413,7 @@ type GetEmailStatsByMailboxProviderData = {
6914
7413
  */
6915
7414
  category?: string;
6916
7415
  /**
6917
- * Metric to rank rows by, applied descending. Any count or rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `delivered`. `processed`, `rejected`, and `oob_bounces` are not part of this breakdown's rows, so they are not sortable here.
7416
+ * Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `delivered`. `processed`, `rejected`, and `oob_bounces` are not part of this breakdown's rows, so they are not sortable here.
6918
7417
  *
6919
7418
  */
6920
7419
  sort?: EmailMailboxProviderSortMetric;
@@ -6923,7 +7422,7 @@ type GetEmailStatsByMailboxProviderData = {
6923
7422
  */
6924
7423
  limit?: number;
6925
7424
  /**
6926
- * When true, each row also carries a `trend` array: a short per-bucket series of that provider's delivery and engagement rates over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422. When `from` is omitted and `trend_grain=hourly`, the default window is 30 days (720 hours), so a request built entirely from defaults always fits the cap.
7425
+ * When true, each row also gets a `trend` array: a short per-bucket series showing that provider's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a 422. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.
6927
7426
  *
6928
7427
  */
6929
7428
  include_trend?: boolean;
@@ -6939,7 +7438,7 @@ type GetEmailStatsByMailboxProviderRegionData = {
6939
7438
  path?: never;
6940
7439
  query?: {
6941
7440
  /**
6942
- * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to 29 days before `to`, keeping the defaulted window within the 720-hour trend cap.
7441
+ * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.
6943
7442
  */
6944
7443
  from?: string;
6945
7444
  /**
@@ -6952,11 +7451,11 @@ type GetEmailStatsByMailboxProviderRegionData = {
6952
7451
  */
6953
7452
  timezone?: string;
6954
7453
  /**
6955
- * Not supported on breakdown endpoints; supplying it returns 422. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.
7454
+ * Not supported on breakdown endpoints. Supplying it returns 422. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.
6956
7455
  */
6957
7456
  category?: string;
6958
7457
  /**
6959
- * Metric to rank rows by, applied descending. Any count or rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `delivered`. `processed`, `rejected`, and `oob_bounces` are not part of this breakdown's rows, so they are not sortable here.
7458
+ * Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `delivered`. `processed`, `rejected`, and `oob_bounces` are not part of this breakdown's rows, so they are not sortable here.
6960
7459
  *
6961
7460
  */
6962
7461
  sort?: EmailMailboxProviderSortMetric;
@@ -6965,7 +7464,7 @@ type GetEmailStatsByMailboxProviderRegionData = {
6965
7464
  */
6966
7465
  limit?: number;
6967
7466
  /**
6968
- * When true, each row also carries a `trend` array: a short per-bucket series of that provider region's delivery and engagement rates over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422. When `from` is omitted and `trend_grain=hourly`, the default window is 30 days (720 hours), so a request built entirely from defaults always fits the cap.
7467
+ * When true, each row also gets a `trend` array: a short per-bucket series showing that provider region's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a 422. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.
6969
7468
  *
6970
7469
  */
6971
7470
  include_trend?: boolean;
@@ -6981,7 +7480,7 @@ type GetEmailStatsByRecipientDomainData = {
6981
7480
  path?: never;
6982
7481
  query?: {
6983
7482
  /**
6984
- * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). Defaults to 30 days before `to` when omitted; with `include_trend=true` and `trend_grain=hourly` the default tightens to 29 days before `to`, keeping the defaulted window within the 720-hour trend cap.
7483
+ * Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted). It defaults to 30 days before `to` when you leave it out. When `include_trend=true` and `trend_grain=hourly`, that default tightens to 29 days before `to` instead, so the defaulted window still fits inside the 720-hour trend cap.
6985
7484
  */
6986
7485
  from?: string;
6987
7486
  /**
@@ -6994,11 +7493,11 @@ type GetEmailStatsByRecipientDomainData = {
6994
7493
  */
6995
7494
  timezone?: string;
6996
7495
  /**
6997
- * Not supported on breakdown endpoints; supplying it returns 422. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.
7496
+ * Not supported on breakdown endpoints. Supplying it returns 422. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.
6998
7497
  */
6999
7498
  category?: string;
7000
7499
  /**
7001
- * Metric to rank rows by, applied descending. Any count or rate in the response may be used; rows whose rate is undefined (zero denominator) sort last. Defaults to `processed`.
7500
+ * Metric to rank rows by, applied descending. Any count or rate in the response can be used. A row whose rate is undefined because its denominator is zero sorts last. It defaults to `processed`.
7002
7501
  *
7003
7502
  */
7004
7503
  sort?: EmailStatsSortMetric;
@@ -7007,7 +7506,7 @@ type GetEmailStatsByRecipientDomainData = {
7007
7506
  */
7008
7507
  limit?: number;
7009
7508
  /**
7010
- * When true, each row also carries a `trend` array: a short per-bucket series of that recipient domain's delivery and engagement rates over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422. When `from` is omitted and `trend_grain=hourly`, the default window is 30 days (720 hours), so a request built entirely from defaults always fits the cap.
7509
+ * When true, each row also gets a `trend` array: a short per-bucket series showing that recipient domain's delivery and engagement rates over the window. This only works when `limit` is 50 or fewer and the window is at most 90 days for `trend_grain=daily` or 720 hours for `trend_grain=hourly`. Ask for more and you get a 422. When you leave `from` out and use `trend_grain=hourly`, the default window tightens to 29 days before `to` (720 hours total), so a request built entirely from defaults always fits inside the cap.
7011
7510
  *
7012
7511
  */
7013
7512
  include_trend?: boolean;
@@ -7049,7 +7548,7 @@ type GetEmailStatsByTemplateData = {
7049
7548
  */
7050
7549
  limit?: number;
7051
7550
  /**
7052
- * When true, each row also carries a `trend` array: a short per-bucket series of that template's delivery and engagement rates over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422. When `from` is omitted and `trend_grain=hourly`, the default window is 30 days (720 hours), so a request built entirely from defaults always fits the cap.
7551
+ * When true, each row also has a `trend` array: a short per-bucket series of that template's delivery and engagement rates over the window. Returned only when `limit` is 50 or fewer and the window is at most 90 days (trend_grain=daily) or 720 hours (trend_grain=hourly); a larger request returns 422. When `from` is omitted and `trend_grain=hourly`, the default start tightens to 29 days before `to`, keeping the window inside 720 hours, so a request built entirely from defaults always fits the cap.
7053
7552
  *
7054
7553
  */
7055
7554
  include_trend?: boolean;
@@ -7087,7 +7586,7 @@ type GetEmailStatsByLocationData = {
7087
7586
  */
7088
7587
  group_by?: "country" | "region" | "city";
7089
7588
  /**
7090
- * Metric to rank rows by, applied descending. Defaults to `unique_opens`. Only engagement counts are sortable; this breakdown has no rates.
7589
+ * Metric to rank rows by, applied descending. It defaults to `unique_opens`. Only engagement counts are sortable. This breakdown has no rates.
7091
7590
  *
7092
7591
  */
7093
7592
  sort?: EmailEngagementSortMetric;
@@ -7125,7 +7624,7 @@ type GetEmailStatsByClientData = {
7125
7624
  */
7126
7625
  group_by?: "email_client" | "os" | "device_type";
7127
7626
  /**
7128
- * Metric to rank rows by, applied descending. Defaults to `unique_opens`. Only engagement counts are sortable; this breakdown has no rates.
7627
+ * Metric to rank rows by, applied descending. It defaults to `unique_opens`. Only engagement counts are sortable. This breakdown has no rates.
7129
7628
  *
7130
7629
  */
7131
7630
  sort?: EmailEngagementSortMetric;
@@ -7154,11 +7653,11 @@ type GetEmailStatsByBounceCodeData = {
7154
7653
  */
7155
7654
  timezone?: string;
7156
7655
  /**
7157
- * Not supported on breakdown endpoints; supplying it returns 422. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.
7656
+ * Not supported on breakdown endpoints. Supplying it returns 422. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.
7158
7657
  */
7159
7658
  category?: string;
7160
7659
  /**
7161
- * Metric to rank rows by, applied descending. Defaults to `bounced`. Only bounce counts are sortable; this breakdown has no rates.
7660
+ * Metric to rank rows by, applied descending. It defaults to `bounced`. Only the bounce counts are sortable here, because this breakdown has no rate fields.
7162
7661
  *
7163
7662
  */
7164
7663
  sort?: "bounced" | "bounces.hard" | "bounces.soft" | "bounces.admin" | "bounces.block" | "bounces.undetermined";
@@ -7187,11 +7686,11 @@ type GetEmailStatsByComplaintTypeData = {
7187
7686
  */
7188
7687
  timezone?: string;
7189
7688
  /**
7190
- * Not supported on breakdown endpoints; supplying it returns 422. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.
7689
+ * Not supported on breakdown endpoints. Supplying it returns 422. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.
7191
7690
  */
7192
7691
  category?: string;
7193
7692
  /**
7194
- * Metric to rank rows by, applied descending. Defaults to `complained`, the only sortable metric for this breakdown.
7693
+ * Metric to rank rows by, applied descending. It defaults to `complained`, the only sortable metric for this breakdown.
7195
7694
  *
7196
7695
  */
7197
7696
  sort?: "complained";
@@ -7215,7 +7714,7 @@ type GetEmailStatsByBroadcastData = {
7215
7714
  */
7216
7715
  to?: string;
7217
7716
  /**
7218
- * Not supported on breakdown endpoints; supplying it returns 422. To compare categories use `GET /v1/email/stats/categories`; the summary, daily, and hourly statistics accept `category` as a filter.
7717
+ * Not supported on breakdown endpoints. Supplying it returns a 422. To compare categories, use `GET /v1/email/stats/categories`. The summary, daily, and hourly statistics accept `category` as a filter.
7219
7718
  */
7220
7719
  category?: string;
7221
7720
  /**
@@ -7270,15 +7769,16 @@ type CreateDomainData = {
7270
7769
  body: DomainCreate;
7271
7770
  headers?: {
7272
7771
  /**
7273
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
7772
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
7773
+ *
7274
7774
  * Two distinct 409 errors signal misuse:
7275
- * - `request_in_progress` (E01004): the same key is currently being
7276
- * processed by a concurrent request. Wait briefly and retry; the lock
7277
- * expires within 30 seconds.
7278
- * - `idempotency_key_reuse` (E01005): the same key has already completed
7775
+ *
7776
+ * - `request_in_progress` (E01004): The same key is currently being
7777
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
7778
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
7279
7779
  * against a different request body or method. Generate a new key.
7280
7780
  *
7281
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
7781
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
7282
7782
  *
7283
7783
  */
7284
7784
  "Idempotency-Key"?: string;
@@ -7291,15 +7791,16 @@ type UpdateDomainData = {
7291
7791
  body: DomainUpdate;
7292
7792
  headers?: {
7293
7793
  /**
7294
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
7794
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
7795
+ *
7295
7796
  * Two distinct 409 errors signal misuse:
7296
- * - `request_in_progress` (E01004): the same key is currently being
7297
- * processed by a concurrent request. Wait briefly and retry; the lock
7298
- * expires within 30 seconds.
7299
- * - `idempotency_key_reuse` (E01005): the same key has already completed
7797
+ *
7798
+ * - `request_in_progress` (E01004): The same key is currently being
7799
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
7800
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
7300
7801
  * against a different request body or method. Generate a new key.
7301
7802
  *
7302
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
7803
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
7303
7804
  *
7304
7805
  */
7305
7806
  "Idempotency-Key"?: string;
@@ -7334,7 +7835,7 @@ type ListMailboxesData = {
7334
7835
  */
7335
7836
  domain?: string;
7336
7837
  /**
7337
- * Include mailboxes deleted within their 30-day restore window. Defaults to false, so only active and suspended mailboxes are returned. Deleted mailboxes carry a non-null `deleted_at`.
7838
+ * Include mailboxes deleted within their 30-day restore window. Defaults to false, so only active and suspended mailboxes are returned. A deleted mailbox has a non-null `deleted_at`.
7338
7839
  */
7339
7840
  include_deleted?: boolean;
7340
7841
  /**
@@ -7356,15 +7857,16 @@ type CreateMailboxData = {
7356
7857
  body: MailboxCreate;
7357
7858
  headers?: {
7358
7859
  /**
7359
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
7860
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
7861
+ *
7360
7862
  * Two distinct 409 errors signal misuse:
7361
- * - `request_in_progress` (E01004): the same key is currently being
7362
- * processed by a concurrent request. Wait briefly and retry; the lock
7363
- * expires within 30 seconds.
7364
- * - `idempotency_key_reuse` (E01005): the same key has already completed
7863
+ *
7864
+ * - `request_in_progress` (E01004): The same key is currently being
7865
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
7866
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
7365
7867
  * against a different request body or method. Generate a new key.
7366
7868
  *
7367
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
7869
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
7368
7870
  *
7369
7871
  */
7370
7872
  "Idempotency-Key"?: string;
@@ -7377,15 +7879,16 @@ type UpdateMailboxData = {
7377
7879
  body: MailboxUpdate;
7378
7880
  headers?: {
7379
7881
  /**
7380
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
7882
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
7883
+ *
7381
7884
  * Two distinct 409 errors signal misuse:
7382
- * - `request_in_progress` (E01004): the same key is currently being
7383
- * processed by a concurrent request. Wait briefly and retry; the lock
7384
- * expires within 30 seconds.
7385
- * - `idempotency_key_reuse` (E01005): the same key has already completed
7885
+ *
7886
+ * - `request_in_progress` (E01004): The same key is currently being
7887
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
7888
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
7386
7889
  * against a different request body or method. Generate a new key.
7387
7890
  *
7388
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
7891
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
7389
7892
  *
7390
7893
  */
7391
7894
  "Idempotency-Key"?: string;
@@ -7398,7 +7901,7 @@ type UpdateMailboxData = {
7398
7901
  };
7399
7902
  query?: {
7400
7903
  /**
7401
- * Required as `true` when lowering `retention_tier`, acknowledging that remembered messages older than the new horizon are deleted.
7904
+ * 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.
7402
7905
  */
7403
7906
  confirm?: boolean;
7404
7907
  };
@@ -7429,7 +7932,7 @@ type GetMailboxStatsData = {
7429
7932
  */
7430
7933
  timezone?: string;
7431
7934
  /**
7432
- * Bucket grain of the series: `day` (default) or `hour`. Echoed back as `period.grain`.
7935
+ * Granularity of the series: `day` (default) or `hour`. Echoed back as `period.grain`.
7433
7936
  *
7434
7937
  */
7435
7938
  granularity?: "day" | "hour";
@@ -7468,15 +7971,16 @@ type CreateMailboxReceiveRuleData = {
7468
7971
  body: ReceiveRuleCreate;
7469
7972
  headers?: {
7470
7973
  /**
7471
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
7974
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
7975
+ *
7472
7976
  * Two distinct 409 errors signal misuse:
7473
- * - `request_in_progress` (E01004): the same key is currently being
7474
- * processed by a concurrent request. Wait briefly and retry; the lock
7475
- * expires within 30 seconds.
7476
- * - `idempotency_key_reuse` (E01005): the same key has already completed
7977
+ *
7978
+ * - `request_in_progress` (E01004): The same key is currently being
7979
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
7980
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
7477
7981
  * against a different request body or method. Generate a new key.
7478
7982
  *
7479
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
7983
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
7480
7984
  *
7481
7985
  */
7482
7986
  "Idempotency-Key"?: string;
@@ -7503,15 +8007,17 @@ type ListEmailThreadsData = {
7503
8007
  */
7504
8008
  contact_id?: ContactId;
7505
8009
  /**
7506
- * Filter to conversations carrying this label. Repeat the parameter to require several only conversations carrying every listed label match. A placement label selects a folder (`inbox`, `archive`, `spam`, `blocked`); a custom label matches conversations in any folder. Defaults to `inbox` when omitted.
8010
+ * Filter to conversations that have this label. Repeat the parameter to ask for more than one: only conversations that have every label you list are returned.
8011
+ *
8012
+ * A placement label picks a folder: `inbox`, `archive`, `spam`, or `blocked`. A custom label matches a conversation in any folder. Leave this out and you get the inbox.
7507
8013
  */
7508
8014
  label?: Array<string>;
7509
8015
  /**
7510
- * When `true`, only conversations with unread messages are returned. This filters on the conversation's unread state, so it combines with `label` for example, unread conversations in the archive. (The `unread` label itself lives on messages, not conversations.)
8016
+ * When `true`, only conversations with unread messages are returned. This filters on the conversation's unread state, so you can combine it with `label`, for example to get unread conversations in the archive. The `unread` label itself lives on messages, not conversations.
7511
8017
  */
7512
8018
  has_unread?: boolean;
7513
8019
  /**
7514
- * Conversations involving this address matches the sender or any recipient, as a case-insensitive contains-match, so a full address or any fragment of one works.
8020
+ * Conversations involving this address, matching the sender or any recipient. The match is case-insensitive and matches on any part of the address, so a fragment works as well as the whole address.
7515
8021
  */
7516
8022
  participant?: string;
7517
8023
  /**
@@ -7545,15 +8051,16 @@ type DeleteEmailThreadData = {
7545
8051
  body?: never;
7546
8052
  headers?: {
7547
8053
  /**
7548
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
8054
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
8055
+ *
7549
8056
  * Two distinct 409 errors signal misuse:
7550
- * - `request_in_progress` (E01004): the same key is currently being
7551
- * processed by a concurrent request. Wait briefly and retry; the lock
7552
- * expires within 30 seconds.
7553
- * - `idempotency_key_reuse` (E01005): the same key has already completed
8057
+ *
8058
+ * - `request_in_progress` (E01004): The same key is currently being
8059
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
8060
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
7554
8061
  * against a different request body or method. Generate a new key.
7555
8062
  *
7556
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
8063
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
7557
8064
  *
7558
8065
  */
7559
8066
  "Idempotency-Key"?: string;
@@ -7576,15 +8083,16 @@ type UpdateEmailThreadData = {
7576
8083
  body: EmailThreadUpdateRequest;
7577
8084
  headers?: {
7578
8085
  /**
7579
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
8086
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
8087
+ *
7580
8088
  * Two distinct 409 errors signal misuse:
7581
- * - `request_in_progress` (E01004): the same key is currently being
7582
- * processed by a concurrent request. Wait briefly and retry; the lock
7583
- * expires within 30 seconds.
7584
- * - `idempotency_key_reuse` (E01005): the same key has already completed
8089
+ *
8090
+ * - `request_in_progress` (E01004): The same key is currently being
8091
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
8092
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
7585
8093
  * against a different request body or method. Generate a new key.
7586
8094
  *
7587
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
8095
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
7588
8096
  *
7589
8097
  */
7590
8098
  "Idempotency-Key"?: string;
@@ -7612,7 +8120,7 @@ type ListEmailThreadMessagesData = {
7612
8120
  */
7613
8121
  direction?: MessageDirection;
7614
8122
  /**
7615
- * Filter to messages carrying this label. `trash` lists trashed messages; any other label `archive`, `spam`, `blocked`, `unread`, or a custom label lists its non-trashed carriers. When omitted, received messages in the inbox and all sent messages are returned.
8123
+ * Filter to messages that have this label. `trash` lists trashed messages. Any other label, whether that is `archive`, `spam`, `blocked`, `unread` or one of your own, lists the messages that have it and are not in the trash. When omitted, received messages in the inbox and all sent messages are returned.
7616
8124
  *
7617
8125
  */
7618
8126
  label?: string;
@@ -7639,15 +8147,16 @@ type ReplyEmailThreadMessageData = {
7639
8147
  body: EmailThreadMessageReplyRequest;
7640
8148
  headers?: {
7641
8149
  /**
7642
- * Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
8150
+ * Client-supplied deduplication key. When present, the original response is replayed for any duplicate request with the same key, within the idempotency window (3 hours by default).
8151
+ *
7643
8152
  * Two distinct 409 errors signal misuse:
7644
- * - `request_in_progress` (E01004): the same key is currently being
7645
- * processed by a concurrent request. Wait briefly and retry; the lock
7646
- * expires within 30 seconds.
7647
- * - `idempotency_key_reuse` (E01005): the same key has already completed
8153
+ *
8154
+ * - `request_in_progress` (E01004): The same key is currently being
8155
+ * processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
8156
+ * - `idempotency_key_reuse` (E01005): The same key has already completed
7648
8157
  * against a different request body or method. Generate a new key.
7649
8158
  *
7650
- * Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
8159
+ * Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
7651
8160
  *
7652
8161
  */
7653
8162
  "Idempotency-Key"?: string;
@@ -8060,7 +8569,7 @@ declare abstract class Resource {
8060
8569
  type EmailListQuery$1 = NonNullable<ListEmailMessagesData["query"]>;
8061
8570
  declare class EmailResourceBase extends Resource {
8062
8571
  /**
8063
- * Fetch one email message by id, with aggregate delivery status and per-state recipient counts. The message body (html, text) is not returned. Per-recipient delivery statuses and the event log are separate sub-resources: GET /v1/email/messages/{message_id}/recipients and GET /v1/email/messages/{message_id}/events.
8572
+ * Fetch one email message by `id`, with aggregate delivery status and per-state recipient counts. The message body (`html`, `text`) is not returned. Per-recipient delivery statuses and the event log are separate sub-resources: `GET /v1/email/messages/{message_id}/recipients` and `GET /v1/email/messages/{message_id}/events`.
8064
8573
  *
8065
8574
  * @example
8066
8575
  * const msg = await bird.email.get("em_abc123");
@@ -8070,7 +8579,7 @@ declare class EmailResourceBase extends Resource {
8070
8579
  */
8071
8580
  get(messageId: string, options?: RequestOptions): APIPromise<EmailMessage>;
8072
8581
  /**
8073
- * List sent email messages, newest first, as a cursor page ({data, next_cursor, …}). Pass next_cursor back as starting_after to fetch the next page. Filter by creation time with the half-open range created_after (inclusive) / created_before (exclusive). For a single UTC day, created_after is that day at 00:00:00Z and created_before is the next day at 00:00:00Z.
8582
+ * List sent email messages, newest first, as a cursor page (`{data, next_cursor, …}`). Pass `next_cursor` back as `starting_after` to fetch the next page. Filter by creation time with the half-open range `created_after` (inclusive) and `created_before` (exclusive). For a single UTC day, `created_after` is that day at 00:00:00Z and `created_before` is the next day at 00:00:00Z.
8074
8583
  *
8075
8584
  * @example
8076
8585
  * for await (const message of bird.email.list({ status: "bounced" })) {
@@ -8079,7 +8588,7 @@ declare class EmailResourceBase extends Resource {
8079
8588
  */
8080
8589
  list(query?: EmailListQuery$1, options?: RequestOptions): PaginatedPromise<EmailMessage>;
8081
8590
  /**
8082
- * Cancel a scheduled email before it sends. Only works while the message is still scheduled (status `scheduled`); once it starts sending, or was already canceled, the call returns a conflict error. Canceling does not return consumed scheduled-send quota.
8591
+ * Cancel a scheduled email before it sends. Only works while the message's `status` is still `scheduled`. Once it starts sending, or was already canceled, the call returns a conflict error. Canceling does not return consumed scheduled-send quota.
8083
8592
  *
8084
8593
  * @example
8085
8594
  * await bird.email.cancel("em_abc123");
@@ -8106,7 +8615,7 @@ type EmailStatsByComplaintTypeQuery = NonNullable<GetEmailStatsByComplaintTypeDa
8106
8615
  type EmailStatsByBroadcastQuery = NonNullable<GetEmailStatsByBroadcastData["query"]>;
8107
8616
  declare class EmailStatsResource extends Resource {
8108
8617
  /**
8109
- * Aggregate email KPIs for one period: sends, delivered, bounces, complaints, opens, clicks, their rates, and latency percentiles. `from`/`to` are both YYYY-MM-DD days or both RFC 3339 instants (hour grain); add `compare=previous_period` for deltas versus the prior window. For a per-day or per-hour series use email_stats_daily or email_stats_hourly.
8618
+ * Aggregate email KPIs for one period: sends, delivered, bounces, complaints, opens, clicks, their rates, and latency percentiles. `from`/`to` are both YYYY-MM-DD days or both RFC 3339 instants (hour grain); add `compare=previous_period` for deltas versus the prior window. For a per-day or per-hour series use `email.stats.daily` or `email.stats.hourly`.
8110
8619
  *
8111
8620
  * @example Summary for a month
8112
8621
  * const s = await bird.email.stats.summary({ from: "2026-05-01", to: "2026-05-31" });
@@ -8114,7 +8623,7 @@ declare class EmailStatsResource extends Resource {
8114
8623
  */
8115
8624
  summary(query?: EmailStatsSummaryQuery, options?: RequestOptions): APIPromise<EmailStatsSummary>;
8116
8625
  /**
8117
- * Per-day email stats series (counts, rates, latency percentiles), gap-filled with zero rows, max 365 days. At most one filter of `category`, `sending_domain`, `tag`, `sending_ip`, `recipient_domain`, `template`. For hour resolution use email_stats_hourly; for one aggregate row use email_stats_summary.
8626
+ * Per-day email stats series (counts, rates, latency percentiles), gap-filled with zero rows, max 365 days. At most one filter of `category`, `sending_domain`, `tag`, `sending_ip`, `recipient_domain`, `template`. For hour resolution use `email.stats.hourly`; for one aggregate row use `email.stats.summary`.
8118
8627
  *
8119
8628
  * @example
8120
8629
  * const series = await bird.email.stats.daily({ from: "2026-05-01", to: "2026-05-31" });
@@ -8122,7 +8631,7 @@ declare class EmailStatsResource extends Resource {
8122
8631
  */
8123
8632
  daily(query?: EmailStatsDailyQuery, options?: RequestOptions): APIPromise<EmailStatsResponse>;
8124
8633
  /**
8125
- * Per-hour email stats series, gap-filled with zero rows, max 720 hours (30 days). Takes the same single-dimension filters as email_stats_daily; for longer ranges use email_stats_daily, for one aggregate row use email_stats_summary.
8634
+ * Per-hour email stats series, gap-filled with zero rows, max 720 hours (30 days). Takes the same single-dimension filters as `email.stats.daily`; for longer ranges use `email.stats.daily`, for one aggregate row use `email.stats.summary`.
8126
8635
  *
8127
8636
  * @example
8128
8637
  * const series = await bird.email.stats.hourly({ from: "2026-05-01", to: "2026-05-02" });
@@ -8130,7 +8639,7 @@ declare class EmailStatsResource extends Resource {
8130
8639
  */
8131
8640
  hourly(query?: EmailStatsHourlyQuery, options?: RequestOptions): APIPromise<EmailStatsResponse>;
8132
8641
  /**
8133
- * Email delivery and engagement stats grouped by tag, one row per `name:value` pair set at send time; ranked by `sort` (default `processed`). `include_trend=true` adds a per-bucket rate series to each row.
8642
+ * Email delivery and engagement stats grouped by tag, one row per `name:value` pair set at send time. Rows are ranked by `sort`, `processed` by default. Set `include_trend=true` to add a per-bucket rate series to each row.
8134
8643
  *
8135
8644
  * @example Top 10 tags by delivered
8136
8645
  * const { data } = await bird.email.stats.byTag({
@@ -8143,7 +8652,7 @@ declare class EmailStatsResource extends Resource {
8143
8652
  */
8144
8653
  byTag(query?: EmailStatsByTagQuery, options?: RequestOptions): APIPromise<EmailStatsTagsResponse>;
8145
8654
  /**
8146
- * Email delivery and engagement stats grouped by category (`transactional` versus `marketing`), ranked by `sort` (default `processed`). `include_trend=true` adds a per-bucket rate series to each row.
8655
+ * Email delivery and engagement stats grouped by category, meaning `transactional` compared with `marketing`. Rows are ranked by `sort`, `processed` by default. Set `include_trend=true` to add a per-bucket rate series to each row.
8147
8656
  *
8148
8657
  * @example
8149
8658
  * const { data } = await bird.email.stats.byCategory({ from: "2026-05-01", to: "2026-05-31" });
@@ -8151,7 +8660,7 @@ declare class EmailStatsResource extends Resource {
8151
8660
  */
8152
8661
  byCategory(query?: EmailStatsByCategoryQuery, options?: RequestOptions): APIPromise<EmailStatsByCategoryResponse>;
8153
8662
  /**
8154
- * Delivery and bounce stats grouped by sending IP; `sort=bounces.block` surfaces reputation-damaged IPs first. No engagement, complaint, or accepted/processed counts per IP; use email_stats_daily for workspace-wide figures.
8663
+ * Delivery and bounce stats grouped by sending IP, with deferral counts alongside them. `sort=bounces.block` surfaces reputation-damaged IPs first. Engagement, accepted, and processed counts aren't available per IP, and complaint and out-of-band bounce counts always read 0 here. For workspace-wide figures, use `email.stats.daily`.
8155
8664
  *
8156
8665
  * @example
8157
8666
  * const { data } = await bird.email.stats.bySendingIp({
@@ -8164,7 +8673,7 @@ declare class EmailStatsResource extends Resource {
8164
8673
  */
8165
8674
  bySendingIp(query?: EmailStatsBySendingIpQuery, options?: RequestOptions): APIPromise<EmailStatsBySendingIpResponse>;
8166
8675
  /**
8167
- * Email delivery and engagement stats grouped by sending (`From`) domain; compare deliverability across the workspace's verified domains. For per-IP reputation use email_stats_by_sending_ip.
8676
+ * Email delivery and engagement stats grouped by sending (`From`) domain, so you can compare deliverability across your workspace's verified domains. For per-IP reputation instead, use `email.stats.by_sending_ip`.
8168
8677
  *
8169
8678
  * @example
8170
8679
  * const { data } = await bird.email.stats.bySendingDomain({
@@ -8177,7 +8686,7 @@ declare class EmailStatsResource extends Resource {
8177
8686
  */
8178
8687
  bySendingDomain(query?: EmailStatsBySendingDomainQuery, options?: RequestOptions): APIPromise<EmailStatsBySendingDomainResponse>;
8179
8688
  /**
8180
- * Email delivery and engagement stats grouped by exact recipient mailbox domain (for example `gmail.com`). Finer-grained than email_stats_by_mailbox_provider, which buckets domains into providers.
8689
+ * Email delivery and engagement stats grouped by exact recipient mailbox domain, for example `gmail.com`. Finer-grained than `email.stats.by_mailbox_provider`, which buckets domains into providers.
8181
8690
  *
8182
8691
  * @example
8183
8692
  * const { data } = await bird.email.stats.byRecipientDomain({
@@ -8190,7 +8699,7 @@ declare class EmailStatsResource extends Resource {
8190
8699
  */
8191
8700
  byRecipientDomain(query?: EmailStatsByRecipientDomainQuery, options?: RequestOptions): APIPromise<EmailStatsByRecipientDomainResponse>;
8192
8701
  /**
8193
- * Email delivery and engagement stats grouped by recipient mailbox provider (`gmail`, `microsoft`, `yahoo`, ...); covers the delivery stage onward, no accepted/processed counts. For a per-region split use email_stats_by_mailbox_provider_region; for exact destination domains use email_stats_by_recipient_domain.
8702
+ * Email delivery and engagement stats grouped by recipient mailbox provider, for example `gmail`, `microsoft`, or `yahoo`. It covers the delivery stage onward, so there are no accepted or processed counts. For a per-region split within a provider, use `email.stats.by_mailbox_provider_region`; for exact destination domains instead, use `email.stats.by_recipient_domain`.
8194
8703
  *
8195
8704
  * @example
8196
8705
  * const { data } = await bird.email.stats.byMailboxProvider({
@@ -8202,7 +8711,7 @@ declare class EmailStatsResource extends Resource {
8202
8711
  */
8203
8712
  byMailboxProvider(query?: EmailStatsByMailboxProviderQuery, options?: RequestOptions): APIPromise<EmailStatsByMailboxProviderResponse>;
8204
8713
  /**
8205
- * Email delivery and engagement stats grouped by mailbox provider and provider region pair (for example `gmail` in `NA`); covers the delivery stage onward, no accepted/processed counts. For the provider-level view use email_stats_by_mailbox_provider.
8714
+ * Email delivery and engagement stats grouped by a mailbox provider and provider region pair, for example `gmail` in `NA`. It covers the delivery stage onward, so there are no accepted or processed counts. For the provider-level view without the region split, use `email.stats.by_mailbox_provider`.
8206
8715
  *
8207
8716
  * @example
8208
8717
  * const { data } = await bird.email.stats.byMailboxProviderRegion({
@@ -8214,7 +8723,7 @@ declare class EmailStatsResource extends Resource {
8214
8723
  */
8215
8724
  byMailboxProviderRegion(query?: EmailStatsByMailboxProviderRegionQuery, options?: RequestOptions): APIPromise<EmailStatsByMailboxProviderRegionResponse>;
8216
8725
  /**
8217
- * Email delivery and engagement stats grouped by the template used at send time, keyed by template id (`emt_…`); only templated sends appear. A single template's trend over time comes from email_stats_daily with its `template` filter.
8726
+ * Email delivery and engagement stats grouped by the template used at send time, keyed by template id (`emt_…`); only templated sends appear. A single template's trend over time comes from `email.stats.daily` with its `template` filter.
8218
8727
  *
8219
8728
  * @example
8220
8729
  * const { data } = await bird.email.stats.byTemplate({
@@ -8227,7 +8736,7 @@ declare class EmailStatsResource extends Resource {
8227
8736
  */
8228
8737
  byTemplate(query?: EmailStatsByTemplateQuery, options?: RequestOptions): APIPromise<EmailStatsByTemplateResponse>;
8229
8738
  /**
8230
- * Opens and clicks grouped by country, region, or city (`group_by`); engagement counts only, no delivery counts or rates. For engagement by mail client or device use email_stats_by_client.
8739
+ * Opens and clicks grouped by country, region, or city, whichever you choose with `group_by`. It only has engagement counts, no delivery counts or rates. For engagement grouped by mail client or device instead, use `email.stats.by_client`.
8231
8740
  *
8232
8741
  * @example
8233
8742
  * const { data } = await bird.email.stats.byLocation({
@@ -8239,7 +8748,7 @@ declare class EmailStatsResource extends Resource {
8239
8748
  */
8240
8749
  byLocation(query?: EmailStatsByLocationQuery, options?: RequestOptions): APIPromise<EmailStatsByLocationResponse>;
8241
8750
  /**
8242
- * Opens and clicks grouped by mail client, OS, or device type (`group_by`); engagement counts only, no delivery counts or rates. For engagement by geography use email_stats_by_location.
8751
+ * Opens and clicks grouped by mail client, operating system, or device type, whichever you choose with `group_by`. It only has engagement counts, no delivery counts or rates. For engagement grouped by geography instead, use `email.stats.by_location`.
8243
8752
  *
8244
8753
  * @example
8245
8754
  * const { data } = await bird.email.stats.byClient({
@@ -8251,7 +8760,7 @@ declare class EmailStatsResource extends Resource {
8251
8760
  */
8252
8761
  byClient(query?: EmailStatsByClientQuery, options?: RequestOptions): APIPromise<EmailStatsByClientResponse>;
8253
8762
  /**
8254
- * Bounce counts grouped by the SMTP error code the receiving server returned, with the hard/soft/admin/block/undetermined split; failure side only. It shows what is driving bounces, while bounces by destination come from email_stats_by_recipient_domain or email_stats_by_mailbox_provider.
8763
+ * Bounce counts grouped by the SMTP error code the receiving mail server returned. Each row also breaks the bounce down into its hard, soft, admin, block, and undetermined split. There are no delivered, open, or click counts here, because a bounce code only appears on a bounce event. For bounces broken down by destination instead, use `email.stats.by_recipient_domain` or `email.stats.by_mailbox_provider`.
8255
8764
  *
8256
8765
  * @example
8257
8766
  * const { data } = await bird.email.stats.byBounceCode({
@@ -8264,7 +8773,7 @@ declare class EmailStatsResource extends Resource {
8264
8773
  */
8265
8774
  byBounceCode(query?: EmailStatsByBounceCodeQuery, options?: RequestOptions): APIPromise<EmailStatsByBounceCodeResponse>;
8266
8775
  /**
8267
- * Spam-complaint counts grouped by the feedback-loop complaint type (for example `abuse`, `fraud`, `virus`); complaint side only. For complaints by destination use email_stats_by_mailbox_provider or email_stats_by_recipient_domain.
8776
+ * Spam-complaint counts grouped by the feedback-loop complaint type, for example `abuse`, `fraud`, or `virus`. Complaint side only, so there are no delivery or engagement counts. For complaints broken down by destination instead, use `email.stats.by_mailbox_provider` or `email.stats.by_recipient_domain`.
8268
8777
  *
8269
8778
  * @example
8270
8779
  * const { data } = await bird.email.stats.byComplaintType({ from: "2026-05-01", to: "2026-05-31" });
@@ -8272,7 +8781,7 @@ declare class EmailStatsResource extends Resource {
8272
8781
  */
8273
8782
  byComplaintType(query?: EmailStatsByComplaintTypeQuery, options?: RequestOptions): APIPromise<EmailStatsByComplaintTypeResponse>;
8274
8783
  /**
8275
- * Email delivery and engagement stats grouped by broadcast; only broadcast sends appear. Reflects roughly the last 30 days of activity.
8784
+ * Email delivery and engagement stats grouped by broadcast. Only broadcast sends appear. Reflects roughly the last 30 days of activity.
8276
8785
  *
8277
8786
  * @example
8278
8787
  * const { data } = await bird.email.stats.byBroadcast({
@@ -8303,7 +8812,7 @@ declare class EmailMailboxesResourceBase extends Resource {
8303
8812
  */
8304
8813
  list(query?: EmailMailboxesListQuery, options?: RequestOptions): PaginatedPromise<Mailbox>;
8305
8814
  /**
8306
- * Create a mailbox: a durable agent identity that owns an email address, groups mail into threads, and remembers conversations for its retention tier.
8815
+ * Create a mailbox: a durable agent identity that owns an email address, groups mail into conversations, and remembers conversations for its retention tier.
8307
8816
  *
8308
8817
  * @example Create a mailbox
8309
8818
  * const mailbox = await bird.email.mailboxes.create({ display_name: "Support" });
@@ -8311,7 +8820,7 @@ declare class EmailMailboxesResourceBase extends Resource {
8311
8820
  */
8312
8821
  create(params?: EmailMailboxesCreateParams, options?: RequestOptions): APIPromise<Mailbox>;
8313
8822
  /**
8314
- * Read one mailbox by id. A mailbox deleted within its 30-day restore window is still returned, carrying a non-null `deleted_at`; once that window closes it is gone and this returns 404.
8823
+ * Read one mailbox by ID. A mailbox deleted within its 30-day restore window is still returned, with a non-null `deleted_at`. Once that window closes it is gone and this returns 404.
8315
8824
  *
8316
8825
  * @example Get a mailbox
8317
8826
  * const mailbox = await bird.email.mailboxes.get("mbx_01abc");
@@ -8319,7 +8828,7 @@ declare class EmailMailboxesResourceBase extends Resource {
8319
8828
  */
8320
8829
  get(mailboxId: string, options?: RequestOptions): APIPromise<Mailbox>;
8321
8830
  /**
8322
- * Update a mailbox's display name, reply-to, receive policy, retention tier, IP pool, or metadata. Lowering the retention tier onto remembered messages older than the new horizon requires confirm=true.
8831
+ * Update a mailbox's display name, reply-to, receive policy, retention tier, IP pool, or metadata. Lowering the retention tier requires `confirm=true` when it would delete remembered messages older than the new cutoff.
8323
8832
  *
8324
8833
  * @example Change a mailbox's receive policy
8325
8834
  * const mailbox = await bird.email.mailboxes.update("mbx_01abc", {
@@ -8329,14 +8838,14 @@ declare class EmailMailboxesResourceBase extends Resource {
8329
8838
  */
8330
8839
  update(mailboxId: string, params?: EmailMailboxesUpdateParams, query?: EmailMailboxesUpdateQuery, options?: RequestOptions): APIPromise<Mailbox>;
8331
8840
  /**
8332
- * Delete a mailbox. The address stops receiving immediately and is quarantined; the mailbox and its remembered messages stay restorable for 30 days via the restore endpoint, then are permanently deleted.
8841
+ * Delete a mailbox. The address stops receiving immediately and is quarantined. The mailbox and its remembered messages stay restorable for 30 days through the restore endpoint, then are permanently deleted.
8333
8842
  *
8334
8843
  * @example Delete a mailbox
8335
8844
  * await bird.email.mailboxes.delete("mbx_01abc");
8336
8845
  */
8337
8846
  delete(mailboxId: string, options?: RequestOptions): APIPromise<void>;
8338
8847
  /**
8339
- * Restore a mailbox deleted less than 30 days ago: the address starts receiving again and the remembered messages are back. Past the window the mailbox is permanently deleted and returns 404; a mailbox that is not deleted returns 409.
8848
+ * Restore a mailbox deleted less than 30 days ago: the address starts receiving again and the remembered messages are back. Past the window the mailbox is permanently deleted and returns 404. A mailbox that is not deleted returns 409.
8340
8849
  *
8341
8850
  * @example Restore a deleted mailbox
8342
8851
  * const mailbox = await bird.email.mailboxes.restore("mbx_01abc");
@@ -8344,7 +8853,7 @@ declare class EmailMailboxesResourceBase extends Resource {
8344
8853
  */
8345
8854
  restore(mailboxId: string, options?: RequestOptions): APIPromise<Mailbox>;
8346
8855
  /**
8347
- * Reactivate a suspended mailbox so it can send and receive again and its threads become visible. Fails if your plan does not have room for another active mailbox (or another custom inbox.ai handle); delete an active mailbox or upgrade first. A mailbox that is not suspended returns 409.
8856
+ * Resume a suspended mailbox so it can send and receive again and its conversations become visible. Fails if your plan does not have room for another active mailbox (or another custom inbox.ai handle). Delete an active mailbox or upgrade first. A mailbox that is not suspended returns 409.
8348
8857
  *
8349
8858
  * @example Resume a suspended mailbox
8350
8859
  * const mailbox = await bird.email.mailboxes.resume("mbx_01abc");
@@ -8400,7 +8909,7 @@ declare class EmailMailboxesReceiveRulesResource extends Resource {
8400
8909
  */
8401
8910
  list(mailboxId: string, query?: EmailMailboxesReceiveRulesListQuery, options?: RequestOptions): PaginatedPromise<ReceiveRule>;
8402
8911
  /**
8403
- * Add an allow or block rule for a sender address or domain to a mailbox. Block always wins; up to 200 rules per mailbox.
8912
+ * Add an allow or block rule for a sender address or domain to a mailbox. Block always wins. Up to 200 rules per mailbox.
8404
8913
  *
8405
8914
  * @example Block a domain
8406
8915
  * const rule = await bird.email.mailboxes.receiveRules.create("mbx_01abc", {
@@ -8474,7 +8983,7 @@ type EmailThreadsMessagesListQuery = NonNullable<ListEmailThreadMessagesData["qu
8474
8983
  type EmailThreadsMessagesReplyParams = NonNullable<ReplyEmailThreadMessageData["body"]>;
8475
8984
  declare class EmailThreadsMessagesResource extends Resource {
8476
8985
  /**
8477
- * List the messages in a conversation newest first, both directions. Page older messages with starting_after, and pass include=extracted_text to inline each message's durable plain text.
8986
+ * List the messages in a conversation newest first, both directions. Page older messages with starting_after, and pass include=extracted_text to inline each message's extracted plain text.
8478
8987
  *
8479
8988
  * @example List a thread's messages
8480
8989
  * for await (const msg of bird.email.threads.messages.list("thr_01abc")) {
@@ -8483,7 +8992,7 @@ declare class EmailThreadsMessagesResource extends Resource {
8483
8992
  */
8484
8993
  list(threadId: string, query?: EmailThreadsMessagesListQuery, options?: RequestOptions): PaginatedPromise<EmailThreadMessage>;
8485
8994
  /**
8486
- * Get one conversation message with its extracted plain text, readable for the mailbox's full retention period without MIME parsing.
8995
+ * Get one conversation message with its extracted plain text, readable for the mailbox's full retention tier without MIME parsing.
8487
8996
  *
8488
8997
  * @example Get a message
8489
8998
  * const msg = await bird.email.threads.messages.get("thr_01abc", "rem_01xyz");
@@ -8491,7 +9000,7 @@ declare class EmailThreadsMessagesResource extends Resource {
8491
9000
  */
8492
9001
  get(threadId: string, messageId: string, options?: RequestOptions): APIPromise<EmailThreadMessage>;
8493
9002
  /**
8494
- * Get the original rendered HTML and plain-text body of a conversation message. Available 30 days; after that use the message's extracted_text.
9003
+ * Get the original rendered HTML and plain-text body of a conversation message. Available for 30 days. After that, use the message's extracted_text.
8495
9004
  *
8496
9005
  * @example Get a message body
8497
9006
  * const body = await bird.email.threads.messages.body("thr_01abc", "rem_01xyz");
@@ -8509,7 +9018,7 @@ declare class EmailThreadsMessagesResource extends Resource {
8509
9018
  */
8510
9019
  reply(threadId: string, messageId: string, params?: EmailThreadsMessagesReplyParams, options?: RequestOptions): APIPromise<EmailThreadMessage>;
8511
9020
  /**
8512
- * List the attachments on a conversation message. Bytes are downloadable for 30 days; the metadata also rides the message's attachment_manifest durably.
9021
+ * List the attachments on a conversation message. Bytes are downloadable for 30 days, and the metadata stays readable afterward on the message's attachment_manifest.
8513
9022
  *
8514
9023
  * @example List a message's attachments
8515
9024
  * const atts = await bird.email.threads.messages.attachments("thr_01abc", "rem_01xyz");
@@ -8700,7 +9209,7 @@ declare class AudiencesResource extends Resource {
8700
9209
  */
8701
9210
  listContacts(audienceId: string, query?: AudienceListContactsQuery, options?: RequestOptions): PaginatedPromise<AudienceMember>;
8702
9211
  /**
8703
- * Add up to 1,000 existing contacts to a static audience by ID. Fails entirely if any contact ID does not exist.
9212
+ * Add up to 1,000 existing contacts to a static audience by ID. Fails entirely if any contact ID does not exist. To add contacts you have not created yet, use `contacts.batch` with `audience_ids` instead: it matches or creates each contact by email address and assigns it to the audience in one call.
8704
9213
  *
8705
9214
  * @example Add contacts to an audience
8706
9215
  * await bird.audiences.addContacts("adn_01krdgeqcxet5s7t44vh8rt9mg", {
@@ -8768,7 +9277,7 @@ declare class DomainsResource extends Resource {
8768
9277
  */
8769
9278
  verify(domainId: string, options?: RequestOptions): APIPromise<Domain>;
8770
9279
  /**
8771
- * Update a sending domain's tracking and inbound configuration. Tracking: click_tracking and open_tracking apply immediately to new sends, and the tracking domain can be set, changed, or removed (the name part only; Bird appends the sending domain). Enabling either toggle with no tracking domain configured returns 409, and removing the tracking domain while either toggle is still on also returns 409. Tracking-domain changes on a verified domain are staged behind DNS verification, so the current config keeps serving until the new records verify. Inbound receiving: inbound.enabled starts or stops receiving mail for the domain. Enabling requires the domain's DKIM to be verified first (a fresh enable on an unverified domain returns 422), and a domain already receiving inbound for another organization returns 422. The MX records to publish are always listed in dns_records regardless, so receiving starts only once inbound.enabled is set, even when those records are already published.
9280
+ * Update a sending domain's tracking and inbound configuration. Tracking: click_tracking and open_tracking apply immediately to new sends, and the tracking domain can be set, changed, or removed (the name part only, and the sending domain is appended for you). Enabling either toggle with no tracking domain configured returns 409, and removing the tracking domain while either toggle is still on also returns 409. Tracking-domain changes on a verified domain are staged behind DNS verification, so the current config keeps serving until the new records verify. Inbound receiving: inbound.enabled starts or stops receiving mail for the domain. Enabling requires the domain's DKIM to be verified first (a fresh enable on an unverified domain returns 422), and a domain already receiving inbound for another organization returns 422. The MX records to publish are always listed in dns_records regardless, so receiving starts only once inbound.enabled is set, even when those records are already published.
8772
9281
  *
8773
9282
  * @example Enable tracking on a domain
8774
9283
  * await bird.domains.update("dom_01krdgeqcxet5s7t44vh8rt9mg", {
@@ -8848,7 +9357,7 @@ type ContactUpdateParams = NonNullable<UpdateContactData["body"]>;
8848
9357
  type ContactBatchParams = NonNullable<CreateContactBatchData["body"]>;
8849
9358
  declare class ContactsResource extends Resource {
8850
9359
  /**
8851
- * List the workspace's contacts as a cursor page, newest first. Look one up by exact email, phone, or external_id, or search by email, name, or phone substring. Pass include_total for a total count.
9360
+ * List the workspace's contacts as a cursor page, newest first. Look one up by exact email, phone_number, or external_id, or search by email, name, or phone substring. Pass include_total for a total count.
8852
9361
  *
8853
9362
  * @example Iterate every contact, or take one page
8854
9363
  * for await (const contact of bird.contacts.list({ q: "acme.com" })) {
@@ -8858,7 +9367,7 @@ declare class ContactsResource extends Resource {
8858
9367
  */
8859
9368
  list(query?: ContactListQuery, options?: RequestOptions): PaginatedPromise<Contact>;
8860
9369
  /**
8861
- * Get a single contact by ID (`con_`-prefixed). Look up an ID by exact email, phone, or external_id with `contacts.list`.
9370
+ * Get a single contact by ID (`con_`-prefixed). Look up an ID by exact email, phone_number, or external_id with `contacts.list`.
8862
9371
  *
8863
9372
  * @example Fetch a contact by id
8864
9373
  * const contact = await bird.contacts.get("con_01krdgeqcxet5s7t44vh8rt9mg");
@@ -8866,7 +9375,7 @@ declare class ContactsResource extends Resource {
8866
9375
  */
8867
9376
  get(contactId: string, options?: RequestOptions): APIPromise<Contact>;
8868
9377
  /**
8869
- * Create a contact identified by an email address, an E.164 phone number, or both. Fails with a conflict if the email, phone, or external_id is already used by another contact. For bulk import or create-or-update semantics use `contacts.batch`.
9378
+ * Create a contact identified by an email address, an E.164 phone number, or both. Fails with a conflict if the email, phone_number, or external_id is already used by another contact. For bulk import or create-or-update semantics use `contacts.batch`.
8870
9379
  *
8871
9380
  * @example Create a contact
8872
9381
  * const contact = await bird.contacts.create({
@@ -8877,7 +9386,7 @@ declare class ContactsResource extends Resource {
8877
9386
  */
8878
9387
  create(params?: ContactCreateParams, options?: RequestOptions): APIPromise<Contact>;
8879
9388
  /**
8880
- * Update a contact's name, external_id, email, phone, or custom data. Only supplied fields change; custom data keys are merged, with null removing a key. A contact keeps at least one identifier: clearing both email and phone is rejected.
9389
+ * Update a contact's name, external_id, email, phone_number, or custom data. Only supplied fields change; custom data keys are merged, with null removing a key. A contact keeps at least one identifier: clearing both email and phone_number is rejected.
8881
9390
  *
8882
9391
  * @example Change a contact's fields
8883
9392
  * const contact = await bird.contacts.update("con_01krdgeqcxet5s7t44vh8rt9mg", {
@@ -8894,7 +9403,7 @@ declare class ContactsResource extends Resource {
8894
9403
  */
8895
9404
  delete(contactId: string, options?: RequestOptions): APIPromise<void>;
8896
9405
  /**
8897
- * Create or update up to 1,000 contacts in one request, each entry matched automatically against every identifier it supplies (email, phone, external_id) or, with match_on, by that one field only, and optionally add them all to one or more audiences. Per-contact results are returned in submission order.
9406
+ * Create or update up to 1,000 contacts in one request, each entry matched automatically against every identifier it supplies (email, phone_number, external_id) or, with match_on, by that one field only, and optionally add them all to one or more audiences. Per-contact results are returned in submission order.
8898
9407
  *
8899
9408
  * @example Create or update many contacts at once, matched by the identifiers each entry carries
8900
9409
  * const result = await bird.contacts.batch({
@@ -9268,6 +9777,34 @@ declare class RealtimeResource extends RealtimeResourceBase {
9268
9777
  constructor(core: ConstructorParameters<typeof Resource>[0], client: ConstructorParameters<typeof Resource>[1]);
9269
9778
  }
9270
9779
  //#endregion
9780
+ //#region src/resources/lookup.gen.d.ts
9781
+ type LookupPhoneNumberParams = NonNullable<CreatePhoneNumberLookupData["body"]>;
9782
+ type LookupEmailParams = NonNullable<CreateEmailLookupData["body"]>;
9783
+ declare class LookupResource extends Resource {
9784
+ /**
9785
+ * Look up what a phone number is. Returns the serving network, the issuing network, whether the number was ported, its country, and its line type, free with every call. Pass `type` to buy extra blocks: `classification` (the allocated service of the range, from an intelligence source, reported beside the free `line_type` rather than replacing it), `porting` (whether the number ever moved network, when, and its full history), `presence` (reachable on the network right now), `roaming`, `sim_swap` (when the SIM last changed), and `score` (0-100 credibility). Every requested block reports its own status, and only the ones reading `ok` are billed on top of the lookup. Nothing is sent to the number.
9786
+ *
9787
+ * @example Look up a number, buying two extra blocks
9788
+ * const answer = await bird.lookup.phoneNumber({
9789
+ * phone_number: "+31612345678",
9790
+ * type: ["classification", "score"],
9791
+ * });
9792
+ * console.log(answer.country_code, answer.line_type);
9793
+ * // Only a block whose status is ok carries a value, and only that one is billed.
9794
+ * if (answer.score?.status === "ok") console.log(answer.score.value);
9795
+ */
9796
+ phoneNumber(params: LookupPhoneNumberParams, options?: RequestOptions): APIPromise<PhoneNumberLookup>;
9797
+ /**
9798
+ * Look up whether an email address is worth sending to. Returns `result` (the verdict: `valid`; `neutral`, meaning it could not be confirmed either way; `risky`, meaning it will probably accept mail but is likelier than most to bounce or complain; `undeliverable`; or `typo`), `delivery_confidence` (0-100), `flags` (`role`, `disposable`, `free_provider`), `reason` on an undeliverable address (`invalid_syntax`, `invalid_domain`, `invalid_recipient`), and `did_you_mean` when the address looks like a misspelling of a real one. `result` and `reason` are OPEN vocabularies: the values listed here are today's and more may be added, so treat an unrecognized value as a future one rather than an error, falling back on `delivery_confidence`. One address per call. Every answered lookup is billed the same flat amount whatever the verdict, so treat it as a paid call rather than a free check, and use an `Idempotency-Key` so a retry does not buy a second answer. Nothing is sent to the address.
9799
+ *
9800
+ * @example Check whether an address is worth sending to
9801
+ * const answer = await bird.lookup.email({ email: "aisha.khan@example.com" });
9802
+ * // result is an open vocabulary; delivery_confidence is always comparable.
9803
+ * console.log(answer.result, answer.delivery_confidence);
9804
+ */
9805
+ email(params: LookupEmailParams, options?: RequestOptions): APIPromise<EmailLookup>;
9806
+ }
9807
+ //#endregion
9271
9808
  //#region src/client.d.ts
9272
9809
  interface BirdClientOptions {
9273
9810
  apiKey: string;
@@ -9366,6 +9903,8 @@ declare class BirdClient<const O extends BirdClientOptions = BirdClientOptions>
9366
9903
  readonly contactProperties: ContactPropertiesResource;
9367
9904
  /** Sending domains — `bird.domains.create(...)`, `.list(...)`, `.verify(...)`, … */
9368
9905
  readonly domains: DomainsResource;
9906
+ /** Recipient intelligence — `bird.lookup.email(...)`, `.phoneNumber(...)`. Every answer is billed. */
9907
+ readonly lookup: LookupResource;
9369
9908
  /** Webhooks — `bird.webhooks.unwrap(payload, headers)` verifies an inbound delivery. */
9370
9909
  readonly webhooks: WebhooksResource;
9371
9910
  /** Realtime — `bird.realtime.publish(...)`, `.channels.list(...)`, `.members.disconnect(...)`, … */
@@ -9473,6 +10012,66 @@ declare const EmailEventType: {
9473
10012
  };
9474
10013
  /** A known EmailEventType value. */
9475
10014
  type EmailEventTypeValue = (typeof EmailEventType)[keyof typeof EmailEventType];
10015
+ /**
10016
+ * Values of EmailLookupFlag known at this SDK version. The wire value is an open
10017
+ * string: a value added by a newer server deserializes unchanged, so switch on
10018
+ * these with a `default` branch rather than treating the set as closed.
10019
+ */
10020
+ declare const EmailLookupFlag: {
10021
+ readonly Disposable: "disposable";
10022
+ readonly FreeProvider: "free_provider";
10023
+ readonly Role: "role";
10024
+ };
10025
+ /** A known EmailLookupFlag value. */
10026
+ type EmailLookupFlagValue = (typeof EmailLookupFlag)[keyof typeof EmailLookupFlag];
10027
+ /**
10028
+ * Values of EmailLookupReason known at this SDK version. The wire value is an open
10029
+ * string: a value added by a newer server deserializes unchanged, so switch on
10030
+ * these with a `default` branch rather than treating the set as closed.
10031
+ */
10032
+ declare const EmailLookupReason: {
10033
+ readonly InvalidDomain: "invalid_domain";
10034
+ readonly InvalidRecipient: "invalid_recipient";
10035
+ readonly InvalidSyntax: "invalid_syntax";
10036
+ };
10037
+ /** A known EmailLookupReason value. */
10038
+ type EmailLookupReasonValue = (typeof EmailLookupReason)[keyof typeof EmailLookupReason];
10039
+ /**
10040
+ * Values of EmailLookupResult known at this SDK version. The wire value is an open
10041
+ * string: a value added by a newer server deserializes unchanged, so switch on
10042
+ * these with a `default` branch rather than treating the set as closed.
10043
+ */
10044
+ declare const EmailLookupResult: {
10045
+ readonly Neutral: "neutral";
10046
+ readonly Risky: "risky";
10047
+ readonly Typo: "typo";
10048
+ readonly Undeliverable: "undeliverable";
10049
+ readonly Valid: "valid";
10050
+ };
10051
+ /** A known EmailLookupResult value. */
10052
+ type EmailLookupResultValue = (typeof EmailLookupResult)[keyof typeof EmailLookupResult];
10053
+ /**
10054
+ * Values of LookupFlag known at this SDK version. The wire value is an open
10055
+ * string: a value added by a newer server deserializes unchanged, so switch on
10056
+ * these with a `default` branch rather than treating the set as closed.
10057
+ */
10058
+ declare const LookupFlag: {
10059
+ readonly Ported: "ported";
10060
+ };
10061
+ /** A known LookupFlag value. */
10062
+ type LookupFlagValue = (typeof LookupFlag)[keyof typeof LookupFlag];
10063
+ /**
10064
+ * Values of LookupPropertyStatus known at this SDK version. The wire value is an open
10065
+ * string: a value added by a newer server deserializes unchanged, so switch on
10066
+ * these with a `default` branch rather than treating the set as closed.
10067
+ */
10068
+ declare const LookupPropertyStatus: {
10069
+ readonly Inconclusive: "inconclusive";
10070
+ readonly Ok: "ok";
10071
+ readonly Unavailable: "unavailable";
10072
+ };
10073
+ /** A known LookupPropertyStatus value. */
10074
+ type LookupPropertyStatusValue = (typeof LookupPropertyStatus)[keyof typeof LookupPropertyStatus];
9476
10075
  /**
9477
10076
  * Values of SMSErrorCode known at this SDK version. The wire value is an open
9478
10077
  * string: a value added by a newer server deserializes unchanged, so switch on
@@ -9576,5 +10175,5 @@ declare const WhatsAppTemplateParameterType: {
9576
10175
  /** A known WhatsAppTemplateParameterType value. */
9577
10176
  type WhatsAppTemplateParameterTypeValue = (typeof WhatsAppTemplateParameterType)[keyof typeof WhatsAppTemplateParameterType];
9578
10177
  //#endregion
9579
- export { type APIPromise, type Audience, type AudienceAddContactsParams, type AudienceCreateParams, type AudienceListContactsQuery, type AudienceListQuery, type AudienceMember, type AudienceRemoveContactsParams, type AudienceUpdateParams, BirdAPIError, BirdAuthError, BirdBadRequestError, BirdBillingError, BirdClient, type BirdClientOptions, BirdConflictError, BirdConnectionError, BirdError, BirdInternalError, BirdMisdirectedError, BirdNotFoundError, BirdNotImplementedError, BirdPayloadTooLargeError, BirdPermissionError, BirdPreconditionError, BirdRateLimitError, type BirdRequest, type BirdResponse, BirdServiceUnavailableError, BirdTimeoutError, BirdValidationError, type BirdWebhookEvent, BirdWebhookVerificationError, type Contact, type ContactBatchParams, type ContactCreateParams, type ContactListQuery, type ContactProperty, type ContactPropertyCreateParams, type ContactPropertyListQuery, type ContactPropertyUpdateParams, type ContactUpdateParams, type ContactUpsertResult, type CursorPage, type DnsRecord, type Domain, type DomainCapabilities, type DomainCreateParams, type DomainDkim, type DomainListQuery, type DomainUpdateParams, type EmailChannelDefaults, EmailEventType, type EmailEventTypeValue, type EmailListQuery, type EmailMailboxLabelList, type EmailMailboxesCreateParams, type EmailMailboxesListQuery, type EmailMailboxesMessagesCreateParams, type EmailMailboxesReceiveRulesCreateParams, type EmailMailboxesReceiveRulesListQuery, type EmailMailboxesStatsQuery, type EmailMailboxesUpdateParams, type EmailMailboxesUpdateQuery, type EmailMessage, type EmailSendBatchParams, type EmailSendBatchResult, type EmailSendParams, type EmailStatsByBounceCodeQuery, type EmailStatsByBounceCodeResponse, type EmailStatsByBroadcastQuery, type EmailStatsByBroadcastResponse, type EmailStatsByCategoryQuery, type EmailStatsByCategoryResponse, type EmailStatsByClientQuery, type EmailStatsByClientResponse, type EmailStatsByComplaintTypeQuery, type EmailStatsByComplaintTypeResponse, type EmailStatsByLocationQuery, type EmailStatsByLocationResponse, type EmailStatsByMailboxProviderQuery, type EmailStatsByMailboxProviderRegionQuery, type EmailStatsByMailboxProviderRegionResponse, type EmailStatsByMailboxProviderResponse, type EmailStatsByRecipientDomainQuery, type EmailStatsByRecipientDomainResponse, type EmailStatsBySendingDomainQuery, type EmailStatsBySendingDomainResponse, type EmailStatsBySendingIpQuery, type EmailStatsBySendingIpResponse, type EmailStatsByTagQuery, type EmailStatsByTemplateQuery, type EmailStatsByTemplateResponse, type EmailStatsDailyQuery, type EmailStatsHourlyQuery, type EmailStatsResponse, type EmailStatsSummary, type EmailStatsSummaryQuery, type EmailStatsTagsResponse, type EmailThread, type EmailThreadMessage, type EmailThreadMessageAttachmentList, type EmailThreadMessageBody, type EmailThreadsDeleteQuery, type EmailThreadsListQuery, type EmailThreadsMessagesListQuery, type EmailThreadsMessagesReplyParams, type EmailThreadsUpdateParams, type ErrorDetail, type ErrorNextAction, type Mailbox, type MailboxStatsResponse, type PaginatedPromise, type RealtimeBatchPublishResult, type RealtimeChannelGetQuery, type RealtimeChannelInclude, type RealtimeChannelInfo, type RealtimeChannelListItem, type RealtimeChannelListQuery, type RealtimeChannelMember, type RealtimeChannelMembers, type RealtimeChannelsList, type RealtimeOptions, type RealtimePublishBatchParams, type RealtimePublishParams, type RealtimePublishResult, type ReceiveRule, type RequestOptions, SMSErrorCode, type SMSErrorCodeValue, type SafeResult, type SmsListQuery, type SmsMessage, type SmsSendBatchParams, type SmsSendBatchResult, type SmsSendParams, type SmsTemplate, type SmsTemplateList, type SmsTemplateListQuery, type UnmetGate, type Verification, VerificationAttemptFailureReason, type VerificationAttemptFailureReasonValue, VerificationChannel, type VerificationChannelValue, type VerificationCheckResult, VerificationTerminalReason, type VerificationTerminalReasonValue, type VerifyVerificationsCheckParams, type VerifyVerificationsCreateParams, type VerifyVerificationsNextChannelParams, WebhookEventType, type WebhookEventTypeValue, type WebhookHeaders, type WebhookOptions, WhatsAppErrorCode, type WhatsAppErrorCodeValue, type WhatsAppEventList, type WhatsAppMessage, WhatsAppTemplateCategory, type WhatsAppTemplateCategoryValue, WhatsAppTemplateParameterType, type WhatsAppTemplateParameterTypeValue, type WhatsappListEventsQuery, type WhatsappListQuery, type WhatsappSendParams, baseUrlForRegion, regionFromApiKey };
10178
+ export { type APIPromise, type Audience, type AudienceAddContactsParams, type AudienceCreateParams, type AudienceListContactsQuery, type AudienceListQuery, type AudienceMember, type AudienceRemoveContactsParams, type AudienceUpdateParams, BirdAPIError, BirdAuthError, BirdBadRequestError, BirdBillingError, BirdClient, type BirdClientOptions, BirdConflictError, BirdConnectionError, BirdError, BirdInternalError, BirdMisdirectedError, BirdNotFoundError, BirdNotImplementedError, BirdPayloadTooLargeError, BirdPermissionError, BirdPreconditionError, BirdRateLimitError, type BirdRequest, type BirdResponse, BirdServiceUnavailableError, BirdTimeoutError, BirdValidationError, type BirdWebhookEvent, BirdWebhookVerificationError, type Contact, type ContactBatchParams, type ContactCreateParams, type ContactListQuery, type ContactProperty, type ContactPropertyCreateParams, type ContactPropertyListQuery, type ContactPropertyUpdateParams, type ContactUpdateParams, type ContactUpsertResult, type CursorPage, type DnsRecord, type Domain, type DomainCapabilities, type DomainCreateParams, type DomainDkim, type DomainListQuery, type DomainUpdateParams, type EmailChannelDefaults, EmailEventType, type EmailEventTypeValue, type EmailListQuery, type EmailLookup, EmailLookupFlag, type EmailLookupFlagValue, EmailLookupReason, type EmailLookupReasonValue, EmailLookupResult, type EmailLookupResultValue, type EmailMailboxLabelList, type EmailMailboxesCreateParams, type EmailMailboxesListQuery, type EmailMailboxesMessagesCreateParams, type EmailMailboxesReceiveRulesCreateParams, type EmailMailboxesReceiveRulesListQuery, type EmailMailboxesStatsQuery, type EmailMailboxesUpdateParams, type EmailMailboxesUpdateQuery, type EmailMessage, type EmailSendBatchParams, type EmailSendBatchResult, type EmailSendParams, type EmailStatsByBounceCodeQuery, type EmailStatsByBounceCodeResponse, type EmailStatsByBroadcastQuery, type EmailStatsByBroadcastResponse, type EmailStatsByCategoryQuery, type EmailStatsByCategoryResponse, type EmailStatsByClientQuery, type EmailStatsByClientResponse, type EmailStatsByComplaintTypeQuery, type EmailStatsByComplaintTypeResponse, type EmailStatsByLocationQuery, type EmailStatsByLocationResponse, type EmailStatsByMailboxProviderQuery, type EmailStatsByMailboxProviderRegionQuery, type EmailStatsByMailboxProviderRegionResponse, type EmailStatsByMailboxProviderResponse, type EmailStatsByRecipientDomainQuery, type EmailStatsByRecipientDomainResponse, type EmailStatsBySendingDomainQuery, type EmailStatsBySendingDomainResponse, type EmailStatsBySendingIpQuery, type EmailStatsBySendingIpResponse, type EmailStatsByTagQuery, type EmailStatsByTemplateQuery, type EmailStatsByTemplateResponse, type EmailStatsDailyQuery, type EmailStatsHourlyQuery, type EmailStatsResponse, type EmailStatsSummary, type EmailStatsSummaryQuery, type EmailStatsTagsResponse, type EmailThread, type EmailThreadMessage, type EmailThreadMessageAttachmentList, type EmailThreadMessageBody, type EmailThreadsDeleteQuery, type EmailThreadsListQuery, type EmailThreadsMessagesListQuery, type EmailThreadsMessagesReplyParams, type EmailThreadsUpdateParams, type ErrorDetail, type ErrorNextAction, type LookupEmailParams, LookupFlag, type LookupFlagValue, type LookupPhoneNumberParams, LookupPropertyStatus, type LookupPropertyStatusValue, type Mailbox, type MailboxStatsResponse, type PaginatedPromise, type PhoneNumberLookup, type RealtimeBatchPublishResult, type RealtimeChannelGetQuery, type RealtimeChannelInclude, type RealtimeChannelInfo, type RealtimeChannelListItem, type RealtimeChannelListQuery, type RealtimeChannelMember, type RealtimeChannelMembers, type RealtimeChannelsList, type RealtimeOptions, type RealtimePublishBatchParams, type RealtimePublishParams, type RealtimePublishResult, type ReceiveRule, type RequestOptions, SMSErrorCode, type SMSErrorCodeValue, type SafeResult, type SmsListQuery, type SmsMessage, type SmsSendBatchParams, type SmsSendBatchResult, type SmsSendParams, type SmsTemplate, type SmsTemplateList, type SmsTemplateListQuery, type UnmetGate, type Verification, VerificationAttemptFailureReason, type VerificationAttemptFailureReasonValue, VerificationChannel, type VerificationChannelValue, type VerificationCheckResult, VerificationTerminalReason, type VerificationTerminalReasonValue, type VerifyVerificationsCheckParams, type VerifyVerificationsCreateParams, type VerifyVerificationsNextChannelParams, WebhookEventType, type WebhookEventTypeValue, type WebhookHeaders, type WebhookOptions, WhatsAppErrorCode, type WhatsAppErrorCodeValue, type WhatsAppEventList, type WhatsAppMessage, WhatsAppTemplateCategory, type WhatsAppTemplateCategoryValue, WhatsAppTemplateParameterType, type WhatsAppTemplateParameterTypeValue, type WhatsappListEventsQuery, type WhatsappListQuery, type WhatsappSendParams, baseUrlForRegion, regionFromApiKey };
9580
10179
  //# sourceMappingURL=index.d.mts.map