@linqapp/sdk 0.55.0 → 0.55.1

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 +7 -0
  2. package/client.d.mts +35 -16
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +35 -16
  5. package/client.d.ts.map +1 -1
  6. package/client.js +35 -16
  7. package/client.js.map +1 -1
  8. package/client.mjs +35 -16
  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 +13 -9
  20. package/resources/chats/messages.d.mts.map +1 -1
  21. package/resources/chats/messages.d.ts +13 -9
  22. package/resources/chats/messages.d.ts.map +1 -1
  23. package/resources/chats/messages.js +13 -9
  24. package/resources/chats/messages.js.map +1 -1
  25. package/resources/chats/messages.mjs +13 -9
  26. package/resources/chats/messages.mjs.map +1 -1
  27. package/resources/chats/polls.d.mts +13 -9
  28. package/resources/chats/polls.d.mts.map +1 -1
  29. package/resources/chats/polls.d.ts +13 -9
  30. package/resources/chats/polls.d.ts.map +1 -1
  31. package/resources/chats/polls.js +13 -9
  32. package/resources/chats/polls.js.map +1 -1
  33. package/resources/chats/polls.mjs +13 -9
  34. package/resources/chats/polls.mjs.map +1 -1
  35. package/resources/messages/messages.d.mts +13 -9
  36. package/resources/messages/messages.d.mts.map +1 -1
  37. package/resources/messages/messages.d.ts +13 -9
  38. package/resources/messages/messages.d.ts.map +1 -1
  39. package/resources/messages/messages.js +13 -9
  40. package/resources/messages/messages.js.map +1 -1
  41. package/resources/messages/messages.mjs +13 -9
  42. package/resources/messages/messages.mjs.map +1 -1
  43. package/resources/messages/poll.d.mts +13 -9
  44. package/resources/messages/poll.d.mts.map +1 -1
  45. package/resources/messages/poll.d.ts +13 -9
  46. package/resources/messages/poll.d.ts.map +1 -1
  47. package/resources/messages/poll.js +13 -9
  48. package/resources/messages/poll.js.map +1 -1
  49. package/resources/messages/poll.mjs +13 -9
  50. package/resources/messages/poll.mjs.map +1 -1
  51. package/src/client.ts +35 -16
  52. package/src/resources/attachments.ts +35 -13
  53. package/src/resources/chats/messages.ts +13 -9
  54. package/src/resources/chats/polls.ts +13 -9
  55. package/src/resources/messages/messages.ts +13 -9
  56. package/src/resources/messages/poll.ts +13 -9
  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
@@ -27,35 +27,39 @@ import { path } from "../../internal/utils/path.mjs";
27
27
  *
28
28
  * ## Ephemeral Messages (Privacy Tier)
29
29
  *
30
- * 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.
30
+ * 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 platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
31
+ *
32
+ * 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.
31
33
  *
32
34
  * You can request it at two scopes:
33
35
  *
34
36
  * | Scope | Effect |
35
37
  * |---|---|
36
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
38
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for your configured window, then deleted. |
37
39
  * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
38
40
  *
39
41
  * **Behavioral differences vs the standard default:**
40
42
  *
41
43
  * | Aspect | Standard | Ephemeral |
42
44
  * |---|---|---|
43
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
45
+ * | 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 |
44
46
  * | 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` |
45
47
  * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
48
+ * | 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 |
46
49
  * | Cross-partner isolation | Enforced | Enforced |
47
50
  *
48
- * **How the 24-hour window works:**
51
+ * **How the retention window works:**
49
52
  *
50
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
51
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
53
+ * - 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.
54
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
52
55
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
56
+ * - **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.
53
57
  *
54
58
  * **What you observe:**
55
59
  *
56
- * - **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.
60
+ * - **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.
57
61
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
58
- * - **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.
62
+ * - **The backstop governs Linq storage.** 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.
59
63
  * - **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.
60
64
  *
61
65
  * **When to choose ephemeral:**
@@ -64,7 +68,7 @@ import { path } from "../../internal/utils/path.mjs";
64
68
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
65
69
  * - 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.
66
70
  *
67
- * **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.
71
+ * **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.
68
72
  */
69
73
  export class Messages extends APIResource {
70
74
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/messages/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,KAAK,OAAO,mBAAe;AAClC,OAAO,EAAE,IAAI,EAAwC,mBAAe;AAEpE,OAAO,EACL,sBAAsB,GAGvB,kCAA8B;AAC/B,OAAO,EAAE,YAAY,EAAE,mCAA+B;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## Ephemeral Messages (Privacy Tier)
26
26
  *
27
- * 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.
27
+ * 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 platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
28
+ *
29
+ * 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.
28
30
  *
29
31
  * You can request it at two scopes:
30
32
  *
31
33
  * | Scope | Effect |
32
34
  * |---|---|
33
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
35
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for your configured window, then deleted. |
34
36
  * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
35
37
  *
36
38
  * **Behavioral differences vs the standard default:**
37
39
  *
38
40
  * | Aspect | Standard | Ephemeral |
39
41
  * |---|---|---|
40
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
42
+ * | 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 |
41
43
  * | 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` |
