Skip to content
Open
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.18.1"
".": "0.19.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: 58
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/ark%2Fark-98a90852ffca49f4e26c613afff433b17023ee1f81f38ad38a5dad60a0d09881.yml
openapi_spec_hash: c6fd865dd6995df15cf9e6ada2ae791e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/ark%2Fark-06c3025bf12b191c3906b28173c9b359e24481dd2839dbf3e6dd0b80c1de3fd6.yml
openapi_spec_hash: d8f8fb1f78579997b6381d64cba4e826
config_hash: b70b11b10fc614f91f1c6f028b40780f
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.19.0 (2026-02-20)

Full Changelog: [v0.18.1...v0.19.0](https://github.com/ArkHQ-io/ark-python/compare/v0.18.1...v0.19.0)

### Features

* **api:** add tenantId to send ([3eddd67](https://github.com/ArkHQ-io/ark-python/commit/3eddd677b69f387149336e11abe71a6143290ac4))


### Chores

* update mock server docs ([b4e4ce8](https://github.com/ArkHQ-io/ark-python/commit/b4e4ce8a56859a87137349e5f97ede2c8acaad25))

## 0.18.1 (2026-02-18)

Full Changelog: [v0.18.0...v0.18.1](https://github.com/ArkHQ-io/ark-python/compare/v0.18.0...v0.18.1)
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ $ pip install ./path-to-wheel-file.whl
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```sh
# you will need npm installed
$ npx prism mock path/to/your/openapi.yml
$ ./scripts/mock
```

```sh
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 = "ark-email"
version = "0.18.1"
version = "0.19.0"
description = "The official Python library for the ark API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/ark/_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__ = "ark"
__version__ = "0.18.1" # x-release-please-version
__version__ = "0.19.0" # x-release-please-version
60 changes: 60 additions & 0 deletions src/ark/resources/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ def send(
metadata: Optional[Dict[str, str]] | Omit = omit,
reply_to: Optional[str] | Omit = omit,
tag: Optional[str] | Omit = omit,
tenant_id: Optional[str] | Omit = omit,
text: Optional[str] | Omit = omit,
idempotency_key: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -396,6 +397,14 @@ def send(

tag: Tag for categorization and filtering (accepts null)

tenant_id: The tenant ID to send this email from. Determines which tenant's configuration
(domains, webhooks, tracking) is used.

- If your API key is scoped to a specific tenant, this must match that tenant or
be omitted.
- If your API key is org-level, specify the tenant to send from.
- If omitted, the organization's default tenant is used.

text: Plain text body (accepts null, auto-generated from HTML if not provided).
Maximum 5MB (5,242,880 characters).

Expand Down Expand Up @@ -423,6 +432,7 @@ def send(
"metadata": metadata,
"reply_to": reply_to,
"tag": tag,
"tenant_id": tenant_id,
"text": text,
},
email_send_params.EmailSendParams,
Expand All @@ -438,6 +448,7 @@ def send_batch(
*,
emails: Iterable[email_send_batch_params.Email],
from_: str,
tenant_id: Optional[str] | Omit = omit,
idempotency_key: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -459,6 +470,14 @@ def send_batch(
Args:
from_: Sender email for all messages

tenant_id: The tenant ID to send this batch from. Determines which tenant's configuration
(domains, webhooks, tracking) is used.

- If your API key is scoped to a specific tenant, this must match that tenant or
be omitted.
- If your API key is org-level, specify the tenant to send from.
- If omitted, the organization's default tenant is used.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -474,6 +493,7 @@ def send_batch(
{
"emails": emails,
"from_": from_,
"tenant_id": tenant_id,
},
email_send_batch_params.EmailSendBatchParams,
),
Expand All @@ -490,6 +510,7 @@ def send_raw(
raw_message: str,
to: SequenceNotStr[str],
bounce: Optional[bool] | Omit = omit,
tenant_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -527,6 +548,14 @@ def send_raw(

bounce: Whether this is a bounce message (accepts null)

tenant_id: The tenant ID to send this email from. Determines which tenant's configuration
(domains, webhooks, tracking) is used.

- If your API key is scoped to a specific tenant, this must match that tenant or
be omitted.
- If your API key is org-level, specify the tenant to send from.
- If omitted, the organization's default tenant is used.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -543,6 +572,7 @@ def send_raw(
"raw_message": raw_message,
"to": to,
"bounce": bounce,
"tenant_id": tenant_id,
},
email_send_raw_params.EmailSendRawParams,
),
Expand Down Expand Up @@ -833,6 +863,7 @@ async def send(
metadata: Optional[Dict[str, str]] | Omit = omit,
reply_to: Optional[str] | Omit = omit,
tag: Optional[str] | Omit = omit,
tenant_id: Optional[str] | Omit = omit,
text: Optional[str] | Omit = omit,
idempotency_key: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -912,6 +943,14 @@ async def send(

tag: Tag for categorization and filtering (accepts null)

tenant_id: The tenant ID to send this email from. Determines which tenant's configuration
(domains, webhooks, tracking) is used.

- If your API key is scoped to a specific tenant, this must match that tenant or
be omitted.
- If your API key is org-level, specify the tenant to send from.
- If omitted, the organization's default tenant is used.

text: Plain text body (accepts null, auto-generated from HTML if not provided).
Maximum 5MB (5,242,880 characters).

Expand Down Expand Up @@ -939,6 +978,7 @@ async def send(
"metadata": metadata,
"reply_to": reply_to,
"tag": tag,
"tenant_id": tenant_id,
"text": text,
},
email_send_params.EmailSendParams,
Expand All @@ -954,6 +994,7 @@ async def send_batch(
*,
emails: Iterable[email_send_batch_params.Email],
from_: str,
tenant_id: Optional[str] | Omit = omit,
idempotency_key: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -975,6 +1016,14 @@ async def send_batch(
Args:
from_: Sender email for all messages

tenant_id: The tenant ID to send this batch from. Determines which tenant's configuration
(domains, webhooks, tracking) is used.

- If your API key is scoped to a specific tenant, this must match that tenant or
be omitted.
- If your API key is org-level, specify the tenant to send from.
- If omitted, the organization's default tenant is used.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -990,6 +1039,7 @@ async def send_batch(
{
"emails": emails,
"from_": from_,
"tenant_id": tenant_id,
},
email_send_batch_params.EmailSendBatchParams,
),
Expand All @@ -1006,6 +1056,7 @@ async def send_raw(
raw_message: str,
to: SequenceNotStr[str],
bounce: Optional[bool] | Omit = omit,
tenant_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -1043,6 +1094,14 @@ async def send_raw(

bounce: Whether this is a bounce message (accepts null)

tenant_id: The tenant ID to send this email from. Determines which tenant's configuration
(domains, webhooks, tracking) is used.

- If your API key is scoped to a specific tenant, this must match that tenant or
be omitted.
- If your API key is org-level, specify the tenant to send from.
- If omitted, the organization's default tenant is used.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -1059,6 +1118,7 @@ async def send_raw(
"raw_message": raw_message,
"to": to,
"bounce": bounce,
"tenant_id": tenant_id,
},
email_send_raw_params.EmailSendRawParams,
),
Expand Down
3 changes: 3 additions & 0 deletions src/ark/types/email_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class EmailListResponse(BaseModel):

subject: str

tenant_id: str = FieldInfo(alias="tenantId")
"""The tenant ID this email belongs to"""

timestamp: float

timestamp_iso: datetime = FieldInfo(alias="timestampIso")
Expand Down
3 changes: 3 additions & 0 deletions src/ark/types/email_retrieve_deliveries_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ class Data(BaseModel):
- `bounced` - Bounced by recipient server
"""

tenant_id: str = FieldInfo(alias="tenantId")
"""The tenant ID this email belongs to"""


class EmailRetrieveDeliveriesResponse(BaseModel):
data: Data
Expand Down
3 changes: 3 additions & 0 deletions src/ark/types/email_retrieve_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ class Data(BaseModel):
subject: str
"""Email subject line"""

tenant_id: str = FieldInfo(alias="tenantId")
"""The tenant ID this email belongs to"""

timestamp: float
"""Unix timestamp when the email was sent"""

Expand Down
5 changes: 5 additions & 0 deletions src/ark/types/email_retry_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from typing_extensions import Literal

from pydantic import Field as FieldInfo

from .._models import BaseModel
from .shared.api_meta import APIMeta

Expand All @@ -14,6 +16,9 @@ class Data(BaseModel):

message: str

tenant_id: str = FieldInfo(alias="tenantId")
"""The tenant ID this email belongs to"""


class EmailRetryResponse(BaseModel):
data: Data
Expand Down
11 changes: 11 additions & 0 deletions src/ark/types/email_send_batch_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ class EmailSendBatchParams(TypedDict, total=False):
from_: Required[Annotated[str, PropertyInfo(alias="from")]]
"""Sender email for all messages"""

tenant_id: Annotated[Optional[str], PropertyInfo(alias="tenantId")]
"""The tenant ID to send this batch from.

Determines which tenant's configuration (domains, webhooks, tracking) is used.

- If your API key is scoped to a specific tenant, this must match that tenant or
be omitted.
- If your API key is org-level, specify the tenant to send from.
- If omitted, the organization's default tenant is used.
"""

idempotency_key: Annotated[str, PropertyInfo(alias="Idempotency-Key")]


Expand Down
5 changes: 5 additions & 0 deletions src/ark/types/email_send_batch_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from typing import Dict, Optional
from typing_extensions import Literal

from pydantic import Field as FieldInfo

from .._models import BaseModel
from .shared.api_meta import APIMeta

Expand All @@ -24,6 +26,9 @@ class Data(BaseModel):
messages: Dict[str, DataMessages]
"""Map of recipient email to message info"""

tenant_id: str = FieldInfo(alias="tenantId")
"""The tenant ID this batch was sent from"""

total: int
"""Total emails in the batch"""

Expand Down
11 changes: 11 additions & 0 deletions src/ark/types/email_send_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ class EmailSendParams(TypedDict, total=False):
tag: Optional[str]
"""Tag for categorization and filtering (accepts null)"""

tenant_id: Annotated[Optional[str], PropertyInfo(alias="tenantId")]
"""The tenant ID to send this email from.

Determines which tenant's configuration (domains, webhooks, tracking) is used.

- If your API key is scoped to a specific tenant, this must match that tenant or
be omitted.
- If your API key is org-level, specify the tenant to send from.
- If omitted, the organization's default tenant is used.
"""

text: Optional[str]
"""
Plain text body (accepts null, auto-generated from HTML if not provided).
Expand Down
11 changes: 11 additions & 0 deletions src/ark/types/email_send_raw_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,14 @@ class EmailSendRawParams(TypedDict, total=False):

bounce: Optional[bool]
"""Whether this is a bounce message (accepts null)"""

tenant_id: Annotated[Optional[str], PropertyInfo(alias="tenantId")]
"""The tenant ID to send this email from.

Determines which tenant's configuration (domains, webhooks, tracking) is used.

- If your API key is scoped to a specific tenant, this must match that tenant or
be omitted.
- If your API key is org-level, specify the tenant to send from.
- If omitted, the organization's default tenant is used.
"""
3 changes: 3 additions & 0 deletions src/ark/types/email_send_raw_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class Data(BaseModel):
status: Literal["pending", "sent"]
"""Current delivery status"""

tenant_id: str = FieldInfo(alias="tenantId")
"""The tenant ID this email was sent from"""

to: List[str]
"""List of recipient addresses"""

Expand Down
3 changes: 3 additions & 0 deletions src/ark/types/email_send_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class Data(BaseModel):
status: Literal["pending", "sent"]
"""Current delivery status"""

tenant_id: str = FieldInfo(alias="tenantId")
"""The tenant ID this email was sent from"""

to: List[str]
"""List of recipient addresses"""

Expand Down
Loading