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 @@
{
".": "4.134.0"
".": "4.135.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: 1041
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-84a5516e4e8dfd1f41476bef7aa5c9d18c4ed62574d3d0cc14c12b7ea894e455.yml
openapi_spec_hash: 8388036da41d48e5e261d909785c6e6d
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-9cc495153444889989ae89f838f2d0429c3dd41e08a26fb76658b03f68007794.yml
openapi_spec_hash: 80c8b711c00455999eba32f4c3f225fe
config_hash: 6b6686945572dbb277d4884e51cb07e7
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.135.0 (2026-05-15)

Full Changelog: [v4.134.0...v4.135.0](https://github.com/team-telnyx/telnyx-python/compare/v4.134.0...v4.135.0)

### Features

* Document PremiumCallScreening detection mode ([77ffa1b](https://github.com/team-telnyx/telnyx-python/commit/77ffa1bd62e2b1454fc1e12079d740a06063a0b3))


### Documentation

* add supported file formats to Send Fax endpoint ([8f73895](https://github.com/team-telnyx/telnyx-python/commit/8f738952250095e0f421edbaae93ccfa2b26094b))

## 4.134.0 (2026-05-15)

Full Changelog: [v4.133.0...v4.134.0](https://github.com/team-telnyx/telnyx-python/compare/v4.133.0...v4.134.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 = "telnyx"
version = "4.134.0"
version = "4.135.0"
description = "The official Python library for the telnyx API"
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/telnyx/_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__ = "telnyx"
__version__ = "4.134.0" # x-release-please-version
__version__ = "4.135.0" # x-release-please-version
44 changes: 36 additions & 8 deletions src/telnyx/resources/faxes/faxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@ def create(
is bigger than 50MB or has more than 350 pages it will fail with
`file_size_limit_exceeded` and `page_count_limit_exceeded` respectively.

**Supported file formats:**

- PDF (`application/pdf`)
- TIFF (`application/tiff`, `image/tiff`)
- JPEG (`image/jpeg`)
- PNG (`image/png`)
- Microsoft Word `.doc` (`application/msword`)
- Microsoft Word `.docx`
(`application/vnd.openxmlformats-officedocument.wordprocessingml.document`)
- Rich Text Format `.rtf` (`application/rtf`)
- Plain text `.txt` (`text/plain`)

**Expected Webhooks:**

- `fax.queued`
Expand Down Expand Up @@ -122,11 +134,13 @@ def create(
number in the `from` field.

media_name: The media_name used for the fax's media. Must point to a file previously
uploaded to api.telnyx.com/v2/media by the same user/organization. media_name
and media_url/contents can't be submitted together.
uploaded to api.telnyx.com/v2/media by the same user/organization. Supported
formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_name and
media_url/contents can't be submitted together.

media_url: The URL (or list of URLs) to the PDF used for the fax's media. media_url and
media_name/contents can't be submitted together.
media_url: The URL (or list of URLs) to the fax document. Supported formats: PDF, TIFF,
JPEG, PNG, DOC, DOCX, RTF, and TXT. media_url and media_name/contents can't be
submitted together.

monochrome: The flag to enable monochrome, true black and white fax results.

Expand Down Expand Up @@ -366,6 +380,18 @@ async def create(
is bigger than 50MB or has more than 350 pages it will fail with
`file_size_limit_exceeded` and `page_count_limit_exceeded` respectively.

**Supported file formats:**

- PDF (`application/pdf`)
- TIFF (`application/tiff`, `image/tiff`)
- JPEG (`image/jpeg`)
- PNG (`image/png`)
- Microsoft Word `.doc` (`application/msword`)
- Microsoft Word `.docx`
(`application/vnd.openxmlformats-officedocument.wordprocessingml.document`)
- Rich Text Format `.rtf` (`application/rtf`)
- Plain text `.txt` (`text/plain`)

**Expected Webhooks:**

- `fax.queued`
Expand Down Expand Up @@ -394,11 +420,13 @@ async def create(
number in the `from` field.

media_name: The media_name used for the fax's media. Must point to a file previously
uploaded to api.telnyx.com/v2/media by the same user/organization. media_name
and media_url/contents can't be submitted together.
uploaded to api.telnyx.com/v2/media by the same user/organization. Supported
formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_name and
media_url/contents can't be submitted together.

media_url: The URL (or list of URLs) to the PDF used for the fax's media. media_url and
media_name/contents can't be submitted together.
media_url: The URL (or list of URLs) to the fax document. Supported formats: PDF, TIFF,
JPEG, PNG, DOC, DOCX, RTF, and TXT. media_url and media_name/contents can't be
submitted together.

monochrome: The flag to enable monochrome, true black and white fax results.

Expand Down
22 changes: 18 additions & 4 deletions src/telnyx/resources/texml/texml.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ def initiate_ai_call(
conversation_callback_method: Literal["GET", "POST"] | Omit = omit,
conversation_callbacks: SequenceNotStr[str] | Omit = omit,
custom_headers: Iterable[texml_initiate_ai_call_params.CustomHeader] | Omit = omit,
detection_mode: Literal["Premium", "Regular"] | Omit = omit,
detection_mode: Literal["Premium", "Regular", "PremiumCallScreening"] | Omit = omit,
machine_detection: Literal["Enable", "Disable", "DetectMessageEnd"] | Omit = omit,
machine_detection_prompt_end_timeout: int | Omit = omit,
machine_detection_silence_timeout: int | Omit = omit,
machine_detection_speech_end_threshold: int | Omit = omit,
machine_detection_speech_threshold: int | Omit = omit,
Expand Down Expand Up @@ -164,10 +165,15 @@ def initiate_ai_call(
custom_headers: Custom HTTP headers to be sent with the call. Each header should be an object
with 'name' and 'value' properties.

detection_mode: Allows you to choose between Premium and Standard detections.
detection_mode: Allows you to choose between Regular, Premium, and PremiumCallScreening
detections. See
https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection

machine_detection: Enables Answering Machine Detection.

machine_detection_prompt_end_timeout: Silence duration threshold after a call screening prompt before ending prompt
detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.

machine_detection_silence_timeout: If initial silence duration is greater than this value, consider it a machine.
Ignored when `premium` detection is used.

Expand Down Expand Up @@ -266,6 +272,7 @@ def initiate_ai_call(
"custom_headers": custom_headers,
"detection_mode": detection_mode,
"machine_detection": machine_detection,
"machine_detection_prompt_end_timeout": machine_detection_prompt_end_timeout,
"machine_detection_silence_timeout": machine_detection_silence_timeout,
"machine_detection_speech_end_threshold": machine_detection_speech_end_threshold,
"machine_detection_speech_threshold": machine_detection_speech_threshold,
Expand Down Expand Up @@ -392,8 +399,9 @@ async def initiate_ai_call(
conversation_callback_method: Literal["GET", "POST"] | Omit = omit,
conversation_callbacks: SequenceNotStr[str] | Omit = omit,
custom_headers: Iterable[texml_initiate_ai_call_params.CustomHeader] | Omit = omit,
detection_mode: Literal["Premium", "Regular"] | Omit = omit,
detection_mode: Literal["Premium", "Regular", "PremiumCallScreening"] | Omit = omit,
machine_detection: Literal["Enable", "Disable", "DetectMessageEnd"] | Omit = omit,
machine_detection_prompt_end_timeout: int | Omit = omit,
machine_detection_silence_timeout: int | Omit = omit,
machine_detection_speech_end_threshold: int | Omit = omit,
machine_detection_speech_threshold: int | Omit = omit,
Expand Down Expand Up @@ -479,10 +487,15 @@ async def initiate_ai_call(
custom_headers: Custom HTTP headers to be sent with the call. Each header should be an object
with 'name' and 'value' properties.

detection_mode: Allows you to choose between Premium and Standard detections.
detection_mode: Allows you to choose between Regular, Premium, and PremiumCallScreening
detections. See
https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection

machine_detection: Enables Answering Machine Detection.

machine_detection_prompt_end_timeout: Silence duration threshold after a call screening prompt before ending prompt
detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.

machine_detection_silence_timeout: If initial silence duration is greater than this value, consider it a machine.
Ignored when `premium` detection is used.

Expand Down Expand Up @@ -581,6 +594,7 @@ async def initiate_ai_call(
"custom_headers": custom_headers,
"detection_mode": detection_mode,
"machine_detection": machine_detection,
"machine_detection_prompt_end_timeout": machine_detection_prompt_end_timeout,
"machine_detection_silence_timeout": machine_detection_silence_timeout,
"machine_detection_speech_end_threshold": machine_detection_speech_end_threshold,
"machine_detection_speech_threshold": machine_detection_speech_threshold,
Expand Down
9 changes: 5 additions & 4 deletions src/telnyx/types/fax.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ class Fax(BaseModel):
"""The media_name used for the fax's media.

Must point to a file previously uploaded to api.telnyx.com/v2/media by the same
user/organization. media_name and media_url/contents can't be submitted
together.
user/organization. Supported formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and
TXT. media_name and media_url/contents can't be submitted together.
"""

media_url: Optional[str] = None
"""The URL (or list of URLs) to the PDF used for the fax's media.
"""The URL (or list of URLs) to the fax document.

media_url and media_name/contents can't be submitted together.
Supported formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_url and
media_name/contents can't be submitted together.
"""

preview_url: Optional[str] = None
Expand Down
9 changes: 5 additions & 4 deletions src/telnyx/types/fax_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ class FaxCreateParams(TypedDict, total=False):
"""The media_name used for the fax's media.

Must point to a file previously uploaded to api.telnyx.com/v2/media by the same
user/organization. media_name and media_url/contents can't be submitted
together.
user/organization. Supported formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and
TXT. media_name and media_url/contents can't be submitted together.
"""

media_url: str
"""The URL (or list of URLs) to the PDF used for the fax's media.
"""The URL (or list of URLs) to the fax document.

media_url and media_name/contents can't be submitted together.
Supported formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_url and
media_name/contents can't be submitted together.
"""

monochrome: bool
Expand Down
4 changes: 2 additions & 2 deletions src/telnyx/types/fax_delivered.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class DataPayload(BaseModel):
"""The media_name used for the fax's media.

Must point to a file previously uploaded to api.telnyx.com/v2/media by the same
user/organization. media_name and media_url/contents can't be submitted
together.
user/organization. Supported formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and
TXT. media_name and media_url/contents can't be submitted together.
"""

original_media_url: Optional[str] = None
Expand Down
4 changes: 2 additions & 2 deletions src/telnyx/types/fax_failed.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class DataPayload(BaseModel):
"""The media_name used for the fax's media.

Must point to a file previously uploaded to api.telnyx.com/v2/media by the same
user/organization. media_name and media_url/contents can't be submitted
together.
user/organization. Supported formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and
TXT. media_name and media_url/contents can't be submitted together.
"""

original_media_url: Optional[str] = None
Expand Down
4 changes: 2 additions & 2 deletions src/telnyx/types/fax_media_processed.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class DataPayload(BaseModel):
"""The media_name used for the fax's media.

Must point to a file previously uploaded to api.telnyx.com/v2/media by the same
user/organization. media_name and media_url/contents can't be submitted
together.
user/organization. Supported formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and
TXT. media_name and media_url/contents can't be submitted together.
"""

original_media_url: Optional[str] = None
Expand Down
4 changes: 2 additions & 2 deletions src/telnyx/types/fax_queued.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class DataPayload(BaseModel):
"""The media_name used for the fax's media.

Must point to a file previously uploaded to api.telnyx.com/v2/media by the same
user/organization. media_name and media_url/contents can't be submitted
together.
user/organization. Supported formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and
TXT. media_name and media_url/contents can't be submitted together.
"""

original_media_url: Optional[str] = None
Expand Down
4 changes: 2 additions & 2 deletions src/telnyx/types/fax_sending_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class DataPayload(BaseModel):
"""The media_name used for the fax's media.

Must point to a file previously uploaded to api.telnyx.com/v2/media by the same
user/organization. media_name and media_url/contents can't be submitted
together.
user/organization. Supported formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and
TXT. media_name and media_url/contents can't be submitted together.
"""

original_media_url: Optional[str] = None
Expand Down
48 changes: 42 additions & 6 deletions src/telnyx/types/texml/accounts/call_calls_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ class WithURL(TypedDict, total=False):
call.
"""

detection_mode: Annotated[Literal["Premium", "Regular"], PropertyInfo(alias="DetectionMode")]
"""Allows you to chose between Premium and Standard detections."""
detection_mode: Annotated[
Literal["Premium", "Regular", "PremiumCallScreening"], PropertyInfo(alias="DetectionMode")
]
"""
Allows you to choose between Regular, Premium, and PremiumCallScreening
detections. See
https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
"""

fallback_url: Annotated[str, PropertyInfo(alias="FallbackUrl")]
"""
Expand All @@ -103,6 +109,12 @@ class WithURL(TypedDict, total=False):
]
"""Enables Answering Machine Detection."""

machine_detection_prompt_end_timeout: Annotated[int, PropertyInfo(alias="MachineDetectionPromptEndTimeout")]
"""
Silence duration threshold after a call screening prompt before ending prompt
detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
"""

machine_detection_silence_timeout: Annotated[int, PropertyInfo(alias="MachineDetectionSilenceTimeout")]
"""If initial silence duration is greater than this value, consider it a machine.

Expand Down Expand Up @@ -323,8 +335,14 @@ class WithTeXml(TypedDict, total=False):
call.
"""

detection_mode: Annotated[Literal["Premium", "Regular"], PropertyInfo(alias="DetectionMode")]
"""Allows you to chose between Premium and Standard detections."""
detection_mode: Annotated[
Literal["Premium", "Regular", "PremiumCallScreening"], PropertyInfo(alias="DetectionMode")
]
"""
Allows you to choose between Regular, Premium, and PremiumCallScreening
detections. See
https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
"""

fallback_url: Annotated[str, PropertyInfo(alias="FallbackUrl")]
"""
Expand All @@ -343,6 +361,12 @@ class WithTeXml(TypedDict, total=False):
]
"""Enables Answering Machine Detection."""

machine_detection_prompt_end_timeout: Annotated[int, PropertyInfo(alias="MachineDetectionPromptEndTimeout")]
"""
Silence duration threshold after a call screening prompt before ending prompt
detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
"""

machine_detection_silence_timeout: Annotated[int, PropertyInfo(alias="MachineDetectionSilenceTimeout")]
"""If initial silence duration is greater than this value, consider it a machine.

Expand Down Expand Up @@ -556,8 +580,14 @@ class ApplicationDefault(TypedDict, total=False):
call.
"""

detection_mode: Annotated[Literal["Premium", "Regular"], PropertyInfo(alias="DetectionMode")]
"""Allows you to chose between Premium and Standard detections."""
detection_mode: Annotated[
Literal["Premium", "Regular", "PremiumCallScreening"], PropertyInfo(alias="DetectionMode")
]
"""
Allows you to choose between Regular, Premium, and PremiumCallScreening
detections. See
https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
"""

fallback_url: Annotated[str, PropertyInfo(alias="FallbackUrl")]
"""
Expand All @@ -576,6 +606,12 @@ class ApplicationDefault(TypedDict, total=False):
]
"""Enables Answering Machine Detection."""

machine_detection_prompt_end_timeout: Annotated[int, PropertyInfo(alias="MachineDetectionPromptEndTimeout")]
"""
Silence duration threshold after a call screening prompt before ending prompt
detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
"""

machine_detection_silence_timeout: Annotated[int, PropertyInfo(alias="MachineDetectionSilenceTimeout")]
"""If initial silence duration is greater than this value, consider it a machine.

Expand Down
Loading
Loading