@linqapp/sdk 0.55.0 → 0.55.2

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +38 -19
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +38 -19
  5. package/client.d.ts.map +1 -1
  6. package/client.js +38 -19
  7. package/client.js.map +1 -1
  8. package/client.mjs +38 -19
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/attachments.d.mts +35 -13
  12. package/resources/attachments.d.mts.map +1 -1
  13. package/resources/attachments.d.ts +35 -13
  14. package/resources/attachments.d.ts.map +1 -1
  15. package/resources/attachments.js +31 -11
  16. package/resources/attachments.js.map +1 -1
  17. package/resources/attachments.mjs +31 -11
  18. package/resources/attachments.mjs.map +1 -1
  19. package/resources/chats/messages.d.mts +16 -12
  20. package/resources/chats/messages.d.mts.map +1 -1
  21. package/resources/chats/messages.d.ts +16 -12
  22. package/resources/chats/messages.d.ts.map +1 -1
  23. package/resources/chats/messages.js +16 -12
  24. package/resources/chats/messages.js.map +1 -1
  25. package/resources/chats/messages.mjs +16 -12
  26. package/resources/chats/messages.mjs.map +1 -1
  27. package/resources/chats/polls.d.mts +16 -12
  28. package/resources/chats/polls.d.mts.map +1 -1
  29. package/resources/chats/polls.d.ts +16 -12
  30. package/resources/chats/polls.d.ts.map +1 -1
  31. package/resources/chats/polls.js +16 -12
  32. package/resources/chats/polls.js.map +1 -1
  33. package/resources/chats/polls.mjs +16 -12
  34. package/resources/chats/polls.mjs.map +1 -1
  35. package/resources/messages/messages.d.mts +16 -12
  36. package/resources/messages/messages.d.mts.map +1 -1
  37. package/resources/messages/messages.d.ts +16 -12
  38. package/resources/messages/messages.d.ts.map +1 -1
  39. package/resources/messages/messages.js +16 -12
  40. package/resources/messages/messages.js.map +1 -1
  41. package/resources/messages/messages.mjs +16 -12
  42. package/resources/messages/messages.mjs.map +1 -1
  43. package/resources/messages/poll.d.mts +16 -12
  44. package/resources/messages/poll.d.mts.map +1 -1
  45. package/resources/messages/poll.d.ts +16 -12
  46. package/resources/messages/poll.d.ts.map +1 -1
  47. package/resources/messages/poll.js +16 -12
  48. package/resources/messages/poll.js.map +1 -1
  49. package/resources/messages/poll.mjs +16 -12
  50. package/resources/messages/poll.mjs.map +1 -1
  51. package/src/client.ts +38 -19
  52. package/src/resources/attachments.ts +35 -13
  53. package/src/resources/chats/messages.ts +16 -12
  54. package/src/resources/chats/polls.ts +16 -12
  55. package/src/resources/messages/messages.ts +16 -12
  56. package/src/resources/messages/poll.ts +16 -12
  57. package/src/version.ts +1 -1
  58. package/version.d.mts +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
  61. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -963,35 +963,39 @@ export class LinqAPIV3 {
963
963
  *
964
964
  * ## Ephemeral Messages (Privacy Tier)
965
965
  *
966
- * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is automatically given a fixed **24-hour retention window** after that window the platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
966
+ * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is given a **retention window configured for your account**. After that window, the message's text, formatting, and attachment references are no longer retrievable through the API — see the Attachments row below for how the attachment media itself is handled. Metadata about the message is retained: message identifiers, timestamps, phone numbers, and delivery state. Metadata retention is not bounded by this window. Bounded operational copies, such as backups and delivery queues, expire on their own separate schedules. There is no per-message flag; ephemerality is applied automatically based on your configuration.
967
+ *
968
+ * The window can be set anywhere from **60 minutes to 24 hours**, and defaults to **24 hours**. Ask your Linq support contact to configure a shorter window; it cannot be changed through the API.
967
969
  *
968
970
  * You can request it at two scopes:
969
971
  *
970
972
  * | Scope | Effect |
971
973
  * |---|---|
972
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
973
- * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
974
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account has its content removed from the API surface after your configured window. Metadata is retained. |
975
+ * | **Per phone number** | Only the specified phone numbers have message content removed from the API surface this way. The rest follow the standard message-retention policy. |
974
976
  *
975
977
  * **Behavioral differences vs the standard default:**
976
978
  *
977
979
  * | Aspect | Standard | Ephemeral |
978
980
  * |---|---|---|
979
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
980
- * | After expiry | Message stays retrievable | Message is permanently deleted — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
981
- * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
981
+ * | Retention | Retained per the standard message-retention policy | **Hard backstop: your configured window** (60 minutes – 24 hours, default 24 hours) from when the message is created |
982
+ * | After expiry | Message stays retrievable | Message content is no longer retrievable — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
983
+ * | Content on expiry | N/A | Text, formatting, and attachment references are removed from the API surface, not blanked out in place. Metadata (identifiers, timestamps, phone numbers, delivery state) is retained; its retention is not bounded by this window |
984
+ * | Attachments | Retained | Media sent on the **ephemeral attachments tier** is removed on its own storage backstop — within roughly 24–48 hours of upload — independently of the message window, so it can outlast a window shorter than a day. Attachments on the persistent tier (including pre-uploads via `POST /v3/attachments`) are kept until you `DELETE` them |
982
985
  * | Cross-partner isolation | Enforced | Enforced |
983
986
  *
984
- * **How the 24-hour window works:**
987
+ * **How the retention window works:**
985
988
  *
986
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
987
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
989
+ * - The window runs from **message creation** (`created_at`). It is configured for your account (60 minutes – 24 hours, default 24 hours) and cannot be set per message.
990
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
988
991
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
992
+ * - **Deletion happens shortly *after* the window, not exactly at it.** A background sweep runs every ~5 minutes, so a message typically stops being retrievable within about 5 minutes of its expiry, and longer while a backlog is being worked through. Treat the window as the guaranteed *minimum* retention, never as an exact deletion time or an upper bound.
989
993
  *
990
994
  * **What you observe:**
991
995
  *
992
- * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time. If you need it, compute `created_at + 24h` yourself.
996
+ * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time, and they do not report your configured window either — so if you are on a window shorter than 24 hours you cannot derive a message's expiry from the API today. Track the window you agreed with your Linq support contact and compute `created_at + window` yourself.
993
997
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
994
- * - **The backstop governs Linq storage.** API retrievability (the `404` behavior above) and CDN media expire at the 24-hour mark. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
998
+ * - **The attachment backstop is separate from the message window.** API retrievability (the `404` behavior above) ends at your configured window. Ephemeral-tier media objects are removed on their own storage backstop — within roughly 24–48 hours of upload — which is independent of the message window and can outlast a window shorter than a day. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
995
999
  * - **Delivery is unaffected.** Ephemeral messages send, deliver, and fire the usual `message.sent` / `message.received` and status webhooks exactly like standard messages. Only retention changes.
996
1000
  *
997
1001
  * **When to choose ephemeral:**
@@ -1000,7 +1004,7 @@ export class LinqAPIV3 {
1000
1004
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
1001
1005
  * - Your application is the system of record — you capture what you need from the delivery webhook in real time and do not rely on reading message history back from Linq later.
1002
1006
  *
1003
- * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
1007
+ * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message once its window passes, persist anything you need to keep from the webhook payload at the time it is delivered.
1004
1008
  *
1005
1009
  */
1006
1010
  messages: API.Messages = new API.Messages(this);
@@ -1030,13 +1034,28 @@ export class LinqAPIV3 {
1030
1034
  * - **Reduce message send latency** — the file is already stored, so sending is faster
1031
1035
  *
1032
1036
  * **How it works:**
1033
- * 1. `POST /v3/attachments` with file metadata → returns a presigned `upload_url` (valid for **15 minutes**) and a permanent `attachment_id`
1037
+ * 1. `POST /v3/attachments` with file metadata → returns a presigned `upload_url` (valid for **15 minutes**) and a reusable `attachment_id`
1034
1038
  * 2. PUT the raw file bytes to the `upload_url` with the `required_headers` (no JSON or multipart — just the binary content)
1035
- * 3. Reference the `attachment_id` in your media part when sending messages (no expiration)
1039
+ * 3. Reference the `attachment_id` in your media part when sending messages (stays valid unless deleted — see [Attachment Lifetime](#attachment-lifetime))
1036
1040
  *
1037
1041
  * **Key difference:** When you provide an external `url`, we download and process the file on every send.
1038
1042
  * When you use a pre-uploaded `attachment_id`, the file is already stored — so repeated sends skip the download step entirely.
1039
1043
  *
1044
+ * ## Attachment Lifetime
1045
+ *
1046
+ * An `attachment_id` and its CDN URL stay valid until the file is deleted. Three things delete it:
1047
+ *
1048
+ * | Trigger | Applies to |
1049
+ * |---|---|
1050
+ * | `DELETE /v3/attachments/{attachmentId}` | Any attachment you own |
1051
+ * | Ephemeral **attachments** tier (24–48h storage backstop) | Attachments on ephemeral-tier partners or phone numbers |
1052
+ * | Ephemeral **messages** tier | Does **not** remove attachment bytes on its own: ephemeral-tier objects are removed by the 24–48h storage backstop above, and persistent-tier attachments are kept until you `DELETE` them explicitly. |
1053
+ *
1054
+ * Deletion is not reversible, and there is no `attachment.deleted` webhook. On either
1055
+ * ephemeral tier, download anything you need to keep when you receive it rather than
1056
+ * re-fetching later, and do not assume a pre-uploaded `attachment_id` can be reused
1057
+ * indefinitely.
1058
+ *
1040
1059
  * ## Domain Allowlisting
1041
1060
  *
1042
1061
  * Attachment URLs in API responses are served from `cdn.linqapp.com`. This includes:
@@ -1087,7 +1106,7 @@ export class LinqAPIV3 {
1087
1106
  *
1088
1107
  * | Tier | URL pattern | TTL |
1089
1108
  * |---|---|---|
1090
- * | Persistent (default) | `https://cdn.linqapp.com/attachments/partners/{partner_id}/{attachment_id}/{filename}` | Long-lived |
1109
+ * | Persistent (default) | `https://cdn.linqapp.com/attachments/partners/{partner_id}/{attachment_id}/{filename}` | Long-lived — the URL itself does not expire, but see [Attachment Lifetime](#attachment-lifetime) |
1091
1110
  * | Ephemeral | Pre-signed URL pointing at the ephemeral prefix on `cdn.linqapp.com` | 15 minutes per signed URL — re-fetch via the API for a fresh URL |
1092
1111
  *
1093
1112
  * Inbound media you receive over webhooks uses the same layout your outbound sends produce, so the URL you store and the URL you build look identical — no special casing in your client.
@@ -1106,7 +1125,7 @@ export class LinqAPIV3 {
1106
1125
  * | Aspect | Persistent | Ephemeral |
1107
1126
  * |---|---|---|
1108
1127
  * | Download URL form | Long-lived CDN URL | Pre-signed URL with short TTL |
1109
- * | Retention floor | Indefinite (until you call `DELETE`) | **Hard backstop: 1 day** — even without an explicit `DELETE`, the platform removes the underlying bytes after 24 hours |
1128
+ * | Retention floor | Until you call `DELETE` | **Hard backstop: 24–48h** — even without an explicit `DELETE`, the platform removes the underlying bytes within roughly 24–48 hours of upload |
1110
1129
  * | URL re-fetch | Not required | Fetch via `GET /v3/attachments/{attachmentId}` for a fresh signed URL after TTL expiry |
1111
1130
  * | Cross-partner isolation | Enforced | Enforced |
1112
1131
  *
@@ -1166,9 +1185,9 @@ export class LinqAPIV3 {
1166
1185
  *
1167
1186
  * | Data | Persistent tier | Ephemeral tier |
1168
1187
  * |---|---|---|
1169
- * | Attachment bytes | Retained until you `DELETE` | **Auto-removed after 1 day**, also removable via `DELETE` |
1188
+ * | Attachment bytes | Retained until you `DELETE` | **Auto-removed within roughly 24–48 hours** of upload, independently of any message window. Also removable via `DELETE` |
1170
1189
  * | Attachment metadata (id, filename, mime type, size) | Retained until you `DELETE` | Removed alongside the bytes |
1171
- * | Message body & parts | Retained per message-retention policy | Retained per message-retention policy — unless the line also has **ephemeral messages** enabled (see the Messages page), in which case the message and its parts are deleted 24 hours after creation |
1190
+ * | Message body & parts | Retained per message-retention policy | Retained per message-retention policy — unless the line also has **ephemeral messages** enabled (see the Messages page), in which case the message's text, formatting, and attachment references are no longer retrievable through the API after that account's configured retention window (60 minutes – 24 hours, default 24 hours) from creation. Metadata is retained; see the Messages page for details |
1172
1191
  * | Audit log of deletions | Retained per platform retention policy | Retained per platform retention policy |
1173
1192
  *
1174
1193
  * **In transit:** TLS 1.2+ everywhere. **At rest:** AES-256 (server-side encryption).
@@ -1180,7 +1199,7 @@ export class LinqAPIV3 {
1180
1199
  * - Allowlist exactly one outbound domain: `cdn.linqapp.com`.
1181
1200
  * - Decide whether you need ephemeral attachments (high-sensitivity content) — request enablement through your Linq support contact.
1182
1201
  * - Implement `DELETE /v3/attachments/{attachmentId}` calls in your deletion workflow.
1183
- * - Persist any attachments your application needs long-term — Linq is the authoritative source until you delete, but the ephemeral tier auto-purges after 1 day.
1202
+ * - Persist any attachments your application needs long-term — Linq is the authoritative source until you delete, but the ephemeral tier auto-purges within roughly 24–48 hours of upload.
1184
1203
  * - For audit: every deletion is logged on Linq's side. Surface a confirmation in your application UI based on the `204` response.
1185
1204
  * - For end-user "right to delete" requests: enumerate attachment ids and `DELETE` each. The platform does not provide a partner-wide wipe endpoint — deletion is per-attachment by design.
1186
1205
  *
@@ -32,13 +32,28 @@ import { path } from '../internal/utils/path';
32
32
  * - **Reduce message send latency** — the file is already stored, so sending is faster
33
33
  *
34
34
  * **How it works:**
35
- * 1. `POST /v3/attachments` with file metadata → returns a presigned `upload_url` (valid for **15 minutes**) and a permanent `attachment_id`
35
+ * 1. `POST /v3/attachments` with file metadata → returns a presigned `upload_url` (valid for **15 minutes**) and a reusable `attachment_id`
36
36
  * 2. PUT the raw file bytes to the `upload_url` with the `required_headers` (no JSON or multipart — just the binary content)
37
- * 3. Reference the `attachment_id` in your media part when sending messages (no expiration)
37
+ * 3. Reference the `attachment_id` in your media part when sending messages (stays valid unless deleted — see [Attachment Lifetime](#attachment-lifetime))
38
38
  *
39
39
  * **Key difference:** When you provide an external `url`, we download and process the file on every send.
40
40
  * When you use a pre-uploaded `attachment_id`, the file is already stored — so repeated sends skip the download step entirely.
41
41
  *
42
+ * ## Attachment Lifetime
43
+ *
44
+ * An `attachment_id` and its CDN URL stay valid until the file is deleted. Three things delete it:
45
+ *
46
+ * | Trigger | Applies to |
47
+ * |---|---|
48
+ * | `DELETE /v3/attachments/{attachmentId}` | Any attachment you own |
49
+ * | Ephemeral **attachments** tier (24–48h storage backstop) | Attachments on ephemeral-tier partners or phone numbers |
50
+ * | Ephemeral **messages** tier | Does **not** remove attachment bytes on its own: ephemeral-tier objects are removed by the 24–48h storage backstop above, and persistent-tier attachments are kept until you `DELETE` them explicitly. |
51
+ *
52
+ * Deletion is not reversible, and there is no `attachment.deleted` webhook. On either
53
+ * ephemeral tier, download anything you need to keep when you receive it rather than
54
+ * re-fetching later, and do not assume a pre-uploaded `attachment_id` can be reused
55
+ * indefinitely.
56
+ *
42
57
  * ## Domain Allowlisting
43
58
  *
44
59
  * Attachment URLs in API responses are served from `cdn.linqapp.com`. This includes:
@@ -89,7 +104,7 @@ import { path } from '../internal/utils/path';
89
104
  *
90
105
  * | Tier | URL pattern | TTL |
91
106
  * |---|---|---|
92
- * | Persistent (default) | `https://cdn.linqapp.com/attachments/partners/{partner_id}/{attachment_id}/{filename}` | Long-lived |
107
+ * | Persistent (default) | `https://cdn.linqapp.com/attachments/partners/{partner_id}/{attachment_id}/{filename}` | Long-lived — the URL itself does not expire, but see [Attachment Lifetime](#attachment-lifetime) |
93
108
  * | Ephemeral | Pre-signed URL pointing at the ephemeral prefix on `cdn.linqapp.com` | 15 minutes per signed URL — re-fetch via the API for a fresh URL |
94
109
  *
95
110
  * Inbound media you receive over webhooks uses the same layout your outbound sends produce, so the URL you store and the URL you build look identical — no special casing in your client.
@@ -108,7 +123,7 @@ import { path } from '../internal/utils/path';
108
123
  * | Aspect | Persistent | Ephemeral |
109
124
  * |---|---|---|
110
125
  * | Download URL form | Long-lived CDN URL | Pre-signed URL with short TTL |
111
- * | Retention floor | Indefinite (until you call `DELETE`) | **Hard backstop: 1 day** — even without an explicit `DELETE`, the platform removes the underlying bytes after 24 hours |
126
+ * | Retention floor | Until you call `DELETE` | **Hard backstop: 24–48h** — even without an explicit `DELETE`, the platform removes the underlying bytes within roughly 24–48 hours of upload |
112
127
  * | URL re-fetch | Not required | Fetch via `GET /v3/attachments/{attachmentId}` for a fresh signed URL after TTL expiry |
113
128
  * | Cross-partner isolation | Enforced | Enforced |
114
129
  *
@@ -168,9 +183,9 @@ import { path } from '../internal/utils/path';
168
183
  *
169
184
  * | Data | Persistent tier | Ephemeral tier |
170
185
  * |---|---|---|
171
- * | Attachment bytes | Retained until you `DELETE` | **Auto-removed after 1 day**, also removable via `DELETE` |
186
+ * | Attachment bytes | Retained until you `DELETE` | **Auto-removed within roughly 24–48 hours** of upload, independently of any message window. Also removable via `DELETE` |
172
187
  * | Attachment metadata (id, filename, mime type, size) | Retained until you `DELETE` | Removed alongside the bytes |
173
- * | Message body & parts | Retained per message-retention policy | Retained per message-retention policy — unless the line also has **ephemeral messages** enabled (see the Messages page), in which case the message and its parts are deleted 24 hours after creation |
188
+ * | Message body & parts | Retained per message-retention policy | Retained per message-retention policy — unless the line also has **ephemeral messages** enabled (see the Messages page), in which case the message's text, formatting, and attachment references are no longer retrievable through the API after that account's configured retention window (60 minutes – 24 hours, default 24 hours) from creation. Metadata is retained; see the Messages page for details |
174
189
  * | Audit log of deletions | Retained per platform retention policy | Retained per platform retention policy |
175
190
  *
176
191
  * **In transit:** TLS 1.2+ everywhere. **At rest:** AES-256 (server-side encryption).
@@ -182,7 +197,7 @@ import { path } from '../internal/utils/path';
182
197
  * - Allowlist exactly one outbound domain: `cdn.linqapp.com`.
183
198
  * - Decide whether you need ephemeral attachments (high-sensitivity content) — request enablement through your Linq support contact.
184
199
  * - Implement `DELETE /v3/attachments/{attachmentId}` calls in your deletion workflow.
185
- * - Persist any attachments your application needs long-term — Linq is the authoritative source until you delete, but the ephemeral tier auto-purges after 1 day.
200
+ * - Persist any attachments your application needs long-term — Linq is the authoritative source until you delete, but the ephemeral tier auto-purges within roughly 24–48 hours of upload.
186
201
  * - For audit: every deletion is logged on Linq's side. Surface a confirmation in your application UI based on the `204` response.
187
202
  * - For end-user "right to delete" requests: enumerate attachment ids and `DELETE` each. The platform does not provide a partner-wide wipe endpoint — deletion is per-attachment by design.
188
203
  */
@@ -192,8 +207,11 @@ export class Attachments extends APIResource {
192
207
  * your message's media part — no pre-upload required. Use this endpoint only when
193
208
  * you want to upload a file ahead of time for reuse or latency optimization.
194
209
  *
195
- * Returns a presigned upload URL and a permanent `attachment_id` you can reference
196
- * in future messages.
210
+ * Returns a presigned upload URL and a reusable `attachment_id` you can reference
211
+ * in future messages. Attachments stored on the **ephemeral attachments tier**
212
+ * (and their URLs) are removed within roughly 24–48 hours of upload, independently
213
+ * of any message retention window. Attachments on the persistent tier are kept
214
+ * until you `DELETE` them, regardless of message expiry.
197
215
  *
198
216
  * ## Step 1: Request an upload URL
199
217
  *
@@ -207,7 +225,7 @@ export class Attachments extends APIResource {
207
225
  * }
208
226
  * ```
209
227
  *
210
- * The response includes an `upload_url` (valid for 15 minutes) and a permanent
228
+ * The response includes an `upload_url` (valid for 15 minutes) and a reusable
211
229
  * `attachment_id`.
212
230
  *
213
231
  * ## Step 2: Upload the file
@@ -231,7 +249,9 @@ export class Attachments extends APIResource {
231
249
  * ## Step 3: Send a message with the attachment
232
250
  *
233
251
  * Reference the `attachment_id` in a media part with `POST /v3/chats`. The ID
234
- * never expires use it in as many messages as you want.
252
+ * stays valid for as many messages as you want — unless the attachment is stored
253
+ * on the ephemeral attachments tier, in which case it is removed within roughly
254
+ * 24–48 hours of upload.
235
255
  *
236
256
  * ```json
237
257
  * {
@@ -409,8 +429,10 @@ export interface AttachmentCreateResponse {
409
429
  attachment_id: string;
410
430
 
411
431
  /**
412
- * Permanent CDN URL for the file. Does not expire. Use the `attachment_id` to
413
- * reference this file in media parts when sending messages.
432
+ * Stable CDN URL for the file. Use the `attachment_id` to reference this file in
433
+ * media parts when sending messages. Files on the ephemeral attachments tier — and
434
+ * this URL — are removed within roughly 24–48 hours of upload, independently of
435
+ * any message retention window.
414
436
  */
415
437
  download_url: string;
416
438
 
@@ -36,35 +36,39 @@ import { path } from '../../internal/utils/path';
36
36
  *
37
37
  * ## Ephemeral Messages (Privacy Tier)
38
38
  *
39
- * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is automatically given a fixed **24-hour retention window** after that window the platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
39
+ * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is given a **retention window configured for your account**. After that window, the message's text, formatting, and attachment references are no longer retrievable through the API — see the Attachments row below for how the attachment media itself is handled. Metadata about the message is retained: message identifiers, timestamps, phone numbers, and delivery state. Metadata retention is not bounded by this window. Bounded operational copies, such as backups and delivery queues, expire on their own separate schedules. There is no per-message flag; ephemerality is applied automatically based on your configuration.
40
+ *
41
+ * The window can be set anywhere from **60 minutes to 24 hours**, and defaults to **24 hours**. Ask your Linq support contact to configure a shorter window; it cannot be changed through the API.
40
42
  *
41
43
  * You can request it at two scopes:
42
44
  *
43
45
  * | Scope | Effect |
44
46
  * |---|---|
45
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
46
- * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
47
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account has its content removed from the API surface after your configured window. Metadata is retained. |
48
+ * | **Per phone number** | Only the specified phone numbers have message content removed from the API surface this way. The rest follow the standard message-retention policy. |
47
49
  *
48
50
  * **Behavioral differences vs the standard default:**
49
51
  *
50
52
  * | Aspect | Standard | Ephemeral |
51
53
  * |---|---|---|
52
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
53
- * | After expiry | Message stays retrievable | Message is permanently deleted — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
54
- * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
54
+ * | Retention | Retained per the standard message-retention policy | **Hard backstop: your configured window** (60 minutes – 24 hours, default 24 hours) from when the message is created |
55
+ * | After expiry | Message stays retrievable | Message content is no longer retrievable — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
56
+ * | Content on expiry | N/A | Text, formatting, and attachment references are removed from the API surface, not blanked out in place. Metadata (identifiers, timestamps, phone numbers, delivery state) is retained; its retention is not bounded by this window |
57
+ * | Attachments | Retained | Media sent on the **ephemeral attachments tier** is removed on its own storage backstop — within roughly 24–48 hours of upload — independently of the message window, so it can outlast a window shorter than a day. Attachments on the persistent tier (including pre-uploads via `POST /v3/attachments`) are kept until you `DELETE` them |
55
58
  * | Cross-partner isolation | Enforced | Enforced |
56
59
  *
57
- * **How the 24-hour window works:**
60
+ * **How the retention window works:**
58
61
  *
59
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
60
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
62
+ * - The window runs from **message creation** (`created_at`). It is configured for your account (60 minutes – 24 hours, default 24 hours) and cannot be set per message.
63
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
61
64
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
65
+ * - **Deletion happens shortly *after* the window, not exactly at it.** A background sweep runs every ~5 minutes, so a message typically stops being retrievable within about 5 minutes of its expiry, and longer while a backlog is being worked through. Treat the window as the guaranteed *minimum* retention, never as an exact deletion time or an upper bound.
62
66
  *
63
67
  * **What you observe:**
64
68
  *
65
- * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time. If you need it, compute `created_at + 24h` yourself.
69
+ * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time, and they do not report your configured window either — so if you are on a window shorter than 24 hours you cannot derive a message's expiry from the API today. Track the window you agreed with your Linq support contact and compute `created_at + window` yourself.
66
70
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
67
- * - **The backstop governs Linq storage.** API retrievability (the `404` behavior above) and CDN media expire at the 24-hour mark. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
71
+ * - **The attachment backstop is separate from the message window.** API retrievability (the `404` behavior above) ends at your configured window. Ephemeral-tier media objects are removed on their own storage backstop — within roughly 24–48 hours of upload — which is independent of the message window and can outlast a window shorter than a day. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
68
72
  * - **Delivery is unaffected.** Ephemeral messages send, deliver, and fire the usual `message.sent` / `message.received` and status webhooks exactly like standard messages. Only retention changes.
69
73
  *
70
74
  * **When to choose ephemeral:**
@@ -73,7 +77,7 @@ import { path } from '../../internal/utils/path';
73
77
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
74
78
  * - Your application is the system of record — you capture what you need from the delivery webhook in real time and do not rely on reading message history back from Linq later.
75
79
  *
76
- * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
80
+ * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message once its window passes, persist anything you need to keep from the webhook payload at the time it is delivered.
77
81
  */
78
82
  export class Messages extends APIResource {
79
83
  /**
@@ -28,35 +28,39 @@ import { path } from '../../internal/utils/path';
28
28
  *
29
29
  * ## Ephemeral Messages (Privacy Tier)
30
30
  *
31
- * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is automatically given a fixed **24-hour retention window** after that window the platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
31
+ * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is given a **retention window configured for your account**. After that window, the message's text, formatting, and attachment references are no longer retrievable through the API — see the Attachments row below for how the attachment media itself is handled. Metadata about the message is retained: message identifiers, timestamps, phone numbers, and delivery state. Metadata retention is not bounded by this window. Bounded operational copies, such as backups and delivery queues, expire on their own separate schedules. There is no per-message flag; ephemerality is applied automatically based on your configuration.
32
+ *
33
+ * The window can be set anywhere from **60 minutes to 24 hours**, and defaults to **24 hours**. Ask your Linq support contact to configure a shorter window; it cannot be changed through the API.
32
34
  *
33
35
  * You can request it at two scopes:
34
36
  *
35
37
  * | Scope | Effect |
36
38
  * |---|---|
37
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
38
- * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
39
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account has its content removed from the API surface after your configured window. Metadata is retained. |
40
+ * | **Per phone number** | Only the specified phone numbers have message content removed from the API surface this way. The rest follow the standard message-retention policy. |
39
41
  *
40
42
  * **Behavioral differences vs the standard default:**
41
43
  *
42
44
  * | Aspect | Standard | Ephemeral |
43
45
  * |---|---|---|
44
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
45
- * | After expiry | Message stays retrievable | Message is permanently deleted — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
46
- * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
46
+ * | Retention | Retained per the standard message-retention policy | **Hard backstop: your configured window** (60 minutes – 24 hours, default 24 hours) from when the message is created |
47
+ * | After expiry | Message stays retrievable | Message content is no longer retrievable — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
48
+ * | Content on expiry | N/A | Text, formatting, and attachment references are removed from the API surface, not blanked out in place. Metadata (identifiers, timestamps, phone numbers, delivery state) is retained; its retention is not bounded by this window |
49
+ * | Attachments | Retained | Media sent on the **ephemeral attachments tier** is removed on its own storage backstop — within roughly 24–48 hours of upload — independently of the message window, so it can outlast a window shorter than a day. Attachments on the persistent tier (including pre-uploads via `POST /v3/attachments`) are kept until you `DELETE` them |
47
50
  * | Cross-partner isolation | Enforced | Enforced |
48
51
  *
49
- * **How the 24-hour window works:**
52
+ * **How the retention window works:**
50
53
  *
51
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
52
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
54
+ * - The window runs from **message creation** (`created_at`). It is configured for your account (60 minutes – 24 hours, default 24 hours) and cannot be set per message.
55
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
53
56
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
57
+ * - **Deletion happens shortly *after* the window, not exactly at it.** A background sweep runs every ~5 minutes, so a message typically stops being retrievable within about 5 minutes of its expiry, and longer while a backlog is being worked through. Treat the window as the guaranteed *minimum* retention, never as an exact deletion time or an upper bound.
54
58
  *
55
59
  * **What you observe:**
56
60
  *
57
- * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time. If you need it, compute `created_at + 24h` yourself.
61
+ * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time, and they do not report your configured window either — so if you are on a window shorter than 24 hours you cannot derive a message's expiry from the API today. Track the window you agreed with your Linq support contact and compute `created_at + window` yourself.
58
62
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
59
- * - **The backstop governs Linq storage.** API retrievability (the `404` behavior above) and CDN media expire at the 24-hour mark. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
63
+ * - **The attachment backstop is separate from the message window.** API retrievability (the `404` behavior above) ends at your configured window. Ephemeral-tier media objects are removed on their own storage backstop — within roughly 24–48 hours of upload — which is independent of the message window and can outlast a window shorter than a day. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
60
64
  * - **Delivery is unaffected.** Ephemeral messages send, deliver, and fire the usual `message.sent` / `message.received` and status webhooks exactly like standard messages. Only retention changes.
61
65
  *
62
66
  * **When to choose ephemeral:**
@@ -65,7 +69,7 @@ import { path } from '../../internal/utils/path';
65
69
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
66
70
  * - Your application is the system of record — you capture what you need from the delivery webhook in real time and do not rely on reading message history back from Linq later.
67
71
  *
68
- * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
72
+ * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message once its window passes, persist anything you need to keep from the webhook payload at the time it is delivered.
69
73
  */
70
74
  export class Polls extends APIResource {
71
75
  /**
@@ -38,35 +38,39 @@ import { path } from '../../internal/utils/path';
38
38
  *
39
39
  * ## Ephemeral Messages (Privacy Tier)
40
40
  *
41
- * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is automatically given a fixed **24-hour retention window** after that window the platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
41
+ * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is given a **retention window configured for your account**. After that window, the message's text, formatting, and attachment references are no longer retrievable through the API — see the Attachments row below for how the attachment media itself is handled. Metadata about the message is retained: message identifiers, timestamps, phone numbers, and delivery state. Metadata retention is not bounded by this window. Bounded operational copies, such as backups and delivery queues, expire on their own separate schedules. There is no per-message flag; ephemerality is applied automatically based on your configuration.
42
+ *
43
+ * The window can be set anywhere from **60 minutes to 24 hours**, and defaults to **24 hours**. Ask your Linq support contact to configure a shorter window; it cannot be changed through the API.
42
44
  *
43
45
  * You can request it at two scopes:
44
46
  *
45
47
  * | Scope | Effect |
46
48
  * |---|---|
47
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
48
- * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
49
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account has its content removed from the API surface after your configured window. Metadata is retained. |
50
+ * | **Per phone number** | Only the specified phone numbers have message content removed from the API surface this way. The rest follow the standard message-retention policy. |
49
51
  *
50
52
  * **Behavioral differences vs the standard default:**
51
53
  *
52
54
  * | Aspect | Standard | Ephemeral |
53
55
  * |---|---|---|
54
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
55
- * | After expiry | Message stays retrievable | Message is permanently deleted — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
56
- * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
56
+ * | Retention | Retained per the standard message-retention policy | **Hard backstop: your configured window** (60 minutes – 24 hours, default 24 hours) from when the message is created |
57
+ * | After expiry | Message stays retrievable | Message content is no longer retrievable — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
58
+ * | Content on expiry | N/A | Text, formatting, and attachment references are removed from the API surface, not blanked out in place. Metadata (identifiers, timestamps, phone numbers, delivery state) is retained; its retention is not bounded by this window |
59
+ * | Attachments | Retained | Media sent on the **ephemeral attachments tier** is removed on its own storage backstop — within roughly 24–48 hours of upload — independently of the message window, so it can outlast a window shorter than a day. Attachments on the persistent tier (including pre-uploads via `POST /v3/attachments`) are kept until you `DELETE` them |
57
60
  * | Cross-partner isolation | Enforced | Enforced |
58
61
  *
59
- * **How the 24-hour window works:**
62
+ * **How the retention window works:**
60
63
  *
61
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
62
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
64
+ * - The window runs from **message creation** (`created_at`). It is configured for your account (60 minutes – 24 hours, default 24 hours) and cannot be set per message.
65
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
63
66
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
67
+ * - **Deletion happens shortly *after* the window, not exactly at it.** A background sweep runs every ~5 minutes, so a message typically stops being retrievable within about 5 minutes of its expiry, and longer while a backlog is being worked through. Treat the window as the guaranteed *minimum* retention, never as an exact deletion time or an upper bound.
64
68
  *
65
69
  * **What you observe:**
66
70
  *
67
- * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time. If you need it, compute `created_at + 24h` yourself.
71
+ * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time, and they do not report your configured window either — so if you are on a window shorter than 24 hours you cannot derive a message's expiry from the API today. Track the window you agreed with your Linq support contact and compute `created_at + window` yourself.
68
72
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
69
- * - **The backstop governs Linq storage.** API retrievability (the `404` behavior above) and CDN media expire at the 24-hour mark. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
73
+ * - **The attachment backstop is separate from the message window.** API retrievability (the `404` behavior above) ends at your configured window. Ephemeral-tier media objects are removed on their own storage backstop — within roughly 24–48 hours of upload — which is independent of the message window and can outlast a window shorter than a day. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
70
74
  * - **Delivery is unaffected.** Ephemeral messages send, deliver, and fire the usual `message.sent` / `message.received` and status webhooks exactly like standard messages. Only retention changes.
71
75
  *
72
76
  * **When to choose ephemeral:**
@@ -75,7 +79,7 @@ import { path } from '../../internal/utils/path';
75
79
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
76
80
  * - Your application is the system of record — you capture what you need from the delivery webhook in real time and do not rely on reading message history back from Linq later.
77
81
  *
78
- * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
82
+ * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message once its window passes, persist anything you need to keep from the webhook payload at the time it is delivered.
79
83
  */
80
84
  export class Messages extends APIResource {
81
85
  poll: PollAPI.Poll = new PollAPI.Poll(this._client);
@@ -28,35 +28,39 @@ import { path } from '../../internal/utils/path';
28
28
  *
29
29
  * ## Ephemeral Messages (Privacy Tier)
30
30
  *
31
- * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is automatically given a fixed **24-hour retention window** after that window the platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
31
+ * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is given a **retention window configured for your account**. After that window, the message's text, formatting, and attachment references are no longer retrievable through the API — see the Attachments row below for how the attachment media itself is handled. Metadata about the message is retained: message identifiers, timestamps, phone numbers, and delivery state. Metadata retention is not bounded by this window. Bounded operational copies, such as backups and delivery queues, expire on their own separate schedules. There is no per-message flag; ephemerality is applied automatically based on your configuration.
32
+ *
33
+ * The window can be set anywhere from **60 minutes to 24 hours**, and defaults to **24 hours**. Ask your Linq support contact to configure a shorter window; it cannot be changed through the API.
32
34
  *
33
35
  * You can request it at two scopes:
34
36
  *
35
37
  * | Scope | Effect |
36
38
  * |---|---|
37
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
38
- * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
39
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account has its content removed from the API surface after your configured window. Metadata is retained. |
40
+ * | **Per phone number** | Only the specified phone numbers have message content removed from the API surface this way. The rest follow the standard message-retention policy. |
39
41
  *
40
42
  * **Behavioral differences vs the standard default:**
41
43
  *
42
44
  * | Aspect | Standard | Ephemeral |
43
45
  * |---|---|---|
44
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
45
- * | After expiry | Message stays retrievable | Message is permanently deleted — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
46
- * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
46
+ * | Retention | Retained per the standard message-retention policy | **Hard backstop: your configured window** (60 minutes – 24 hours, default 24 hours) from when the message is created |
47
+ * | After expiry | Message stays retrievable | Message content is no longer retrievable — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
48
+ * | Content on expiry | N/A | Text, formatting, and attachment references are removed from the API surface, not blanked out in place. Metadata (identifiers, timestamps, phone numbers, delivery state) is retained; its retention is not bounded by this window |
49
+ * | Attachments | Retained | Media sent on the **ephemeral attachments tier** is removed on its own storage backstop — within roughly 24–48 hours of upload — independently of the message window, so it can outlast a window shorter than a day. Attachments on the persistent tier (including pre-uploads via `POST /v3/attachments`) are kept until you `DELETE` them |
47
50
  * | Cross-partner isolation | Enforced | Enforced |
48
51
  *
49
- * **How the 24-hour window works:**
52
+ * **How the retention window works:**
50
53
  *
51
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
52
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
54
+ * - The window runs from **message creation** (`created_at`). It is configured for your account (60 minutes – 24 hours, default 24 hours) and cannot be set per message.
55
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
53
56
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
57
+ * - **Deletion happens shortly *after* the window, not exactly at it.** A background sweep runs every ~5 minutes, so a message typically stops being retrievable within about 5 minutes of its expiry, and longer while a backlog is being worked through. Treat the window as the guaranteed *minimum* retention, never as an exact deletion time or an upper bound.
54
58
  *
55
59
  * **What you observe:**
56
60
  *
57
- * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time. If you need it, compute `created_at + 24h` yourself.
61
+ * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time, and they do not report your configured window either — so if you are on a window shorter than 24 hours you cannot derive a message's expiry from the API today. Track the window you agreed with your Linq support contact and compute `created_at + window` yourself.
58
62
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
59
- * - **The backstop governs Linq storage.** API retrievability (the `404` behavior above) and CDN media expire at the 24-hour mark. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
63
+ * - **The attachment backstop is separate from the message window.** API retrievability (the `404` behavior above) ends at your configured window. Ephemeral-tier media objects are removed on their own storage backstop — within roughly 24–48 hours of upload — which is independent of the message window and can outlast a window shorter than a day. Removal of the corresponding entries from the sending device happens asynchronously and can complete after the backstop.
60
64
  * - **Delivery is unaffected.** Ephemeral messages send, deliver, and fire the usual `message.sent` / `message.received` and status webhooks exactly like standard messages. Only retention changes.
61
65
  *
62
66
  * **When to choose ephemeral:**
@@ -65,7 +69,7 @@ import { path } from '../../internal/utils/path';
65
69
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
66
70
  * - Your application is the system of record — you capture what you need from the delivery webhook in real time and do not rely on reading message history back from Linq later.
67
71
  *
68
- * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
72
+ * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message once its window passes, persist anything you need to keep from the webhook payload at the time it is delivered.
69
73
  */
70
74
  export class Poll extends APIResource {
71
75
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.55.0'; // x-release-please-version
1
+ export const VERSION = '0.55.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.55.0";
1
+ export declare const VERSION = "0.55.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.55.0";
1
+ export declare const VERSION = "0.55.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.55.0'; // x-release-please-version
4
+ exports.VERSION = '0.55.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.55.0'; // x-release-please-version
1
+ export const VERSION = '0.55.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map