42
44
  * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
45
+ * | 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 |
43
46
  * | Cross-partner isolation | Enforced | Enforced |
44
47
  *
45
- * **How the 24-hour window works:**
48
+ * **How the retention window works:**
46
49
  *
47
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
48
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
50
+ * - 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.
51
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
49
52
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
53
+ * - **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.
50
54
  *
51
55
  * **What you observe:**
52
56
  *
53
- * - **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.
57
+ * - **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.
54
58
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
55
- * - **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.
59
+ * - **The backstop governs Linq storage.** 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.
56
60
  * - **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.
57
61
  *
58
62
  * **When to choose ephemeral:**
@@ -61,7 +65,7 @@ import { RequestOptions } from "../../internal/request-options.mjs";
61
65
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
62
66
  * - 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.
63
67
  *
64
- * **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.
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 once its window passes, persist anything you need to keep from the webhook payload at the time it is delivered.
65
69
  */
66
70
  export declare class Poll extends APIResource {
67
71
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"poll.d.mts","sourceRoot":"","sources":["../../src/resources/messages/poll.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,QAAQ,2BAAuB;AAC3C,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC;IAIxF;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC;IAIpC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC;CAG3G;AAED,MAAM,WAAW,oBAAoB;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3G;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,KAAK,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;CAC7C;AAED,yBAAiB,oBAAoB,CAAC;IACpC,UAAiB,MAAM;QACrB,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,SAAS,EAAE,KAAK,GAAG,QAAQ,CAAC;IAE5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,KAAK,cAAc,IAAI,cAAc,EAAE,CAAC;CACrG"}
@@ -24,35 +24,39 @@ import { RequestOptions } from "../../internal/request-options.js";
24
24
  *
25
25
  * ## Ephemeral Messages (Privacy Tier)
26
26
  *
27
- * 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.
27
+ * 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 platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
28
+ *
29
+ * 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.
28
30
  *
29
31
  * You can request it at two scopes:
30
32
  *
31
33
  * | Scope | Effect |
32
34
  * |---|---|
33
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
35
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for your configured window, then deleted. |
34
36
  * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
35
37
  *
36
38
  * **Behavioral differences vs the standard default:**
37
39
  *
38
40
  * | Aspect | Standard | Ephemeral |
39
41
  * |---|---|---|
40
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
42
+ * | 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 |
41
43
  * | 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` |
42
44
  * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
45
+ * | 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 |
43
46
  * | Cross-partner isolation | Enforced | Enforced |
44
47
  *
45
- * **How the 24-hour window works:**
48
+ * **How the retention window works:**
46
49
  *
47
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
48
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
50
+ * - 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.
51
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
49
52
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
53
+ * - **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.
50
54
  *
51
55
  * **What you observe:**
52
56
  *
53
- * - **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.
57
+ * - **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.
54
58
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
55
- * - **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.
59
+ * - **The backstop governs Linq storage.** 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.
56
60
  * - **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.
57
61
  *
58
62
  * **When to choose ephemeral:**
@@ -61,7 +65,7 @@ import { RequestOptions } from "../../internal/request-options.js";
61
65
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
62
66
  * - 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.
63
67
  *
64
- * **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.
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 once its window passes, persist anything you need to keep from the webhook payload at the time it is delivered.
65
69
  */
66
70
  export declare class Poll extends APIResource {
67
71
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../src/resources/messages/poll.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,QAAQ,0BAAuB;AAC3C,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,q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;;;;;;;;;;;;;GAgEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC;IAIxF;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC;IAIpC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC;CAG3G;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,KAAK,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;CAC7C;AAED,yBAAiB,oBAAoB,CAAC;IACpC,UAAiB,MAAM;QACrB,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,SAAS,EAAE,KAAK,GAAG,QAAQ,CAAC;IAE5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,KAAK,cAAc,IAAI,cAAc,EAAE,CAAC;CACrG"}
@@ -26,35 +26,39 @@ const path_1 = require("../../internal/utils/path.js");
26
26
  *
27
27
  * ## Ephemeral Messages (Privacy Tier)
28
28
  *
29
- * 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.
29
+ * 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 platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
30
+ *
31
+ * 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.
30
32
  *
31
33
  * You can request it at two scopes:
32
34
  *
33
35
  * | Scope | Effect |
34
36
  * |---|---|
35
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
37
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for your configured window, then deleted. |
36
38
  * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
37
39
  *
38
40
  * **Behavioral differences vs the standard default:**
39
41
  *
40
42
  * | Aspect | Standard | Ephemeral |
41
43
  * |---|---|---|
42
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
44
+ * | 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 |
43
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` |
44
46
  * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
47
+ * | 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 |
45
48
  * | Cross-partner isolation | Enforced | Enforced |
46
49
  *
47
- * **How the 24-hour window works:**
50
+ * **How the retention window works:**
48
51
  *
49
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
50
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
52
+ * - 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.
53
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
51
54
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
55
+ * - **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.
52
56
  *
53
57
  * **What you observe:**
54
58
  *
55
- * - **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.
59
+ * - **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.
56
60
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
57
- * - **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.
61
+ * - **The backstop governs Linq storage.** 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.
58
62
  * - **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.
59
63
  *
60
64
  * **When to choose ephemeral:**
@@ -63,7 +67,7 @@ const path_1 = require("../../internal/utils/path.js");
63
67
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
64
68
  * - 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.
65
69
  *
66
- * **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.
70
+ * **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.
67
71
  */
68
72
  class Poll extends resource_1.APIResource {
69
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"poll.js","sourceRoot":"","sources":["../../src/resources/messages/poll.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,OAAO,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,SAAiB,EACjB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,SAAiB,EAAE,IAAoB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;CACF;AAxDD,oBAwDC"}
1
+ {"version":3,"file":"poll.js","sourceRoot":"","sources":["../../src/resources/messages/poll.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,OAAO,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,SAAiB,EACjB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,SAAiB,EAAE,IAAoB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;CACF;AAxDD,oBAwDC"}
@@ -23,35 +23,39 @@ import { path } from "../../internal/utils/path.mjs";
23
23
  *
24
24
  * ## Ephemeral Messages (Privacy Tier)
25
25
  *
26
- * 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.
26
+ * 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 platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
27
+ *
28
+ * 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.
27
29
  *
28
30
  * You can request it at two scopes:
29
31
  *
30
32
  * | Scope | Effect |
31
33
  * |---|---|
32
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
34
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for your configured window, then deleted. |
33
35
  * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
34
36
  *
35
37
  * **Behavioral differences vs the standard default:**
36
38
  *
37
39
  * | Aspect | Standard | Ephemeral |
38
40
  * |---|---|---|
39
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
41
+ * | 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 |
40
42
  * | 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` |
41
43
  * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
44
+ * | 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 |
42
45
  * | Cross-partner isolation | Enforced | Enforced |
43
46
  *
44
- * **How the 24-hour window works:**
47
+ * **How the retention window works:**
45
48
  *
46
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
47
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
49
+ * - 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.
50
+ * - Attachment media follows its own storage backstop rather than the message window see the Attachments row above.
48
51
  * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
52
+ * - **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.
49
53
  *
50
54
  * **What you observe:**
51
55
  *
52
- * - **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.
56
+ * - **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.
53
57
  * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
54
- * - **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.
58
+ * - **The backstop governs Linq storage.** 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.
55
59
  * - **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.
56
60
  *
57
61
  * **When to choose ephemeral:**
@@ -60,7 +64,7 @@ import { path } from "../../internal/utils/path.mjs";
60
64
  * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
61
65
  * - 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.
62
66
  *
63
- * **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.
67
+ * **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.
64
68
  */
65
69
  export class Poll extends APIResource {
66
70
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"poll.mjs","sourceRoot":"","sources":["../../src/resources/messages/poll.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,SAAS,OAAO,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,SAAiB,EACjB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gBAAgB,SAAS,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,SAAiB,EAAE,IAAoB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gBAAgB,SAAS,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;CACF"}
1
+ {"version":3,"file":"poll.mjs","sourceRoot":"","sources":["../../src/resources/messages/poll.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,SAAS,OAAO,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,SAAiB,EACjB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gBAAgB,SAAS,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,SAAiB,EAAE,IAAoB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gBAAgB,SAAS,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;CACF"}
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 platform permanently deletes the message from Linq storage. 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. |
974
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for your configured window, then deleted. |
973
975
  * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. 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 |
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 |
980
982
  * | 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
983
  * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
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 backstop governs Linq storage.** 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 and its parts are deleted after that account's configured retention window (60 minutes – 24 hours, default 24 hours) from creation |
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
  *