Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.9.0"
".": "0.10.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 35
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq/linq-api-v3-d7993802c9754a19b91058a03bab7fa59d76d993d8e025b4e046d863566b4a43.yml
openapi_spec_hash: adc3205a32d9469b6eaf6787c7835b84
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq/linq-api-v3-b35ddaee2c9dfbc09a716112fcf7c177cb4f86700e09febc020187e5a1b71c37.yml
openapi_spec_hash: cb1d354d0402d78acad35ef9fdbbbc95
config_hash: 7a8a13d75aa72faddd9a7f82f580873c
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.10.0 (2026-05-15)

Full Changelog: [v0.9.0...v0.10.0](https://github.com/linq-team/linq-python/compare/v0.9.0...v0.10.0)

### Features

* **api:** add health_status field to phone_number response ([3467668](https://github.com/linq-team/linq-python/commit/3467668bdbcee3805c3f2b4a99c93f842454ee8b))
* **api:** add health_status fields to PhoneNumber and webhook event ([dab602c](https://github.com/linq-team/linq-python/commit/dab602cb2f935e9c1bb6b00660adbaecfb001d18))


### Bug Fixes

* **types:** uppercase health_status enum values in chat-related models ([a763854](https://github.com/linq-team/linq-python/commit/a763854d1ca795bb1bb996058d97f306aef7b9e7))

## 0.9.0 (2026-05-13)

Full Changelog: [v0.8.0...v0.9.0](https://github.com/linq-team/linq-python/compare/v0.8.0...v0.9.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "linq-python"
version = "0.9.0"
version = "0.10.0"
description = "The official Python library for the linq-api-v3 API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/linq/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "linq"
__version__ = "0.9.0" # x-release-please-version
__version__ = "0.10.0" # x-release-please-version
8 changes: 4 additions & 4 deletions src/linq/types/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class HealthStatus(BaseModel):
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and delivery signals on the conversation. Many `at_risk` or `critical` chats on a single line increase the risk of line flagging.
Always present — chats start at `HEALTHY` and may shift based on engagement and delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is the long-term contract. Each status carries a `doc_url` that deep-links to the relevant section of the Chat Health guide.

Expand All @@ -24,7 +24,7 @@ class HealthStatus(BaseModel):
doc_url: str
"""Deep-link to the relevant section of the Chat Health guide for this status."""

status: Literal["healthy", "at_risk", "critical", "opted_out"]
status: Literal["HEALTHY", "AT_RISK", "CRITICAL", "OPTED_OUT"]
"""Current health bucket for the chat.

See the [Chat Health guide](/guides/chats/chat-health) for what each value means
Expand Down Expand Up @@ -59,8 +59,8 @@ class Chat(BaseModel):
health_status: HealthStatus
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and
delivery signals on the conversation. Many `at_risk` or `critical` chats on a
Always present — chats start at `HEALTHY` and may shift based on engagement and
delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a
single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is
Expand Down
8 changes: 4 additions & 4 deletions src/linq/types/chat_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class ChatHealthStatus(BaseModel):
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and delivery signals on the conversation. Many `at_risk` or `critical` chats on a single line increase the risk of line flagging.
Always present — chats start at `HEALTHY` and may shift based on engagement and delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is the long-term contract. Each status carries a `doc_url` that deep-links to the relevant section of the Chat Health guide.

Expand All @@ -25,7 +25,7 @@ class ChatHealthStatus(BaseModel):
doc_url: str
"""Deep-link to the relevant section of the Chat Health guide for this status."""

status: Literal["healthy", "at_risk", "critical", "opted_out"]
status: Literal["HEALTHY", "AT_RISK", "CRITICAL", "OPTED_OUT"]
"""Current health bucket for the chat.

See the [Chat Health guide](/guides/chats/chat-health) for what each value means
Expand Down Expand Up @@ -57,8 +57,8 @@ class Chat(BaseModel):
health_status: ChatHealthStatus
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and
delivery signals on the conversation. Many `at_risk` or `critical` chats on a
Always present — chats start at `HEALTHY` and may shift based on engagement and
delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a
single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is
Expand Down
8 changes: 4 additions & 4 deletions src/linq/types/chat_created_webhook_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class DataHealthStatus(BaseModel):
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and delivery signals on the conversation. Many `at_risk` or `critical` chats on a single line increase the risk of line flagging.
Always present — chats start at `HEALTHY` and may shift based on engagement and delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is the long-term contract. Each status carries a `doc_url` that deep-links to the relevant section of the Chat Health guide.

Expand All @@ -25,7 +25,7 @@ class DataHealthStatus(BaseModel):
doc_url: str
"""Deep-link to the relevant section of the Chat Health guide for this status."""

status: Literal["healthy", "at_risk", "critical", "opted_out"]
status: Literal["HEALTHY", "AT_RISK", "CRITICAL", "OPTED_OUT"]
"""Current health bucket for the chat.

See the [Chat Health guide](/guides/chats/chat-health) for what each value means
Expand Down Expand Up @@ -65,8 +65,8 @@ class Data(BaseModel):
health_status: DataHealthStatus
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and
delivery signals on the conversation. Many `at_risk` or `critical` chats on a
Always present — chats start at `HEALTHY` and may shift based on engagement and
delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a
single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is
Expand Down
8 changes: 4 additions & 4 deletions src/linq/types/message_edited_webhook_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class DataChatHealthStatus(BaseModel):
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and delivery signals on the conversation. Many `at_risk` or `critical` chats on a single line increase the risk of line flagging.
Always present — chats start at `HEALTHY` and may shift based on engagement and delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is the long-term contract. Each status carries a `doc_url` that deep-links to the relevant section of the Chat Health guide.

Expand All @@ -23,7 +23,7 @@ class DataChatHealthStatus(BaseModel):
doc_url: str
"""Deep-link to the relevant section of the Chat Health guide for this status."""

status: Literal["healthy", "at_risk", "critical", "opted_out"]
status: Literal["HEALTHY", "AT_RISK", "CRITICAL", "OPTED_OUT"]
"""Current health bucket for the chat.

See the [Chat Health guide](/guides/chats/chat-health) for what each value means
Expand All @@ -43,8 +43,8 @@ class DataChat(BaseModel):
health_status: DataChatHealthStatus
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and
delivery signals on the conversation. Many `at_risk` or `critical` chats on a
Always present — chats start at `HEALTHY` and may shift based on engagement and
delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a
single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is
Expand Down
8 changes: 4 additions & 4 deletions src/linq/types/message_event_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class ChatHealthStatus(BaseModel):
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and delivery signals on the conversation. Many `at_risk` or `critical` chats on a single line increase the risk of line flagging.
Always present — chats start at `HEALTHY` and may shift based on engagement and delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is the long-term contract. Each status carries a `doc_url` that deep-links to the relevant section of the Chat Health guide.

Expand All @@ -28,7 +28,7 @@ class ChatHealthStatus(BaseModel):
doc_url: str
"""Deep-link to the relevant section of the Chat Health guide for this status."""

status: Literal["healthy", "at_risk", "critical", "opted_out"]
status: Literal["HEALTHY", "AT_RISK", "CRITICAL", "OPTED_OUT"]
"""Current health bucket for the chat.

See the [Chat Health guide](/guides/chats/chat-health) for what each value means
Expand All @@ -48,8 +48,8 @@ class Chat(BaseModel):
health_status: ChatHealthStatus
"""**[BETA]** Current health for a chat.

Always present — chats start at `healthy` and may shift based on engagement and
delivery signals on the conversation. Many `at_risk` or `critical` chats on a
Always present — chats start at `HEALTHY` and may shift based on engagement and
delivery signals on the conversation. Many `AT_RISK` or `CRITICAL` chats on a
single line increase the risk of line flagging.

Switch on `status` to gate sends or surface line health in your UI — the enum is
Expand Down
42 changes: 41 additions & 1 deletion src/linq/types/phone_number_list_response.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,56 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List
from typing_extensions import Literal

from .._models import BaseModel

__all__ = ["PhoneNumberListResponse", "PhoneNumber"]
__all__ = ["PhoneNumberListResponse", "PhoneNumber", "PhoneNumberHealthStatus"]


class PhoneNumberHealthStatus(BaseModel):
"""**[BETA]** Current health for a phone line.

Always present — lines start at `HEALTHY` and may shift based on aggregate engagement and delivery signals across all conversations on the line.

Unlike chat health, line health does not include `opted_out` — opt-out applies to individual recipients, not the whole line.

See the [Phone Health guide](/guides/phone-numbers/phone-health) for what each status means and how to react.
"""

doc_url: str
"""Deep-link to the relevant section of the Phone Health guide for this status."""

status: Literal["HEALTHY", "AT_RISK", "CRITICAL"]
"""Current health of this phone line as assessed by risk-service.

- `HEALTHY` — No elevated risk detected.
- `AT_RISK` — Elevated risk indicators present; consider reducing send volume or
reviewing messaging patterns.
- `CRITICAL` — High risk; further sending may result in line flagging or
restriction.

Defaults to `HEALTHY` for lines that have not yet been scored.
"""


class PhoneNumber(BaseModel):
id: str
"""Unique identifier for the phone number"""

health_status: PhoneNumberHealthStatus
"""**[BETA]** Current health for a phone line.

Always present — lines start at `HEALTHY` and may shift based on aggregate
engagement and delivery signals across all conversations on the line.

Unlike chat health, line health does not include `opted_out` — opt-out applies
to individual recipients, not the whole line.

See the [Phone Health guide](/guides/phone-numbers/phone-health) for what each
status means and how to react.
"""

phone_number: str
"""Phone number in E.164 format"""

Expand Down
6 changes: 6 additions & 0 deletions src/linq/types/phone_number_status_updated_webhook_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ class Data(BaseModel):
changed_at: datetime
"""When the status change occurred"""

new_health_status: Literal["HEALTHY", "AT_RISK", "CRITICAL"]
"""The new line health status"""

new_status: Literal["ACTIVE", "FLAGGED"]
"""The new service status"""

phone_number: str
"""Phone number in E.164 format"""

previous_health_status: Literal["HEALTHY", "AT_RISK", "CRITICAL"]
"""The previous line health status"""

previous_status: Literal["ACTIVE", "FLAGGED"]
"""The previous service status"""

Expand Down
Loading