@messagebird/sdk 0.27.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 +1013 -450
- package/dist/index.mjs +312 -115
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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`:
|
|
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`:
|
|
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`:
|
|
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`:
|
|
342
|
+
* - `insufficient_balance`: Your wallet did not cover the call. Top up, or turn
|
|
343
343
|
* on automatic top-ups.
|
|
344
|
-
* - `daily_spend_exceeded`:
|
|
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`:
|
|
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`:
|
|
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`:
|
|
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`:
|
|
355
|
+
* - `no_route_found`: A dial plan is attached, but no rule in it covers this
|
|
356
356
|
* destination.
|
|
357
|
-
* - `destination_blocked`:
|
|
357
|
+
* - `destination_blocked`: The destination is blocked by our routing
|
|
358
358
|
* configuration.
|
|
359
|
-
* - `call_not_permitted`:
|
|
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";
|
|
@@ -1693,7 +1693,17 @@ type EventEmailScheduled = {
|
|
|
1693
1693
|
};
|
|
1694
1694
|
/**
|
|
1695
1695
|
* Why an email was rejected before delivery.
|
|
1696
|
-
*
|
|
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.
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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@
|
|
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@
|
|
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@
|
|
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
|
|
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
|
|
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
|
-
*
|
|
2328
|
-
*
|
|
2329
|
-
*
|
|
2330
|
-
*
|
|
2331
|
-
*
|
|
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
|
-
*
|
|
2369
|
+
* The name the recipient sees on the attachment.
|
|
2337
2370
|
*/
|
|
2338
2371
|
filename: string;
|
|
2339
2372
|
/**
|
|
2340
|
-
*
|
|
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
|
-
*
|
|
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.
|
|
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@
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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.
|
|
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:
|
|
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,
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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).
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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`:
|
|
2810
|
-
* - `delivery`:
|
|
2811
|
-
* - `total`:
|
|
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)
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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`,
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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`:
|
|
3887
|
-
* - `total`:
|
|
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.
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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:
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
|
5094
|
+
* A plain-language description of what values this variable accepts.
|
|
4696
5095
|
*/
|
|
4697
5096
|
readonly constraint: string;
|
|
4698
5097
|
/**
|
|
4699
|
-
* Whether this
|
|
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
|
|
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
|
|
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;
|
|
@@ -5032,13 +5431,13 @@ type SmsMessageSendRequest = unknown & {
|
|
|
5032
5431
|
type MessageDirection = "outbound" | "inbound";
|
|
5033
5432
|
type AudienceContactsRemoveRequest = {
|
|
5034
5433
|
/**
|
|
5035
|
-
* Contacts to remove from the audience. Removing a contact that is not a member has no effect
|
|
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.
|
|
5036
5435
|
*/
|
|
5037
5436
|
contact_ids: Array<ContactId>;
|
|
5038
5437
|
};
|
|
5039
5438
|
type AudienceContactsAddRequest = {
|
|
5040
5439
|
/**
|
|
5041
|
-
* Contacts to add to the audience. Adding a contact that is already a member has no effect and keeps its original join time
|
|
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.
|
|
5042
5441
|
*/
|
|
5043
5442
|
contact_ids: Array<ContactId>;
|
|
5044
5443
|
};
|
|
@@ -5106,7 +5505,7 @@ type AudienceMember = {
|
|
|
5106
5505
|
};
|
|
5107
5506
|
type AudienceUpdateRequest = {
|
|
5108
5507
|
/**
|
|
5109
|
-
* New display name for the audience. Omit to keep the current name
|
|
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.
|
|
5110
5509
|
*/
|
|
5111
5510
|
name?: string;
|
|
5112
5511
|
/**
|
|
@@ -5124,10 +5523,9 @@ type AudienceCreateRequest = {
|
|
|
5124
5523
|
*/
|
|
5125
5524
|
description?: string;
|
|
5126
5525
|
/**
|
|
5127
|
-
* How the audience's recipients are determined. `static`
|
|
5128
|
-
*
|
|
5526
|
+
* How the audience's recipients are determined. `static` is an explicit member list you manage by adding and removing contacts.
|
|
5129
5527
|
*/
|
|
5130
|
-
type?: "static"
|
|
5528
|
+
type?: "static";
|
|
5131
5529
|
};
|
|
5132
5530
|
type ContactPropertyUpdateRequest = {
|
|
5133
5531
|
/**
|
|
@@ -5187,10 +5585,9 @@ type Audience = {
|
|
|
5187
5585
|
*/
|
|
5188
5586
|
description?: string | null;
|
|
5189
5587
|
/**
|
|
5190
|
-
* How the audience's recipients are determined. `static`
|
|
5191
|
-
*
|
|
5588
|
+
* How the audience's recipients are determined. `static` is an explicit member list you manage by adding and removing contacts.
|
|
5192
5589
|
*/
|
|
5193
|
-
type: "static"
|
|
5590
|
+
type: "static";
|
|
5194
5591
|
} & Timestamps;
|
|
5195
5592
|
type ContactUpdateRequest = {
|
|
5196
5593
|
/**
|
|
@@ -5364,7 +5761,7 @@ type EmailMessageBatchItem = {
|
|
|
5364
5761
|
*/
|
|
5365
5762
|
readonly requested_language?: LanguageTag | null;
|
|
5366
5763
|
/**
|
|
5367
|
-
* 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
|
|
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.
|
|
5368
5765
|
*
|
|
5369
5766
|
*/
|
|
5370
5767
|
readonly resolved_language?: LanguageTag | null;
|
|
@@ -5394,12 +5791,16 @@ type EmailTemplateSend = unknown & {
|
|
|
5394
5791
|
*/
|
|
5395
5792
|
slug?: TemplateSlug;
|
|
5396
5793
|
/**
|
|
5397
|
-
* 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
|
|
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.
|
|
5398
5795
|
*
|
|
5399
5796
|
*/
|
|
5400
5797
|
language?: LanguageTag;
|
|
5401
5798
|
/**
|
|
5402
|
-
* Values for the template's
|
|
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.
|
|
5403
5804
|
*
|
|
5404
5805
|
*/
|
|
5405
5806
|
parameters?: {
|
|
@@ -5408,23 +5809,23 @@ type EmailTemplateSend = unknown & {
|
|
|
5408
5809
|
};
|
|
5409
5810
|
type EmailMessageSendRequest = {
|
|
5410
5811
|
/**
|
|
5411
|
-
* Sender address, as a plain email string, an RFC 5322 mailbox string (`Jane <jane@
|
|
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.
|
|
5412
5813
|
*/
|
|
5413
5814
|
from: EmailAddressInput;
|
|
5414
5815
|
/**
|
|
5415
|
-
* Primary recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@
|
|
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.
|
|
5416
5817
|
*/
|
|
5417
5818
|
to: Array<EmailAddressInput>;
|
|
5418
5819
|
/**
|
|
5419
|
-
* CC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@
|
|
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.
|
|
5420
5821
|
*/
|
|
5421
5822
|
cc?: Array<EmailAddressInput>;
|
|
5422
5823
|
/**
|
|
5423
|
-
* BCC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@
|
|
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.
|
|
5424
5825
|
*/
|
|
5425
5826
|
bcc?: Array<EmailAddressInput>;
|
|
5426
5827
|
/**
|
|
5427
|
-
* Message subject line. Required for inline sends
|
|
5828
|
+
* Message subject line. Required for inline sends. Omit it when sending a `template` (the template supplies the subject).
|
|
5428
5829
|
*/
|
|
5429
5830
|
subject?: string;
|
|
5430
5831
|
/**
|
|
@@ -5436,24 +5837,30 @@ type EmailMessageSendRequest = {
|
|
|
5436
5837
|
*/
|
|
5437
5838
|
text?: string;
|
|
5438
5839
|
/**
|
|
5439
|
-
* 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
|
|
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.
|
|
5440
5841
|
*
|
|
5441
5842
|
*/
|
|
5442
5843
|
reply_to?: Array<EmailAddressInput>;
|
|
5443
5844
|
/**
|
|
5444
|
-
* 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
|
|
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.
|
|
5445
5846
|
*
|
|
5446
5847
|
*/
|
|
5447
5848
|
headers?: {
|
|
5448
5849
|
[key: string]: string;
|
|
5449
5850
|
};
|
|
5450
5851
|
/**
|
|
5451
|
-
* Structured `{name, value}` labels for **filtering and analytics**. Tags become first-class query dimensions:
|
|
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.
|
|
5452
5859
|
*
|
|
5453
5860
|
*/
|
|
5454
5861
|
tags?: Array<Tag>;
|
|
5455
5862
|
/**
|
|
5456
|
-
* Arbitrary JSON object **stored, returned on API reads, and echoed in webhook payloads**. Path-queryable in analytics (
|
|
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.
|
|
5457
5864
|
*
|
|
5458
5865
|
*/
|
|
5459
5866
|
metadata?: {
|
|
@@ -5467,7 +5874,7 @@ type EmailMessageSendRequest = {
|
|
|
5467
5874
|
[key: string]: unknown;
|
|
5468
5875
|
};
|
|
5469
5876
|
/**
|
|
5470
|
-
* Send a stored template instead of inline content. When set, omit `subject
|
|
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`.
|
|
5471
5878
|
*
|
|
5472
5879
|
*/
|
|
5473
5880
|
template?: EmailTemplateSend;
|
|
@@ -5485,37 +5892,29 @@ type EmailMessageSendRequest = {
|
|
|
5485
5892
|
*/
|
|
5486
5893
|
ip_pool_id?: string;
|
|
5487
5894
|
/**
|
|
5488
|
-
* Content classification
|
|
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`.
|
|
5489
5901
|
*
|
|
5490
5902
|
*/
|
|
5491
5903
|
category?: EmailMessageCategory;
|
|
5492
5904
|
/**
|
|
5493
|
-
*
|
|
5494
|
-
*/
|
|
5495
|
-
in_reply_to_message_id?: EmailId;
|
|
5496
|
-
/**
|
|
5497
|
-
* 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.
|
|
5498
5906
|
*
|
|
5499
5907
|
*/
|
|
5500
5908
|
attachments?: Array<EmailAttachment>;
|
|
5501
5909
|
/**
|
|
5502
|
-
* Schedule the message to send at a future time instead of immediately. Must be at least 30 seconds and at most 30 days ahead
|
|
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.
|
|
5503
5911
|
*
|
|
5504
5912
|
*/
|
|
5505
5913
|
scheduled_at?: string;
|
|
5506
|
-
/**
|
|
5507
|
-
* Preview feature — contact-targeted sends. Currently unavailable; supplying this field returns `422 UnsupportedEmailFeature`.
|
|
5508
|
-
*/
|
|
5509
|
-
contact_id?: string;
|
|
5510
|
-
/**
|
|
5511
|
-
* 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`.
|
|
5512
|
-
*
|
|
5513
|
-
*/
|
|
5514
|
-
topic_id?: string;
|
|
5515
5914
|
};
|
|
5516
5915
|
type EmailAttachmentId = string;
|
|
5517
5916
|
/**
|
|
5518
|
-
* Attachment metadata returned on API reads. The original content is not
|
|
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.
|
|
5519
5918
|
*
|
|
5520
5919
|
*/
|
|
5521
5920
|
type EmailAttachmentRef = {
|
|
@@ -5548,19 +5947,20 @@ type EmailAttachmentRef = {
|
|
|
5548
5947
|
/**
|
|
5549
5948
|
* Aggregate delivery status of an email, derived from its recipients' states.
|
|
5550
5949
|
*
|
|
5551
|
-
* In flight:
|
|
5552
|
-
*
|
|
5553
|
-
*
|
|
5554
|
-
*
|
|
5555
|
-
* `
|
|
5556
|
-
* delivery attempts continue.
|
|
5950
|
+
* In flight:
|
|
5951
|
+
*
|
|
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:
|
|
5557
5958
|
*
|
|
5558
|
-
*
|
|
5559
|
-
*
|
|
5560
|
-
*
|
|
5561
|
-
*
|
|
5562
|
-
*
|
|
5563
|
-
* canceled before it was sent.
|
|
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.
|
|
5564
5964
|
*
|
|
5565
5965
|
* `complained` takes precedence over every other status: at least one recipient reported
|
|
5566
5966
|
* the message as spam, regardless of what happened to the rest.
|
|
@@ -5577,7 +5977,7 @@ type EmailMessage = {
|
|
|
5577
5977
|
*/
|
|
5578
5978
|
from: EmailAddress;
|
|
5579
5979
|
/**
|
|
5580
|
-
* Primary recipients. Length is the recipient count
|
|
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.
|
|
5581
5981
|
*/
|
|
5582
5982
|
to: Array<EmailAddress>;
|
|
5583
5983
|
/**
|
|
@@ -5598,21 +5998,17 @@ type EmailMessage = {
|
|
|
5598
5998
|
* Reply-To addresses, if set on the send. Empty/null when no Reply-To was provided.
|
|
5599
5999
|
*/
|
|
5600
6000
|
reply_to?: Array<EmailAddress> | null;
|
|
5601
|
-
/**
|
|
5602
|
-
* 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.
|
|
5603
|
-
*
|
|
5604
|
-
*/
|
|
5605
6001
|
readonly status: EmailMessageStatus;
|
|
5606
6002
|
/**
|
|
5607
|
-
*
|
|
6003
|
+
* How many recipients are in the `accepted` state, meaning we have the message and are getting ready to deliver it.
|
|
5608
6004
|
*/
|
|
5609
6005
|
readonly accepted_count: number;
|
|
5610
6006
|
/**
|
|
5611
|
-
*
|
|
6007
|
+
* How many recipients the message has been prepared for and queued for delivery.
|
|
5612
6008
|
*/
|
|
5613
6009
|
readonly processed_count: number;
|
|
5614
6010
|
/**
|
|
5615
|
-
*
|
|
6011
|
+
* How many recipients' messages were accepted by their mail server.
|
|
5616
6012
|
*/
|
|
5617
6013
|
readonly delivered_count: number;
|
|
5618
6014
|
/**
|
|
@@ -5624,16 +6020,16 @@ type EmailMessage = {
|
|
|
5624
6020
|
*/
|
|
5625
6021
|
readonly complained_count: number;
|
|
5626
6022
|
/**
|
|
5627
|
-
* Number of recipients in transient delivery deferral
|
|
6023
|
+
* Number of recipients in transient delivery deferral. Their mail server asked for a retry, and delivery attempts continue.
|
|
5628
6024
|
*/
|
|
5629
6025
|
readonly deferred_count: number;
|
|
5630
6026
|
/**
|
|
5631
|
-
* Number of recipients rejected before delivery.
|
|
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.
|
|
5632
6028
|
*
|
|
5633
6029
|
*/
|
|
5634
6030
|
readonly rejected_count: number;
|
|
5635
6031
|
/**
|
|
5636
|
-
* Time between
|
|
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`.
|
|
5637
6033
|
*
|
|
5638
6034
|
*/
|
|
5639
6035
|
readonly processing_latency_ms?: number | null;
|
|
@@ -5676,11 +6072,11 @@ type EmailMessage = {
|
|
|
5676
6072
|
*/
|
|
5677
6073
|
readonly template_version_id?: EmailTemplateVersionId | null;
|
|
5678
6074
|
/**
|
|
5679
|
-
*
|
|
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.
|
|
5680
6076
|
*/
|
|
5681
6077
|
tags?: Array<Tag>;
|
|
5682
6078
|
/**
|
|
5683
|
-
*
|
|
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.
|
|
5684
6080
|
*/
|
|
5685
6081
|
metadata?: {
|
|
5686
6082
|
[key: string]: unknown;
|
|
@@ -5693,7 +6089,7 @@ type EmailMessage = {
|
|
|
5693
6089
|
[key: string]: unknown;
|
|
5694
6090
|
} | null;
|
|
5695
6091
|
/**
|
|
5696
|
-
* Attachment metadata for the send. Empty when no attachments were included. Raw content is not echoed
|
|
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.
|
|
5697
6093
|
*/
|
|
5698
6094
|
attachments?: Array<EmailAttachmentRef>;
|
|
5699
6095
|
/**
|
|
@@ -5709,7 +6105,7 @@ type EmailMessage = {
|
|
|
5709
6105
|
*/
|
|
5710
6106
|
readonly created_at: string;
|
|
5711
6107
|
/**
|
|
5712
|
-
* Thread this message belongs to
|
|
6108
|
+
* Thread this message belongs to, or null when the message is not part of one.
|
|
5713
6109
|
*/
|
|
5714
6110
|
readonly thread_id?: string | null;
|
|
5715
6111
|
/**
|
|
@@ -5871,15 +6267,16 @@ type PublishRealtimeAppEventData = {
|
|
|
5871
6267
|
*/
|
|
5872
6268
|
"X-Workspace-Id"?: string;
|
|
5873
6269
|
/**
|
|
5874
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
5875
6272
|
* Two distinct 409 errors signal misuse:
|
|
5876
|
-
*
|
|
5877
|
-
*
|
|
5878
|
-
* expires within 30 seconds.
|
|
5879
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
5880
6277
|
* against a different request body or method. Generate a new key.
|
|
5881
6278
|
*
|
|
5882
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6279
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
5883
6280
|
*
|
|
5884
6281
|
*/
|
|
5885
6282
|
"Idempotency-Key"?: string;
|
|
@@ -5901,15 +6298,16 @@ type PublishRealtimeAppBatchData = {
|
|
|
5901
6298
|
*/
|
|
5902
6299
|
"X-Workspace-Id"?: string;
|
|
5903
6300
|
/**
|
|
5904
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
5905
6303
|
* Two distinct 409 errors signal misuse:
|
|
5906
|
-
*
|
|
5907
|
-
*
|
|
5908
|
-
* expires within 30 seconds.
|
|
5909
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
5910
6308
|
* against a different request body or method. Generate a new key.
|
|
5911
6309
|
*
|
|
5912
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6310
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
5913
6311
|
*
|
|
5914
6312
|
*/
|
|
5915
6313
|
"Idempotency-Key"?: string;
|
|
@@ -5983,15 +6381,16 @@ type SendRealtimeAppMemberEventData = {
|
|
|
5983
6381
|
*/
|
|
5984
6382
|
"X-Workspace-Id"?: string;
|
|
5985
6383
|
/**
|
|
5986
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
5987
6386
|
* Two distinct 409 errors signal misuse:
|
|
5988
|
-
*
|
|
5989
|
-
*
|
|
5990
|
-
* expires within 30 seconds.
|
|
5991
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
5992
6391
|
* against a different request body or method. Generate a new key.
|
|
5993
6392
|
*
|
|
5994
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6393
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
5995
6394
|
*
|
|
5996
6395
|
*/
|
|
5997
6396
|
"Idempotency-Key"?: string;
|
|
@@ -6038,7 +6437,7 @@ type ListEmailMessagesData = {
|
|
|
6038
6437
|
*/
|
|
6039
6438
|
status?: EmailMessageStatus;
|
|
6040
6439
|
/**
|
|
6041
|
-
* Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (
|
|
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.
|
|
6042
6441
|
*
|
|
6043
6442
|
*/
|
|
6044
6443
|
tag?: Array<string>;
|
|
@@ -6047,12 +6446,12 @@ type ListEmailMessagesData = {
|
|
|
6047
6446
|
*/
|
|
6048
6447
|
category?: EmailMessageCategory;
|
|
6049
6448
|
/**
|
|
6050
|
-
* Filter by recipient address. Exact match against any `to`/`cc`/`bcc` recipient on the message
|
|
6449
|
+
* Filter by recipient address. Exact match against any `to`/`cc`/`bcc` recipient on the message. The address is normalized to lowercase before comparison.
|
|
6051
6450
|
*
|
|
6052
6451
|
*/
|
|
6053
6452
|
to?: string;
|
|
6054
6453
|
/**
|
|
6055
|
-
* Filter by sender address. Exact match against the message `from` field
|
|
6454
|
+
* Filter by sender address. Exact match against the message `from` field. The address is normalized to lowercase before comparison.
|
|
6056
6455
|
*
|
|
6057
6456
|
*/
|
|
6058
6457
|
from?: string;
|
|
@@ -6106,15 +6505,16 @@ type CreateContactData = {
|
|
|
6106
6505
|
body: ContactCreateRequest;
|
|
6107
6506
|
headers?: {
|
|
6108
6507
|
/**
|
|
6109
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6110
6510
|
* Two distinct 409 errors signal misuse:
|
|
6111
|
-
*
|
|
6112
|
-
*
|
|
6113
|
-
* expires within 30 seconds.
|
|
6114
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6115
6515
|
* against a different request body or method. Generate a new key.
|
|
6116
6516
|
*
|
|
6117
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6517
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6118
6518
|
*
|
|
6119
6519
|
*/
|
|
6120
6520
|
"Idempotency-Key"?: string;
|
|
@@ -6127,15 +6527,16 @@ type CreateContactBatchData = {
|
|
|
6127
6527
|
body: ContactUpsertRequest;
|
|
6128
6528
|
headers?: {
|
|
6129
6529
|
/**
|
|
6130
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6131
6532
|
* Two distinct 409 errors signal misuse:
|
|
6132
|
-
*
|
|
6133
|
-
*
|
|
6134
|
-
* expires within 30 seconds.
|
|
6135
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6136
6537
|
* against a different request body or method. Generate a new key.
|
|
6137
6538
|
*
|
|
6138
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6539
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6139
6540
|
*
|
|
6140
6541
|
*/
|
|
6141
6542
|
"Idempotency-Key"?: string;
|
|
@@ -6148,15 +6549,16 @@ type UpdateContactData = {
|
|
|
6148
6549
|
body: ContactUpdateRequest;
|
|
6149
6550
|
headers?: {
|
|
6150
6551
|
/**
|
|
6151
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6152
6554
|
* Two distinct 409 errors signal misuse:
|
|
6153
|
-
*
|
|
6154
|
-
*
|
|
6155
|
-
* expires within 30 seconds.
|
|
6156
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6157
6559
|
* against a different request body or method. Generate a new key.
|
|
6158
6560
|
*
|
|
6159
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6561
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6160
6562
|
*
|
|
6161
6563
|
*/
|
|
6162
6564
|
"Idempotency-Key"?: string;
|
|
@@ -6193,15 +6595,16 @@ type CreateContactPropertyData = {
|
|
|
6193
6595
|
body: ContactPropertyCreateRequest;
|
|
6194
6596
|
headers?: {
|
|
6195
6597
|
/**
|
|
6196
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6197
6600
|
* Two distinct 409 errors signal misuse:
|
|
6198
|
-
*
|
|
6199
|
-
*
|
|
6200
|
-
* expires within 30 seconds.
|
|
6201
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6202
6605
|
* against a different request body or method. Generate a new key.
|
|
6203
6606
|
*
|
|
6204
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6607
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6205
6608
|
*
|
|
6206
6609
|
*/
|
|
6207
6610
|
"Idempotency-Key"?: string;
|
|
@@ -6214,15 +6617,16 @@ type UpdateContactPropertyData = {
|
|
|
6214
6617
|
body: ContactPropertyUpdateRequest;
|
|
6215
6618
|
headers?: {
|
|
6216
6619
|
/**
|
|
6217
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6218
6622
|
* Two distinct 409 errors signal misuse:
|
|
6219
|
-
*
|
|
6220
|
-
*
|
|
6221
|
-
* expires within 30 seconds.
|
|
6222
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6223
6627
|
* against a different request body or method. Generate a new key.
|
|
6224
6628
|
*
|
|
6225
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6629
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6226
6630
|
*
|
|
6227
6631
|
*/
|
|
6228
6632
|
"Idempotency-Key"?: string;
|
|
@@ -6263,15 +6667,16 @@ type CreateAudienceData = {
|
|
|
6263
6667
|
body: AudienceCreateRequest;
|
|
6264
6668
|
headers?: {
|
|
6265
6669
|
/**
|
|
6266
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6267
6672
|
* Two distinct 409 errors signal misuse:
|
|
6268
|
-
*
|
|
6269
|
-
*
|
|
6270
|
-
* expires within 30 seconds.
|
|
6271
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6272
6677
|
* against a different request body or method. Generate a new key.
|
|
6273
6678
|
*
|
|
6274
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6679
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6275
6680
|
*
|
|
6276
6681
|
*/
|
|
6277
6682
|
"Idempotency-Key"?: string;
|
|
@@ -6284,15 +6689,16 @@ type UpdateAudienceData = {
|
|
|
6284
6689
|
body: AudienceUpdateRequest;
|
|
6285
6690
|
headers?: {
|
|
6286
6691
|
/**
|
|
6287
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6288
6694
|
* Two distinct 409 errors signal misuse:
|
|
6289
|
-
*
|
|
6290
|
-
*
|
|
6291
|
-
* expires within 30 seconds.
|
|
6292
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6293
6699
|
* against a different request body or method. Generate a new key.
|
|
6294
6700
|
*
|
|
6295
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6701
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6296
6702
|
*
|
|
6297
6703
|
*/
|
|
6298
6704
|
"Idempotency-Key"?: string;
|
|
@@ -6338,15 +6744,16 @@ type AssignAudienceContactsData = {
|
|
|
6338
6744
|
body: AudienceContactsAddRequest;
|
|
6339
6745
|
headers?: {
|
|
6340
6746
|
/**
|
|
6341
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6342
6749
|
* Two distinct 409 errors signal misuse:
|
|
6343
|
-
*
|
|
6344
|
-
*
|
|
6345
|
-
* expires within 30 seconds.
|
|
6346
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6347
6754
|
* against a different request body or method. Generate a new key.
|
|
6348
6755
|
*
|
|
6349
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6756
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6350
6757
|
*
|
|
6351
6758
|
*/
|
|
6352
6759
|
"Idempotency-Key"?: string;
|
|
@@ -6364,15 +6771,16 @@ type UnassignAudienceContactsData = {
|
|
|
6364
6771
|
body: AudienceContactsRemoveRequest;
|
|
6365
6772
|
headers?: {
|
|
6366
6773
|
/**
|
|
6367
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6368
6776
|
* Two distinct 409 errors signal misuse:
|
|
6369
|
-
*
|
|
6370
|
-
*
|
|
6371
|
-
* expires within 30 seconds.
|
|
6372
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6373
6781
|
* against a different request body or method. Generate a new key.
|
|
6374
6782
|
*
|
|
6375
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6783
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6376
6784
|
*
|
|
6377
6785
|
*/
|
|
6378
6786
|
"Idempotency-Key"?: string;
|
|
@@ -6437,7 +6845,7 @@ type ListSmsMessagesData = {
|
|
|
6437
6845
|
*/
|
|
6438
6846
|
from?: string;
|
|
6439
6847
|
/**
|
|
6440
|
-
* Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (
|
|
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.
|
|
6441
6849
|
*
|
|
6442
6850
|
*/
|
|
6443
6851
|
tag?: Array<string>;
|
|
@@ -6465,6 +6873,58 @@ type ListSmsTemplatesData = {
|
|
|
6465
6873
|
};
|
|
6466
6874
|
url: "/v1/sms/templates";
|
|
6467
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
|
+
};
|
|
6468
6928
|
type CreateVerificationData = {
|
|
6469
6929
|
body: VerificationCreateRequest;
|
|
6470
6930
|
headers?: {
|
|
@@ -6473,15 +6933,16 @@ type CreateVerificationData = {
|
|
|
6473
6933
|
*/
|
|
6474
6934
|
"X-Workspace-Id"?: string;
|
|
6475
6935
|
/**
|
|
6476
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6477
6938
|
* Two distinct 409 errors signal misuse:
|
|
6478
|
-
*
|
|
6479
|
-
*
|
|
6480
|
-
* expires within 30 seconds.
|
|
6481
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6482
6943
|
* against a different request body or method. Generate a new key.
|
|
6483
6944
|
*
|
|
6484
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6945
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6485
6946
|
*
|
|
6486
6947
|
*/
|
|
6487
6948
|
"Idempotency-Key"?: string;
|
|
@@ -6498,15 +6959,16 @@ type CreateVerificationCheckData = {
|
|
|
6498
6959
|
*/
|
|
6499
6960
|
"X-Workspace-Id"?: string;
|
|
6500
6961
|
/**
|
|
6501
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6502
6964
|
* Two distinct 409 errors signal misuse:
|
|
6503
|
-
*
|
|
6504
|
-
*
|
|
6505
|
-
* expires within 30 seconds.
|
|
6506
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6507
6969
|
* against a different request body or method. Generate a new key.
|
|
6508
6970
|
*
|
|
6509
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6971
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6510
6972
|
*
|
|
6511
6973
|
*/
|
|
6512
6974
|
"Idempotency-Key"?: string;
|
|
@@ -6523,15 +6985,16 @@ type CreateVerificationNextChannelData = {
|
|
|
6523
6985
|
*/
|
|
6524
6986
|
"X-Workspace-Id"?: string;
|
|
6525
6987
|
/**
|
|
6526
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
6527
6990
|
* Two distinct 409 errors signal misuse:
|
|
6528
|
-
*
|
|
6529
|
-
*
|
|
6530
|
-
* expires within 30 seconds.
|
|
6531
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
6532
6995
|
* against a different request body or method. Generate a new key.
|
|
6533
6996
|
*
|
|
6534
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
6997
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
6535
6998
|
*
|
|
6536
6999
|
*/
|
|
6537
7000
|
"Idempotency-Key"?: string;
|
|
@@ -6586,7 +7049,7 @@ type ListWhatsAppMessagesData = {
|
|
|
6586
7049
|
*/
|
|
6587
7050
|
category?: WhatsAppTemplateCategory$1;
|
|
6588
7051
|
/**
|
|
6589
|
-
* Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (
|
|
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.
|
|
6590
7053
|
*
|
|
6591
7054
|
*/
|
|
6592
7055
|
tag?: Array<string>;
|
|
@@ -6713,7 +7176,7 @@ type GetEmailStatsByTagData = {
|
|
|
6713
7176
|
path?: never;
|
|
6714
7177
|
query?: {
|
|
6715
7178
|
/**
|
|
6716
|
-
* Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted).
|
|
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.
|
|
6717
7180
|
*/
|
|
6718
7181
|
from?: string;
|
|
6719
7182
|
/**
|
|
@@ -6726,11 +7189,11 @@ type GetEmailStatsByTagData = {
|
|
|
6726
7189
|
*/
|
|
6727
7190
|
timezone?: string;
|
|
6728
7191
|
/**
|
|
6729
|
-
* Not supported on breakdown endpoints
|
|
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.
|
|
6730
7193
|
*/
|
|
6731
7194
|
category?: string;
|
|
6732
7195
|
/**
|
|
6733
|
-
* Metric to rank rows by, applied descending. Any count or rate in the response
|
|
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`.
|
|
6734
7197
|
*
|
|
6735
7198
|
*/
|
|
6736
7199
|
sort?: EmailStatsSortMetric;
|
|
@@ -6739,7 +7202,7 @@ type GetEmailStatsByTagData = {
|
|
|
6739
7202
|
*/
|
|
6740
7203
|
limit?: number;
|
|
6741
7204
|
/**
|
|
6742
|
-
* When true, each row also
|
|
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.
|
|
6743
7206
|
*
|
|
6744
7207
|
*/
|
|
6745
7208
|
include_trend?: boolean;
|
|
@@ -6811,7 +7274,7 @@ type GetEmailStatsBySendingIpData = {
|
|
|
6811
7274
|
path?: never;
|
|
6812
7275
|
query?: {
|
|
6813
7276
|
/**
|
|
6814
|
-
* Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted).
|
|
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.
|
|
6815
7278
|
*/
|
|
6816
7279
|
from?: string;
|
|
6817
7280
|
/**
|
|
@@ -6824,11 +7287,11 @@ type GetEmailStatsBySendingIpData = {
|
|
|
6824
7287
|
*/
|
|
6825
7288
|
timezone?: string;
|
|
6826
7289
|
/**
|
|
6827
|
-
* Not supported on breakdown endpoints
|
|
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.
|
|
6828
7291
|
*/
|
|
6829
7292
|
category?: string;
|
|
6830
7293
|
/**
|
|
6831
|
-
* Metric to rank IPs by, applied descending. `bounces.block`
|
|
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`.
|
|
6832
7295
|
*
|
|
6833
7296
|
*/
|
|
6834
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";
|
|
@@ -6837,7 +7300,7 @@ type GetEmailStatsBySendingIpData = {
|
|
|
6837
7300
|
*/
|
|
6838
7301
|
limit?: number;
|
|
6839
7302
|
/**
|
|
6840
|
-
* When true, each row also
|
|
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.
|
|
6841
7304
|
*
|
|
6842
7305
|
*/
|
|
6843
7306
|
include_trend?: boolean;
|
|
@@ -6853,7 +7316,7 @@ type GetEmailStatsBySendingDomainData = {
|
|
|
6853
7316
|
path?: never;
|
|
6854
7317
|
query?: {
|
|
6855
7318
|
/**
|
|
6856
|
-
* Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted).
|
|
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.
|
|
6857
7320
|
*/
|
|
6858
7321
|
from?: string;
|
|
6859
7322
|
/**
|
|
@@ -6866,11 +7329,11 @@ type GetEmailStatsBySendingDomainData = {
|
|
|
6866
7329
|
*/
|
|
6867
7330
|
timezone?: string;
|
|
6868
7331
|
/**
|
|
6869
|
-
* Not supported on breakdown endpoints
|
|
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.
|
|
6870
7333
|
*/
|
|
6871
7334
|
category?: string;
|
|
6872
7335
|
/**
|
|
6873
|
-
* Metric to rank rows by, applied descending. Any count or rate in the response
|
|
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`.
|
|
6874
7337
|
*
|
|
6875
7338
|
*/
|
|
6876
7339
|
sort?: EmailStatsSortMetric;
|
|
@@ -6879,7 +7342,7 @@ type GetEmailStatsBySendingDomainData = {
|
|
|
6879
7342
|
*/
|
|
6880
7343
|
limit?: number;
|
|
6881
7344
|
/**
|
|
6882
|
-
* When true, each row also
|
|
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.
|
|
6883
7346
|
*
|
|
6884
7347
|
*/
|
|
6885
7348
|
include_trend?: boolean;
|
|
@@ -6895,7 +7358,7 @@ type GetEmailStatsByCategoryData = {
|
|
|
6895
7358
|
path?: never;
|
|
6896
7359
|
query?: {
|
|
6897
7360
|
/**
|
|
6898
|
-
* Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted).
|
|
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.
|
|
6899
7362
|
*/
|
|
6900
7363
|
from?: string;
|
|
6901
7364
|
/**
|
|
@@ -6908,7 +7371,7 @@ type GetEmailStatsByCategoryData = {
|
|
|
6908
7371
|
*/
|
|
6909
7372
|
timezone?: string;
|
|
6910
7373
|
/**
|
|
6911
|
-
* Metric to rank rows by, applied descending. Any count or rate in the response
|
|
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`.
|
|
6912
7375
|
*
|
|
6913
7376
|
*/
|
|
6914
7377
|
sort?: EmailStatsSortMetric;
|
|
@@ -6917,7 +7380,7 @@ type GetEmailStatsByCategoryData = {
|
|
|
6917
7380
|
*/
|
|
6918
7381
|
limit?: number;
|
|
6919
7382
|
/**
|
|
6920
|
-
* When true, each row also
|
|
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.
|
|
6921
7384
|
*
|
|
6922
7385
|
*/
|
|
6923
7386
|
include_trend?: boolean;
|
|
@@ -6933,7 +7396,7 @@ type GetEmailStatsByMailboxProviderData = {
|
|
|
6933
7396
|
path?: never;
|
|
6934
7397
|
query?: {
|
|
6935
7398
|
/**
|
|
6936
|
-
* Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted).
|
|
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.
|
|
6937
7400
|
*/
|
|
6938
7401
|
from?: string;
|
|
6939
7402
|
/**
|
|
@@ -6950,7 +7413,7 @@ type GetEmailStatsByMailboxProviderData = {
|
|
|
6950
7413
|
*/
|
|
6951
7414
|
category?: string;
|
|
6952
7415
|
/**
|
|
6953
|
-
* Metric to rank rows by, applied descending. Any count or rate in the response
|
|
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.
|
|
6954
7417
|
*
|
|
6955
7418
|
*/
|
|
6956
7419
|
sort?: EmailMailboxProviderSortMetric;
|
|
@@ -6959,7 +7422,7 @@ type GetEmailStatsByMailboxProviderData = {
|
|
|
6959
7422
|
*/
|
|
6960
7423
|
limit?: number;
|
|
6961
7424
|
/**
|
|
6962
|
-
* When true, each row also
|
|
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.
|
|
6963
7426
|
*
|
|
6964
7427
|
*/
|
|
6965
7428
|
include_trend?: boolean;
|
|
@@ -6975,7 +7438,7 @@ type GetEmailStatsByMailboxProviderRegionData = {
|
|
|
6975
7438
|
path?: never;
|
|
6976
7439
|
query?: {
|
|
6977
7440
|
/**
|
|
6978
|
-
* Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted).
|
|
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.
|
|
6979
7442
|
*/
|
|
6980
7443
|
from?: string;
|
|
6981
7444
|
/**
|
|
@@ -6988,11 +7451,11 @@ type GetEmailStatsByMailboxProviderRegionData = {
|
|
|
6988
7451
|
*/
|
|
6989
7452
|
timezone?: string;
|
|
6990
7453
|
/**
|
|
6991
|
-
* Not supported on breakdown endpoints
|
|
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.
|
|
6992
7455
|
*/
|
|
6993
7456
|
category?: string;
|
|
6994
7457
|
/**
|
|
6995
|
-
* Metric to rank rows by, applied descending. Any count or rate in the response
|
|
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.
|
|
6996
7459
|
*
|
|
6997
7460
|
*/
|
|
6998
7461
|
sort?: EmailMailboxProviderSortMetric;
|
|
@@ -7001,7 +7464,7 @@ type GetEmailStatsByMailboxProviderRegionData = {
|
|
|
7001
7464
|
*/
|
|
7002
7465
|
limit?: number;
|
|
7003
7466
|
/**
|
|
7004
|
-
* When true, each row also
|
|
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.
|
|
7005
7468
|
*
|
|
7006
7469
|
*/
|
|
7007
7470
|
include_trend?: boolean;
|
|
@@ -7017,7 +7480,7 @@ type GetEmailStatsByRecipientDomainData = {
|
|
|
7017
7480
|
path?: never;
|
|
7018
7481
|
query?: {
|
|
7019
7482
|
/**
|
|
7020
|
-
* Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in `timezone` (a UTC day when `timezone` is omitted).
|
|
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.
|
|
7021
7484
|
*/
|
|
7022
7485
|
from?: string;
|
|
7023
7486
|
/**
|
|
@@ -7030,11 +7493,11 @@ type GetEmailStatsByRecipientDomainData = {
|
|
|
7030
7493
|
*/
|
|
7031
7494
|
timezone?: string;
|
|
7032
7495
|
/**
|
|
7033
|
-
* Not supported on breakdown endpoints
|
|
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.
|
|
7034
7497
|
*/
|
|
7035
7498
|
category?: string;
|
|
7036
7499
|
/**
|
|
7037
|
-
* Metric to rank rows by, applied descending. Any count or rate in the response
|
|
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`.
|
|
7038
7501
|
*
|
|
7039
7502
|
*/
|
|
7040
7503
|
sort?: EmailStatsSortMetric;
|
|
@@ -7043,7 +7506,7 @@ type GetEmailStatsByRecipientDomainData = {
|
|
|
7043
7506
|
*/
|
|
7044
7507
|
limit?: number;
|
|
7045
7508
|
/**
|
|
7046
|
-
* When true, each row also
|
|
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.
|
|
7047
7510
|
*
|
|
7048
7511
|
*/
|
|
7049
7512
|
include_trend?: boolean;
|
|
@@ -7085,7 +7548,7 @@ type GetEmailStatsByTemplateData = {
|
|
|
7085
7548
|
*/
|
|
7086
7549
|
limit?: number;
|
|
7087
7550
|
/**
|
|
7088
|
-
* When true, each row also
|
|
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.
|
|
7089
7552
|
*
|
|
7090
7553
|
*/
|
|
7091
7554
|
include_trend?: boolean;
|
|
@@ -7123,7 +7586,7 @@ type GetEmailStatsByLocationData = {
|
|
|
7123
7586
|
*/
|
|
7124
7587
|
group_by?: "country" | "region" | "city";
|
|
7125
7588
|
/**
|
|
7126
|
-
* Metric to rank rows by, applied descending.
|
|
7589
|
+
* Metric to rank rows by, applied descending. It defaults to `unique_opens`. Only engagement counts are sortable. This breakdown has no rates.
|
|
7127
7590
|
*
|
|
7128
7591
|
*/
|
|
7129
7592
|
sort?: EmailEngagementSortMetric;
|
|
@@ -7161,7 +7624,7 @@ type GetEmailStatsByClientData = {
|
|
|
7161
7624
|
*/
|
|
7162
7625
|
group_by?: "email_client" | "os" | "device_type";
|
|
7163
7626
|
/**
|
|
7164
|
-
* Metric to rank rows by, applied descending.
|
|
7627
|
+
* Metric to rank rows by, applied descending. It defaults to `unique_opens`. Only engagement counts are sortable. This breakdown has no rates.
|
|
7165
7628
|
*
|
|
7166
7629
|
*/
|
|
7167
7630
|
sort?: EmailEngagementSortMetric;
|
|
@@ -7190,11 +7653,11 @@ type GetEmailStatsByBounceCodeData = {
|
|
|
7190
7653
|
*/
|
|
7191
7654
|
timezone?: string;
|
|
7192
7655
|
/**
|
|
7193
|
-
* Not supported on breakdown endpoints
|
|
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.
|
|
7194
7657
|
*/
|
|
7195
7658
|
category?: string;
|
|
7196
7659
|
/**
|
|
7197
|
-
* Metric to rank rows by, applied descending.
|
|
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.
|
|
7198
7661
|
*
|
|
7199
7662
|
*/
|
|
7200
7663
|
sort?: "bounced" | "bounces.hard" | "bounces.soft" | "bounces.admin" | "bounces.block" | "bounces.undetermined";
|
|
@@ -7223,11 +7686,11 @@ type GetEmailStatsByComplaintTypeData = {
|
|
|
7223
7686
|
*/
|
|
7224
7687
|
timezone?: string;
|
|
7225
7688
|
/**
|
|
7226
|
-
* Not supported on breakdown endpoints
|
|
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.
|
|
7227
7690
|
*/
|
|
7228
7691
|
category?: string;
|
|
7229
7692
|
/**
|
|
7230
|
-
* Metric to rank rows by, applied descending.
|
|
7693
|
+
* Metric to rank rows by, applied descending. It defaults to `complained`, the only sortable metric for this breakdown.
|
|
7231
7694
|
*
|
|
7232
7695
|
*/
|
|
7233
7696
|
sort?: "complained";
|
|
@@ -7251,7 +7714,7 @@ type GetEmailStatsByBroadcastData = {
|
|
|
7251
7714
|
*/
|
|
7252
7715
|
to?: string;
|
|
7253
7716
|
/**
|
|
7254
|
-
* Not supported on breakdown endpoints
|
|
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.
|
|
7255
7718
|
*/
|
|
7256
7719
|
category?: string;
|
|
7257
7720
|
/**
|
|
@@ -7306,15 +7769,16 @@ type CreateDomainData = {
|
|
|
7306
7769
|
body: DomainCreate;
|
|
7307
7770
|
headers?: {
|
|
7308
7771
|
/**
|
|
7309
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
7310
7774
|
* Two distinct 409 errors signal misuse:
|
|
7311
|
-
*
|
|
7312
|
-
*
|
|
7313
|
-
* expires within 30 seconds.
|
|
7314
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
7315
7779
|
* against a different request body or method. Generate a new key.
|
|
7316
7780
|
*
|
|
7317
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
7781
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
7318
7782
|
*
|
|
7319
7783
|
*/
|
|
7320
7784
|
"Idempotency-Key"?: string;
|
|
@@ -7327,15 +7791,16 @@ type UpdateDomainData = {
|
|
|
7327
7791
|
body: DomainUpdate;
|
|
7328
7792
|
headers?: {
|
|
7329
7793
|
/**
|
|
7330
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
7331
7796
|
* Two distinct 409 errors signal misuse:
|
|
7332
|
-
*
|
|
7333
|
-
*
|
|
7334
|
-
* expires within 30 seconds.
|
|
7335
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
7336
7801
|
* against a different request body or method. Generate a new key.
|
|
7337
7802
|
*
|
|
7338
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
7803
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
7339
7804
|
*
|
|
7340
7805
|
*/
|
|
7341
7806
|
"Idempotency-Key"?: string;
|
|
@@ -7370,7 +7835,7 @@ type ListMailboxesData = {
|
|
|
7370
7835
|
*/
|
|
7371
7836
|
domain?: string;
|
|
7372
7837
|
/**
|
|
7373
|
-
* Include mailboxes deleted within their 30-day restore window. Defaults to false, so only active and suspended mailboxes are returned.
|
|
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`.
|
|
7374
7839
|
*/
|
|
7375
7840
|
include_deleted?: boolean;
|
|
7376
7841
|
/**
|
|
@@ -7392,15 +7857,16 @@ type CreateMailboxData = {
|
|
|
7392
7857
|
body: MailboxCreate;
|
|
7393
7858
|
headers?: {
|
|
7394
7859
|
/**
|
|
7395
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
7396
7862
|
* Two distinct 409 errors signal misuse:
|
|
7397
|
-
*
|
|
7398
|
-
*
|
|
7399
|
-
* expires within 30 seconds.
|
|
7400
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
7401
7867
|
* against a different request body or method. Generate a new key.
|
|
7402
7868
|
*
|
|
7403
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
7869
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
7404
7870
|
*
|
|
7405
7871
|
*/
|
|
7406
7872
|
"Idempotency-Key"?: string;
|
|
@@ -7413,15 +7879,16 @@ type UpdateMailboxData = {
|
|
|
7413
7879
|
body: MailboxUpdate;
|
|
7414
7880
|
headers?: {
|
|
7415
7881
|
/**
|
|
7416
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
7417
7884
|
* Two distinct 409 errors signal misuse:
|
|
7418
|
-
*
|
|
7419
|
-
*
|
|
7420
|
-
* expires within 30 seconds.
|
|
7421
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
7422
7889
|
* against a different request body or method. Generate a new key.
|
|
7423
7890
|
*
|
|
7424
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
7891
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
7425
7892
|
*
|
|
7426
7893
|
*/
|
|
7427
7894
|
"Idempotency-Key"?: string;
|
|
@@ -7434,7 +7901,7 @@ type UpdateMailboxData = {
|
|
|
7434
7901
|
};
|
|
7435
7902
|
query?: {
|
|
7436
7903
|
/**
|
|
7437
|
-
*
|
|
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.
|
|
7438
7905
|
*/
|
|
7439
7906
|
confirm?: boolean;
|
|
7440
7907
|
};
|
|
@@ -7465,7 +7932,7 @@ type GetMailboxStatsData = {
|
|
|
7465
7932
|
*/
|
|
7466
7933
|
timezone?: string;
|
|
7467
7934
|
/**
|
|
7468
|
-
*
|
|
7935
|
+
* Granularity of the series: `day` (default) or `hour`. Echoed back as `period.grain`.
|
|
7469
7936
|
*
|
|
7470
7937
|
*/
|
|
7471
7938
|
granularity?: "day" | "hour";
|
|
@@ -7504,15 +7971,16 @@ type CreateMailboxReceiveRuleData = {
|
|
|
7504
7971
|
body: ReceiveRuleCreate;
|
|
7505
7972
|
headers?: {
|
|
7506
7973
|
/**
|
|
7507
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
7508
7976
|
* Two distinct 409 errors signal misuse:
|
|
7509
|
-
*
|
|
7510
|
-
*
|
|
7511
|
-
* expires within 30 seconds.
|
|
7512
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
7513
7981
|
* against a different request body or method. Generate a new key.
|
|
7514
7982
|
*
|
|
7515
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
7983
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
7516
7984
|
*
|
|
7517
7985
|
*/
|
|
7518
7986
|
"Idempotency-Key"?: string;
|
|
@@ -7539,15 +8007,17 @@ type ListEmailThreadsData = {
|
|
|
7539
8007
|
*/
|
|
7540
8008
|
contact_id?: ContactId;
|
|
7541
8009
|
/**
|
|
7542
|
-
* Filter to conversations
|
|
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.
|
|
7543
8013
|
*/
|
|
7544
8014
|
label?: Array<string>;
|
|
7545
8015
|
/**
|
|
7546
|
-
* When `true`, only conversations with unread messages are returned. This filters on the conversation's unread state, so it
|
|
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.
|
|
7547
8017
|
*/
|
|
7548
8018
|
has_unread?: boolean;
|
|
7549
8019
|
/**
|
|
7550
|
-
* Conversations involving this address
|
|
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.
|
|
7551
8021
|
*/
|
|
7552
8022
|
participant?: string;
|
|
7553
8023
|
/**
|
|
@@ -7581,15 +8051,16 @@ type DeleteEmailThreadData = {
|
|
|
7581
8051
|
body?: never;
|
|
7582
8052
|
headers?: {
|
|
7583
8053
|
/**
|
|
7584
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
7585
8056
|
* Two distinct 409 errors signal misuse:
|
|
7586
|
-
*
|
|
7587
|
-
*
|
|
7588
|
-
* expires within 30 seconds.
|
|
7589
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
7590
8061
|
* against a different request body or method. Generate a new key.
|
|
7591
8062
|
*
|
|
7592
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
8063
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
7593
8064
|
*
|
|
7594
8065
|
*/
|
|
7595
8066
|
"Idempotency-Key"?: string;
|
|
@@ -7612,15 +8083,16 @@ type UpdateEmailThreadData = {
|
|
|
7612
8083
|
body: EmailThreadUpdateRequest;
|
|
7613
8084
|
headers?: {
|
|
7614
8085
|
/**
|
|
7615
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
7616
8088
|
* Two distinct 409 errors signal misuse:
|
|
7617
|
-
*
|
|
7618
|
-
*
|
|
7619
|
-
* expires within 30 seconds.
|
|
7620
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
7621
8093
|
* against a different request body or method. Generate a new key.
|
|
7622
8094
|
*
|
|
7623
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
8095
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
7624
8096
|
*
|
|
7625
8097
|
*/
|
|
7626
8098
|
"Idempotency-Key"?: string;
|
|
@@ -7648,7 +8120,7 @@ type ListEmailThreadMessagesData = {
|
|
|
7648
8120
|
*/
|
|
7649
8121
|
direction?: MessageDirection;
|
|
7650
8122
|
/**
|
|
7651
|
-
* Filter to messages
|
|
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.
|
|
7652
8124
|
*
|
|
7653
8125
|
*/
|
|
7654
8126
|
label?: string;
|
|
@@ -7675,15 +8147,16 @@ type ReplyEmailThreadMessageData = {
|
|
|
7675
8147
|
body: EmailThreadMessageReplyRequest;
|
|
7676
8148
|
headers?: {
|
|
7677
8149
|
/**
|
|
7678
|
-
* Client-supplied deduplication key. When present, the
|
|
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
|
+
*
|
|
7679
8152
|
* Two distinct 409 errors signal misuse:
|
|
7680
|
-
*
|
|
7681
|
-
*
|
|
7682
|
-
* expires within 30 seconds.
|
|
7683
|
-
* - `idempotency_key_reuse` (E01005):
|
|
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
|
|
7684
8157
|
* against a different request body or method. Generate a new key.
|
|
7685
8158
|
*
|
|
7686
|
-
* Recommended key format is `<event-type>/<entity-id>` (
|
|
8159
|
+
* Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
|
|
7687
8160
|
*
|
|
7688
8161
|
*/
|
|
7689
8162
|
"Idempotency-Key"?: string;
|
|
@@ -8096,7 +8569,7 @@ declare abstract class Resource {
|
|
|
8096
8569
|
type EmailListQuery$1 = NonNullable<ListEmailMessagesData["query"]>;
|
|
8097
8570
|
declare class EmailResourceBase extends Resource {
|
|
8098
8571
|
/**
|
|
8099
|
-
* Fetch one email message by id
|
|
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`.
|
|
8100
8573
|
*
|
|
8101
8574
|
* @example
|
|
8102
8575
|
* const msg = await bird.email.get("em_abc123");
|
|
@@ -8106,7 +8579,7 @@ declare class EmailResourceBase extends Resource {
|
|
|
8106
8579
|
*/
|
|
8107
8580
|
get(messageId: string, options?: RequestOptions): APIPromise<EmailMessage>;
|
|
8108
8581
|
/**
|
|
8109
|
-
* 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)
|
|
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.
|
|
8110
8583
|
*
|
|
8111
8584
|
* @example
|
|
8112
8585
|
* for await (const message of bird.email.list({ status: "bounced" })) {
|
|
@@ -8115,7 +8588,7 @@ declare class EmailResourceBase extends Resource {
|
|
|
8115
8588
|
*/
|
|
8116
8589
|
list(query?: EmailListQuery$1, options?: RequestOptions): PaginatedPromise<EmailMessage>;
|
|
8117
8590
|
/**
|
|
8118
|
-
* Cancel a scheduled email before it sends. Only works while the message is still
|
|
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.
|
|
8119
8592
|
*
|
|
8120
8593
|
* @example
|
|
8121
8594
|
* await bird.email.cancel("em_abc123");
|
|
@@ -8142,7 +8615,7 @@ type EmailStatsByComplaintTypeQuery = NonNullable<GetEmailStatsByComplaintTypeDa
|
|
|
8142
8615
|
type EmailStatsByBroadcastQuery = NonNullable<GetEmailStatsByBroadcastData["query"]>;
|
|
8143
8616
|
declare class EmailStatsResource extends Resource {
|
|
8144
8617
|
/**
|
|
8145
|
-
* 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
|
|
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`.
|
|
8146
8619
|
*
|
|
8147
8620
|
* @example Summary for a month
|
|
8148
8621
|
* const s = await bird.email.stats.summary({ from: "2026-05-01", to: "2026-05-31" });
|
|
@@ -8150,7 +8623,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8150
8623
|
*/
|
|
8151
8624
|
summary(query?: EmailStatsSummaryQuery, options?: RequestOptions): APIPromise<EmailStatsSummary>;
|
|
8152
8625
|
/**
|
|
8153
|
-
* 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
|
|
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`.
|
|
8154
8627
|
*
|
|
8155
8628
|
* @example
|
|
8156
8629
|
* const series = await bird.email.stats.daily({ from: "2026-05-01", to: "2026-05-31" });
|
|
@@ -8158,7 +8631,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8158
8631
|
*/
|
|
8159
8632
|
daily(query?: EmailStatsDailyQuery, options?: RequestOptions): APIPromise<EmailStatsResponse>;
|
|
8160
8633
|
/**
|
|
8161
|
-
* Per-hour email stats series, gap-filled with zero rows, max 720 hours (30 days). Takes the same single-dimension filters as
|
|
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`.
|
|
8162
8635
|
*
|
|
8163
8636
|
* @example
|
|
8164
8637
|
* const series = await bird.email.stats.hourly({ from: "2026-05-01", to: "2026-05-02" });
|
|
@@ -8166,7 +8639,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8166
8639
|
*/
|
|
8167
8640
|
hourly(query?: EmailStatsHourlyQuery, options?: RequestOptions): APIPromise<EmailStatsResponse>;
|
|
8168
8641
|
/**
|
|
8169
|
-
* Email delivery and engagement stats grouped by tag, one row per `name:value` pair set at send time
|
|
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.
|
|
8170
8643
|
*
|
|
8171
8644
|
* @example Top 10 tags by delivered
|
|
8172
8645
|
* const { data } = await bird.email.stats.byTag({
|
|
@@ -8179,7 +8652,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8179
8652
|
*/
|
|
8180
8653
|
byTag(query?: EmailStatsByTagQuery, options?: RequestOptions): APIPromise<EmailStatsTagsResponse>;
|
|
8181
8654
|
/**
|
|
8182
|
-
* Email delivery and engagement stats grouped by category
|
|
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.
|
|
8183
8656
|
*
|
|
8184
8657
|
* @example
|
|
8185
8658
|
* const { data } = await bird.email.stats.byCategory({ from: "2026-05-01", to: "2026-05-31" });
|
|
@@ -8187,7 +8660,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8187
8660
|
*/
|
|
8188
8661
|
byCategory(query?: EmailStatsByCategoryQuery, options?: RequestOptions): APIPromise<EmailStatsByCategoryResponse>;
|
|
8189
8662
|
/**
|
|
8190
|
-
* Delivery and bounce stats grouped by sending IP
|
|
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`.
|
|
8191
8664
|
*
|
|
8192
8665
|
* @example
|
|
8193
8666
|
* const { data } = await bird.email.stats.bySendingIp({
|
|
@@ -8200,7 +8673,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8200
8673
|
*/
|
|
8201
8674
|
bySendingIp(query?: EmailStatsBySendingIpQuery, options?: RequestOptions): APIPromise<EmailStatsBySendingIpResponse>;
|
|
8202
8675
|
/**
|
|
8203
|
-
* Email delivery and engagement stats grouped by sending (`From`) domain
|
|
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`.
|
|
8204
8677
|
*
|
|
8205
8678
|
* @example
|
|
8206
8679
|
* const { data } = await bird.email.stats.bySendingDomain({
|
|
@@ -8213,7 +8686,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8213
8686
|
*/
|
|
8214
8687
|
bySendingDomain(query?: EmailStatsBySendingDomainQuery, options?: RequestOptions): APIPromise<EmailStatsBySendingDomainResponse>;
|
|
8215
8688
|
/**
|
|
8216
|
-
* Email delivery and engagement stats grouped by exact recipient mailbox domain
|
|
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.
|
|
8217
8690
|
*
|
|
8218
8691
|
* @example
|
|
8219
8692
|
* const { data } = await bird.email.stats.byRecipientDomain({
|
|
@@ -8226,7 +8699,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8226
8699
|
*/
|
|
8227
8700
|
byRecipientDomain(query?: EmailStatsByRecipientDomainQuery, options?: RequestOptions): APIPromise<EmailStatsByRecipientDomainResponse>;
|
|
8228
8701
|
/**
|
|
8229
|
-
* Email delivery and engagement stats grouped by recipient mailbox provider
|
|
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`.
|
|
8230
8703
|
*
|
|
8231
8704
|
* @example
|
|
8232
8705
|
* const { data } = await bird.email.stats.byMailboxProvider({
|
|
@@ -8238,7 +8711,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8238
8711
|
*/
|
|
8239
8712
|
byMailboxProvider(query?: EmailStatsByMailboxProviderQuery, options?: RequestOptions): APIPromise<EmailStatsByMailboxProviderResponse>;
|
|
8240
8713
|
/**
|
|
8241
|
-
* Email delivery and engagement stats grouped by mailbox provider and provider region pair
|
|
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`.
|
|
8242
8715
|
*
|
|
8243
8716
|
* @example
|
|
8244
8717
|
* const { data } = await bird.email.stats.byMailboxProviderRegion({
|
|
@@ -8250,7 +8723,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8250
8723
|
*/
|
|
8251
8724
|
byMailboxProviderRegion(query?: EmailStatsByMailboxProviderRegionQuery, options?: RequestOptions): APIPromise<EmailStatsByMailboxProviderRegionResponse>;
|
|
8252
8725
|
/**
|
|
8253
|
-
* 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
|
|
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.
|
|
8254
8727
|
*
|
|
8255
8728
|
* @example
|
|
8256
8729
|
* const { data } = await bird.email.stats.byTemplate({
|
|
@@ -8263,7 +8736,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8263
8736
|
*/
|
|
8264
8737
|
byTemplate(query?: EmailStatsByTemplateQuery, options?: RequestOptions): APIPromise<EmailStatsByTemplateResponse>;
|
|
8265
8738
|
/**
|
|
8266
|
-
* Opens and clicks grouped by country, region, or city
|
|
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`.
|
|
8267
8740
|
*
|
|
8268
8741
|
* @example
|
|
8269
8742
|
* const { data } = await bird.email.stats.byLocation({
|
|
@@ -8275,7 +8748,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8275
8748
|
*/
|
|
8276
8749
|
byLocation(query?: EmailStatsByLocationQuery, options?: RequestOptions): APIPromise<EmailStatsByLocationResponse>;
|
|
8277
8750
|
/**
|
|
8278
|
-
* Opens and clicks grouped by mail client,
|
|
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`.
|
|
8279
8752
|
*
|
|
8280
8753
|
* @example
|
|
8281
8754
|
* const { data } = await bird.email.stats.byClient({
|
|
@@ -8287,7 +8760,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8287
8760
|
*/
|
|
8288
8761
|
byClient(query?: EmailStatsByClientQuery, options?: RequestOptions): APIPromise<EmailStatsByClientResponse>;
|
|
8289
8762
|
/**
|
|
8290
|
-
* Bounce counts grouped by the SMTP error code the receiving server returned
|
|
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`.
|
|
8291
8764
|
*
|
|
8292
8765
|
* @example
|
|
8293
8766
|
* const { data } = await bird.email.stats.byBounceCode({
|
|
@@ -8300,7 +8773,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8300
8773
|
*/
|
|
8301
8774
|
byBounceCode(query?: EmailStatsByBounceCodeQuery, options?: RequestOptions): APIPromise<EmailStatsByBounceCodeResponse>;
|
|
8302
8775
|
/**
|
|
8303
|
-
* Spam-complaint counts grouped by the feedback-loop complaint type
|
|
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`.
|
|
8304
8777
|
*
|
|
8305
8778
|
* @example
|
|
8306
8779
|
* const { data } = await bird.email.stats.byComplaintType({ from: "2026-05-01", to: "2026-05-31" });
|
|
@@ -8308,7 +8781,7 @@ declare class EmailStatsResource extends Resource {
|
|
|
8308
8781
|
*/
|
|
8309
8782
|
byComplaintType(query?: EmailStatsByComplaintTypeQuery, options?: RequestOptions): APIPromise<EmailStatsByComplaintTypeResponse>;
|
|
8310
8783
|
/**
|
|
8311
|
-
* Email delivery and engagement stats grouped by broadcast
|
|
8784
|
+
* Email delivery and engagement stats grouped by broadcast. Only broadcast sends appear. Reflects roughly the last 30 days of activity.
|
|
8312
8785
|
*
|
|
8313
8786
|
* @example
|
|
8314
8787
|
* const { data } = await bird.email.stats.byBroadcast({
|
|
@@ -8339,7 +8812,7 @@ declare class EmailMailboxesResourceBase extends Resource {
|
|
|
8339
8812
|
*/
|
|
8340
8813
|
list(query?: EmailMailboxesListQuery, options?: RequestOptions): PaginatedPromise<Mailbox>;
|
|
8341
8814
|
/**
|
|
8342
|
-
* Create a mailbox: a durable agent identity that owns an email address, groups mail into
|
|
8815
|
+
* Create a mailbox: a durable agent identity that owns an email address, groups mail into conversations, and remembers conversations for its retention tier.
|
|
8343
8816
|
*
|
|
8344
8817
|
* @example Create a mailbox
|
|
8345
8818
|
* const mailbox = await bird.email.mailboxes.create({ display_name: "Support" });
|
|
@@ -8347,7 +8820,7 @@ declare class EmailMailboxesResourceBase extends Resource {
|
|
|
8347
8820
|
*/
|
|
8348
8821
|
create(params?: EmailMailboxesCreateParams, options?: RequestOptions): APIPromise<Mailbox>;
|
|
8349
8822
|
/**
|
|
8350
|
-
* Read one mailbox by
|
|
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.
|
|
8351
8824
|
*
|
|
8352
8825
|
* @example Get a mailbox
|
|
8353
8826
|
* const mailbox = await bird.email.mailboxes.get("mbx_01abc");
|
|
@@ -8355,7 +8828,7 @@ declare class EmailMailboxesResourceBase extends Resource {
|
|
|
8355
8828
|
*/
|
|
8356
8829
|
get(mailboxId: string, options?: RequestOptions): APIPromise<Mailbox>;
|
|
8357
8830
|
/**
|
|
8358
|
-
* Update a mailbox's display name, reply-to, receive policy, retention tier, IP pool, or metadata. Lowering the retention tier
|
|
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.
|
|
8359
8832
|
*
|
|
8360
8833
|
* @example Change a mailbox's receive policy
|
|
8361
8834
|
* const mailbox = await bird.email.mailboxes.update("mbx_01abc", {
|
|
@@ -8365,14 +8838,14 @@ declare class EmailMailboxesResourceBase extends Resource {
|
|
|
8365
8838
|
*/
|
|
8366
8839
|
update(mailboxId: string, params?: EmailMailboxesUpdateParams, query?: EmailMailboxesUpdateQuery, options?: RequestOptions): APIPromise<Mailbox>;
|
|
8367
8840
|
/**
|
|
8368
|
-
* Delete a mailbox. The address stops receiving immediately and is quarantined
|
|
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.
|
|
8369
8842
|
*
|
|
8370
8843
|
* @example Delete a mailbox
|
|
8371
8844
|
* await bird.email.mailboxes.delete("mbx_01abc");
|
|
8372
8845
|
*/
|
|
8373
8846
|
delete(mailboxId: string, options?: RequestOptions): APIPromise<void>;
|
|
8374
8847
|
/**
|
|
8375
|
-
* 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
|
|
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.
|
|
8376
8849
|
*
|
|
8377
8850
|
* @example Restore a deleted mailbox
|
|
8378
8851
|
* const mailbox = await bird.email.mailboxes.restore("mbx_01abc");
|
|
@@ -8380,7 +8853,7 @@ declare class EmailMailboxesResourceBase extends Resource {
|
|
|
8380
8853
|
*/
|
|
8381
8854
|
restore(mailboxId: string, options?: RequestOptions): APIPromise<Mailbox>;
|
|
8382
8855
|
/**
|
|
8383
|
-
*
|
|
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.
|
|
8384
8857
|
*
|
|
8385
8858
|
* @example Resume a suspended mailbox
|
|
8386
8859
|
* const mailbox = await bird.email.mailboxes.resume("mbx_01abc");
|
|
@@ -8436,7 +8909,7 @@ declare class EmailMailboxesReceiveRulesResource extends Resource {
|
|
|
8436
8909
|
*/
|
|
8437
8910
|
list(mailboxId: string, query?: EmailMailboxesReceiveRulesListQuery, options?: RequestOptions): PaginatedPromise<ReceiveRule>;
|
|
8438
8911
|
/**
|
|
8439
|
-
* Add an allow or block rule for a sender address or domain to a mailbox. Block always wins
|
|
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.
|
|
8440
8913
|
*
|
|
8441
8914
|
* @example Block a domain
|
|
8442
8915
|
* const rule = await bird.email.mailboxes.receiveRules.create("mbx_01abc", {
|
|
@@ -8510,7 +8983,7 @@ type EmailThreadsMessagesListQuery = NonNullable<ListEmailThreadMessagesData["qu
|
|
|
8510
8983
|
type EmailThreadsMessagesReplyParams = NonNullable<ReplyEmailThreadMessageData["body"]>;
|
|
8511
8984
|
declare class EmailThreadsMessagesResource extends Resource {
|
|
8512
8985
|
/**
|
|
8513
|
-
* 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
|
|
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.
|
|
8514
8987
|
*
|
|
8515
8988
|
* @example List a thread's messages
|
|
8516
8989
|
* for await (const msg of bird.email.threads.messages.list("thr_01abc")) {
|
|
@@ -8519,7 +8992,7 @@ declare class EmailThreadsMessagesResource extends Resource {
|
|
|
8519
8992
|
*/
|
|
8520
8993
|
list(threadId: string, query?: EmailThreadsMessagesListQuery, options?: RequestOptions): PaginatedPromise<EmailThreadMessage>;
|
|
8521
8994
|
/**
|
|
8522
|
-
* Get one conversation message with its extracted plain text, readable for the mailbox's full retention
|
|
8995
|
+
* Get one conversation message with its extracted plain text, readable for the mailbox's full retention tier without MIME parsing.
|
|
8523
8996
|
*
|
|
8524
8997
|
* @example Get a message
|
|
8525
8998
|
* const msg = await bird.email.threads.messages.get("thr_01abc", "rem_01xyz");
|
|
@@ -8527,7 +9000,7 @@ declare class EmailThreadsMessagesResource extends Resource {
|
|
|
8527
9000
|
*/
|
|
8528
9001
|
get(threadId: string, messageId: string, options?: RequestOptions): APIPromise<EmailThreadMessage>;
|
|
8529
9002
|
/**
|
|
8530
|
-
* Get the original rendered HTML and plain-text body of a conversation message. Available 30 days
|
|
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.
|
|
8531
9004
|
*
|
|
8532
9005
|
* @example Get a message body
|
|
8533
9006
|
* const body = await bird.email.threads.messages.body("thr_01abc", "rem_01xyz");
|
|
@@ -8545,7 +9018,7 @@ declare class EmailThreadsMessagesResource extends Resource {
|
|
|
8545
9018
|
*/
|
|
8546
9019
|
reply(threadId: string, messageId: string, params?: EmailThreadsMessagesReplyParams, options?: RequestOptions): APIPromise<EmailThreadMessage>;
|
|
8547
9020
|
/**
|
|
8548
|
-
* List the attachments on a conversation message. Bytes are downloadable for 30 days
|
|
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.
|
|
8549
9022
|
*
|
|
8550
9023
|
* @example List a message's attachments
|
|
8551
9024
|
* const atts = await bird.email.threads.messages.attachments("thr_01abc", "rem_01xyz");
|
|
@@ -8736,7 +9209,7 @@ declare class AudiencesResource extends Resource {
|
|
|
8736
9209
|
*/
|
|
8737
9210
|
listContacts(audienceId: string, query?: AudienceListContactsQuery, options?: RequestOptions): PaginatedPromise<AudienceMember>;
|
|
8738
9211
|
/**
|
|
8739
|
-
* 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.
|
|
8740
9213
|
*
|
|
8741
9214
|
* @example Add contacts to an audience
|
|
8742
9215
|
* await bird.audiences.addContacts("adn_01krdgeqcxet5s7t44vh8rt9mg", {
|
|
@@ -8804,7 +9277,7 @@ declare class DomainsResource extends Resource {
|
|
|
8804
9277
|
*/
|
|
8805
9278
|
verify(domainId: string, options?: RequestOptions): APIPromise<Domain>;
|
|
8806
9279
|
/**
|
|
8807
|
-
* 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
|
|
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.
|
|
8808
9281
|
*
|
|
8809
9282
|
* @example Enable tracking on a domain
|
|
8810
9283
|
* await bird.domains.update("dom_01krdgeqcxet5s7t44vh8rt9mg", {
|
|
@@ -8884,7 +9357,7 @@ type ContactUpdateParams = NonNullable<UpdateContactData["body"]>;
|
|
|
8884
9357
|
type ContactBatchParams = NonNullable<CreateContactBatchData["body"]>;
|
|
8885
9358
|
declare class ContactsResource extends Resource {
|
|
8886
9359
|
/**
|
|
8887
|
-
* List the workspace's contacts as a cursor page, newest first. Look one up by exact email,
|
|
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.
|
|
8888
9361
|
*
|
|
8889
9362
|
* @example Iterate every contact, or take one page
|
|
8890
9363
|
* for await (const contact of bird.contacts.list({ q: "acme.com" })) {
|
|
@@ -8894,7 +9367,7 @@ declare class ContactsResource extends Resource {
|
|
|
8894
9367
|
*/
|
|
8895
9368
|
list(query?: ContactListQuery, options?: RequestOptions): PaginatedPromise<Contact>;
|
|
8896
9369
|
/**
|
|
8897
|
-
* Get a single contact by ID (`con_`-prefixed). Look up an ID by exact email,
|
|
9370
|
+
* Get a single contact by ID (`con_`-prefixed). Look up an ID by exact email, phone_number, or external_id with `contacts.list`.
|
|
8898
9371
|
*
|
|
8899
9372
|
* @example Fetch a contact by id
|
|
8900
9373
|
* const contact = await bird.contacts.get("con_01krdgeqcxet5s7t44vh8rt9mg");
|
|
@@ -8902,7 +9375,7 @@ declare class ContactsResource extends Resource {
|
|
|
8902
9375
|
*/
|
|
8903
9376
|
get(contactId: string, options?: RequestOptions): APIPromise<Contact>;
|
|
8904
9377
|
/**
|
|
8905
|
-
* Create a contact identified by an email address, an E.164 phone number, or both. Fails with a conflict if the email,
|
|
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`.
|
|
8906
9379
|
*
|
|
8907
9380
|
* @example Create a contact
|
|
8908
9381
|
* const contact = await bird.contacts.create({
|
|
@@ -8913,7 +9386,7 @@ declare class ContactsResource extends Resource {
|
|
|
8913
9386
|
*/
|
|
8914
9387
|
create(params?: ContactCreateParams, options?: RequestOptions): APIPromise<Contact>;
|
|
8915
9388
|
/**
|
|
8916
|
-
* Update a contact's name, external_id, email,
|
|
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.
|
|
8917
9390
|
*
|
|
8918
9391
|
* @example Change a contact's fields
|
|
8919
9392
|
* const contact = await bird.contacts.update("con_01krdgeqcxet5s7t44vh8rt9mg", {
|
|
@@ -8930,7 +9403,7 @@ declare class ContactsResource extends Resource {
|
|
|
8930
9403
|
*/
|
|
8931
9404
|
delete(contactId: string, options?: RequestOptions): APIPromise<void>;
|
|
8932
9405
|
/**
|
|
8933
|
-
* Create or update up to 1,000 contacts in one request, each entry matched automatically against every identifier it supplies (email,
|
|
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.
|
|
8934
9407
|
*
|
|
8935
9408
|
* @example Create or update many contacts at once, matched by the identifiers each entry carries
|
|
8936
9409
|
* const result = await bird.contacts.batch({
|
|
@@ -9304,6 +9777,34 @@ declare class RealtimeResource extends RealtimeResourceBase {
|
|
|
9304
9777
|
constructor(core: ConstructorParameters<typeof Resource>[0], client: ConstructorParameters<typeof Resource>[1]);
|
|
9305
9778
|
}
|
|
9306
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
|
|
9307
9808
|
//#region src/client.d.ts
|
|
9308
9809
|
interface BirdClientOptions {
|
|
9309
9810
|
apiKey: string;
|
|
@@ -9402,6 +9903,8 @@ declare class BirdClient<const O extends BirdClientOptions = BirdClientOptions>
|
|
|
9402
9903
|
readonly contactProperties: ContactPropertiesResource;
|
|
9403
9904
|
/** Sending domains — `bird.domains.create(...)`, `.list(...)`, `.verify(...)`, … */
|
|
9404
9905
|
readonly domains: DomainsResource;
|
|
9906
|
+
/** Recipient intelligence — `bird.lookup.email(...)`, `.phoneNumber(...)`. Every answer is billed. */
|
|
9907
|
+
readonly lookup: LookupResource;
|
|
9405
9908
|
/** Webhooks — `bird.webhooks.unwrap(payload, headers)` verifies an inbound delivery. */
|
|
9406
9909
|
readonly webhooks: WebhooksResource;
|
|
9407
9910
|
/** Realtime — `bird.realtime.publish(...)`, `.channels.list(...)`, `.members.disconnect(...)`, … */
|
|
@@ -9509,6 +10012,66 @@ declare const EmailEventType: {
|
|
|
9509
10012
|
};
|
|
9510
10013
|
/** A known EmailEventType value. */
|
|
9511
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];
|
|
9512
10075
|
/**
|
|
9513
10076
|
* Values of SMSErrorCode known at this SDK version. The wire value is an open
|
|
9514
10077
|
* string: a value added by a newer server deserializes unchanged, so switch on
|
|
@@ -9612,5 +10175,5 @@ declare const WhatsAppTemplateParameterType: {
|
|
|
9612
10175
|
/** A known WhatsAppTemplateParameterType value. */
|
|
9613
10176
|
type WhatsAppTemplateParameterTypeValue = (typeof WhatsAppTemplateParameterType)[keyof typeof WhatsAppTemplateParameterType];
|
|
9614
10177
|
//#endregion
|
|
9615
|
-
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 };
|
|
9616
10179
|
//# sourceMappingURL=index.d.mts.map
|