From f44e6989ce805821306fb22c62a38c0f251c2846 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:48:59 +0000 Subject: [PATCH 1/4] docs(api): add first outbound message link restriction note to POST /v3/chats --- .stats.yml | 4 ++-- src/linq/resources/chats/chats.py | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0f42596..cbed9c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq%2Flinq-api-v3-ff83d38ba9be07068f3eeef202f37fb92cf4b6b6a12f1ad2f258f45de70f5afd.yml -openapi_spec_hash: b15a3d49366346cd2d22a5acc029b03b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq%2Flinq-api-v3-d1d333c13339af6c5eb36acbf2eff3abbb201005ab0221136f598d0aa3daf858.yml +openapi_spec_hash: 63d40d2bba88aaa4e4fa5bb8a6f3c4f8 config_hash: be5410c6c4d8f36a7cd93c8950bc90d6 diff --git a/src/linq/resources/chats/chats.py b/src/linq/resources/chats/chats.py index 83cd61d..6d07425 100644 --- a/src/linq/resources/chats/chats.py +++ b/src/linq/resources/chats/chats.py @@ -199,6 +199,17 @@ def create( must not overlap with other animations or styles. Text decorations only render for iMessage recipients. For SMS/RCS, text decorations are not applied. + ## First-Message Link Restriction + + To protect sender deliverability, the **first outbound message** of a new chat + cannot be a link. The request is rejected with `400` (error code `1005`) when: + + - The message contains a `link` part (explicit rich-preview link), or + - Any `text` part contains a URL. + + This rule applies only to `POST /v3/chats`. Follow-up messages on an existing + chat (`POST /v3/chats/{chatId}/messages`) are not subject to this restriction. + Args: from_: Sender phone number in E.164 format. Must be a phone number that the authenticated partner has permission to send from. @@ -727,6 +738,17 @@ async def create( must not overlap with other animations or styles. Text decorations only render for iMessage recipients. For SMS/RCS, text decorations are not applied. + ## First-Message Link Restriction + + To protect sender deliverability, the **first outbound message** of a new chat + cannot be a link. The request is rejected with `400` (error code `1005`) when: + + - The message contains a `link` part (explicit rich-preview link), or + - Any `text` part contains a URL. + + This rule applies only to `POST /v3/chats`. Follow-up messages on an existing + chat (`POST /v3/chats/{chatId}/messages`) are not subject to this restriction. + Args: from_: Sender phone number in E.164 format. Must be a phone number that the authenticated partner has permission to send from. From 1a5b0e6d75f47b67cb2447e180712d334f7f06d0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 19:20:51 +0000 Subject: [PATCH 2/4] feat: make compliance webhooks (message.opt_out/opt_in) GA --- .stats.yml | 4 ++-- src/linq/types/phone_number_status_updated_webhook_event.py | 2 ++ src/linq/types/webhook_event_type.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cbed9c7..b7890d4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq%2Flinq-api-v3-d1d333c13339af6c5eb36acbf2eff3abbb201005ab0221136f598d0aa3daf858.yml -openapi_spec_hash: 63d40d2bba88aaa4e4fa5bb8a6f3c4f8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq%2Flinq-api-v3-4b627b9052fcb0b05b68400d47601c40d4b50baf0f8c9c4d196d74802e08b810.yml +openapi_spec_hash: bae01932910946a7662e40a2097b694e config_hash: be5410c6c4d8f36a7cd93c8950bc90d6 diff --git a/src/linq/types/phone_number_status_updated_webhook_event.py b/src/linq/types/phone_number_status_updated_webhook_event.py index 3c11845..43ab4a8 100644 --- a/src/linq/types/phone_number_status_updated_webhook_event.py +++ b/src/linq/types/phone_number_status_updated_webhook_event.py @@ -46,6 +46,8 @@ class PhoneNumberStatusUpdatedWebhookEvent(BaseModel): "message.delivered", "message.failed", "message.edited", + "message.opt_out", + "message.opt_in", "reaction.added", "reaction.removed", "participant.added", diff --git a/src/linq/types/webhook_event_type.py b/src/linq/types/webhook_event_type.py index 270f117..1594a37 100644 --- a/src/linq/types/webhook_event_type.py +++ b/src/linq/types/webhook_event_type.py @@ -11,6 +11,8 @@ "message.delivered", "message.failed", "message.edited", + "message.opt_out", + "message.opt_in", "reaction.added", "reaction.removed", "participant.added", From 092fdf87696157a09404e21d85a30134af79d7c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 19:58:52 +0000 Subject: [PATCH 3/4] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b7890d4..d549a2d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq%2Flinq-api-v3-4b627b9052fcb0b05b68400d47601c40d4b50baf0f8c9c4d196d74802e08b810.yml -openapi_spec_hash: bae01932910946a7662e40a2097b694e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq%2Flinq-api-v3-3697760e04d6b16b2250985131d388fa784bebe417ae51729ee764214c40c342.yml +openapi_spec_hash: a7f52a450228a8959ca11ebc5207514e config_hash: be5410c6c4d8f36a7cd93c8950bc90d6 From d4339349e43730db45ecc4a284a6356e4429be11 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 19:59:13 +0000 Subject: [PATCH 4/4] release: 0.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ pyproject.toml | 2 +- src/linq/_version.py | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b7b74c..da59f99 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2563b97..672b03f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.4.0 (2026-04-24) + +Full Changelog: [v0.3.0...v0.4.0](https://github.com/linq-team/linq-python/compare/v0.3.0...v0.4.0) + +### Features + +* make compliance webhooks (message.opt_out/opt_in) GA ([1a5b0e6](https://github.com/linq-team/linq-python/commit/1a5b0e6d75f47b67cb2447e180712d334f7f06d0)) + + +### Documentation + +* **api:** add first outbound message link restriction note to POST /v3/chats ([f44e698](https://github.com/linq-team/linq-python/commit/f44e6989ce805821306fb22c62a38c0f251c2846)) + ## 0.3.0 (2026-04-23) Full Changelog: [v0.2.5...v0.3.0](https://github.com/linq-team/linq-python/compare/v0.2.5...v0.3.0) diff --git a/pyproject.toml b/pyproject.toml index 4f0a6d9..767ac6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "linq-python" -version = "0.3.0" +version = "0.4.0" description = "The official Python library for the linq-api-v3 API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/linq/_version.py b/src/linq/_version.py index ee4467c..0769e10 100644 --- a/src/linq/_version.py +++ b/src/linq/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "linq" -__version__ = "0.3.0" # x-release-please-version +__version__ = "0.4.0" # x-release-please-version