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 @@
{
".": "7.21.0"
".": "7.21.1"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 134
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-b053468fefe6d757f86f3233ebbc52d80329ed2a6e7a6740fee01e4028a4c3b9.yml
openapi_spec_hash: 416835e693de0fe19945be90a787d3f3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-5c878919b3df530781ebcd4ab1cda83606304da75c53fe0817d4c725d5bbbe73.yml
openapi_spec_hash: dd37022222543ff064200e65e4b82f59
config_hash: 8d28dbeabe9d4dcc7d5b8c021a4cbbd7
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 7.21.1 (2026-07-25)

Full Changelog: [v7.21.0...v7.21.1](https://github.com/trycourier/courier-python/compare/v7.21.0...v7.21.1)

### Documentation

* **openapi:** describe user topic-preference fields explicitly ([#172](https://github.com/trycourier/courier-python/issues/172)) ([842699a](https://github.com/trycourier/courier-python/commit/842699a68811d63aca9ef8d8865266623ff3e42c))
* **openapi:** rewrite operation descriptions for agents and SEO ([#174](https://github.com/trycourier/courier-python/issues/174)) ([c90b5d3](https://github.com/trycourier/courier-python/commit/c90b5d325da4e542a46a089084205ce145d65ef1))

## 7.21.0 (2026-07-23)

Full Changelog: [v7.20.0...v7.21.0](https://github.com/trycourier/courier-python/compare/v7.20.0...v7.21.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 = "trycourier"
version = "7.21.0"
version = "7.21.1"
description = "The official Python library for the Courier API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/courier/_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__ = "courier"
__version__ = "7.21.0" # x-release-please-version
__version__ = "7.21.1" # x-release-please-version
42 changes: 28 additions & 14 deletions src/courier/resources/audiences.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Audience:
"""
Returns the specified audience by id.
Returns one audience with its name, description, and the filter and AND or OR
operator that decide which users belong to it.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -97,7 +98,8 @@ def update(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AudienceUpdateResponse:
"""
Creates or updates audience.
Creates or replaces an audience from a filter and an AND or OR operator.
Membership recalculates automatically as profiles change.

Args:
description: A description of the audience
Expand Down Expand Up @@ -148,8 +150,10 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AudienceListResponse:
"""
Get the audiences associated with the authorization token.
"""Returns the audiences in the workspace with paging.

Audiences are filter-based
groups that recalculate as user profiles change.

Args:
cursor: A unique identifier that allows for fetching the next set of audiences
Expand Down Expand Up @@ -186,7 +190,8 @@ def delete(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Deletes the specified audience.
Deletes an audience permanently, so update any caller sending to it by audience
id first. Those sends fail once the audience is gone.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -220,8 +225,10 @@ def list_members(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AudienceListMembersResponse:
"""
Get list of members of an audience.
"""Returns the users currently matching an audience filter, with paging.

Membership
is recalculated, so results shift as profiles change.

Args:
cursor: A unique identifier that allows for fetching the next set of members
Expand Down Expand Up @@ -281,7 +288,8 @@ async def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Audience:
"""
Returns the specified audience by id.
Returns one audience with its name, description, and the filter and AND or OR
operator that decide which users belong to it.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -318,7 +326,8 @@ async def update(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AudienceUpdateResponse:
"""
Creates or updates audience.
Creates or replaces an audience from a filter and an AND or OR operator.
Membership recalculates automatically as profiles change.

Args:
description: A description of the audience
Expand Down Expand Up @@ -369,8 +378,10 @@ async def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AudienceListResponse:
"""
Get the audiences associated with the authorization token.
"""Returns the audiences in the workspace with paging.

Audiences are filter-based
groups that recalculate as user profiles change.

Args:
cursor: A unique identifier that allows for fetching the next set of audiences
Expand Down Expand Up @@ -407,7 +418,8 @@ async def delete(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Deletes the specified audience.
Deletes an audience permanently, so update any caller sending to it by audience
id first. Those sends fail once the audience is gone.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -441,8 +453,10 @@ async def list_members(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AudienceListMembersResponse:
"""
Get list of members of an audience.
"""Returns the users currently matching an audience filter, with paging.

Membership
is recalculated, so results shift as profiles change.

Args:
cursor: A unique identifier that allows for fetching the next set of members
Expand Down
18 changes: 12 additions & 6 deletions src/courier/resources/audit_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AuditEvent:
"""
Fetch a specific audit event by ID.
Returns one audit event by id, including the actor who performed it, the target
they changed, the source, the event type, and a timestamp.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -88,8 +89,10 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AuditEventListResponse:
"""
Fetch the list of audit events
"""Returns the workspace's audit event log with cursor paging.

Each event records
the actor, target, source, type, and timestamp of a change.

Args:
cursor: A unique identifier that allows for fetching the next set of audit events.
Expand Down Expand Up @@ -147,7 +150,8 @@ async def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AuditEvent:
"""
Fetch a specific audit event by ID.
Returns one audit event by id, including the actor who performed it, the target
they changed, the source, the event type, and a timestamp.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -179,8 +183,10 @@ async def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AuditEventListResponse:
"""
Fetch the list of audit events
"""Returns the workspace's audit event log with cursor paging.

Each event records
the actor, target, source, type, and timestamp of a change.

Args:
cursor: A unique identifier that allows for fetching the next set of audit events.
Expand Down
12 changes: 8 additions & 4 deletions src/courier/resources/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ def issue_token(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AuthIssueTokenResponse:
"""
Returns a new access token.
"""Returns a JWT for authenticating client-side SDKs such as the Inbox.

You supply
the scope and an expires_in duration, both required.

Args:
expires_in:
Expand Down Expand Up @@ -143,8 +145,10 @@ async def issue_token(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AuthIssueTokenResponse:
"""
Returns a new access token.
"""Returns a JWT for authenticating client-side SDKs such as the Inbox.

You supply
the scope and an expires_in duration, both required.

Args:
expires_in:
Expand Down
16 changes: 8 additions & 8 deletions src/courier/resources/automations/automations.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomationTemplateListResponse:
"""Get the list of automations.
"""
Lists the workspace's saved automation templates, each with its id and a cursor
for paging to the next page of results.

Args:
cursor: A cursor token for pagination.

Use the cursor from the previous response to
cursor: A cursor token for pagination. Use the cursor from the previous response to
fetch the next page of results.

version: The version of templates to retrieve. Accepted values are published (for
Expand Down Expand Up @@ -141,12 +141,12 @@ async def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomationTemplateListResponse:
"""Get the list of automations.
"""
Lists the workspace's saved automation templates, each with its id and a cursor
for paging to the next page of results.

Args:
cursor: A cursor token for pagination.

Use the cursor from the previous response to
cursor: A cursor token for pagination. Use the cursor from the previous response to
fetch the next page of results.

version: The version of templates to retrieve. Accepted values are published (for
Expand Down
24 changes: 10 additions & 14 deletions src/courier/resources/automations/invoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,9 @@ def invoke_ad_hoc(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomationInvokeResponse:
"""Invoke an ad hoc automation run.

This endpoint accepts a JSON payload with a
series of automation steps. For information about what steps are available,
checkout the ad hoc automation guide
[here](https://www.courier.com/docs/automations/steps/).
"""
Runs a series of automation steps supplied inline, without a saved template, and
returns a runId.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -111,7 +108,8 @@ def invoke_by_template(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomationInvokeResponse:
"""
Invoke an automation run from an automation template.
Starts an automation run from a saved template for one recipient, with optional
data and profile, and returns a runId.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -179,12 +177,9 @@ async def invoke_ad_hoc(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomationInvokeResponse:
"""Invoke an ad hoc automation run.

This endpoint accepts a JSON payload with a
series of automation steps. For information about what steps are available,
checkout the ad hoc automation guide
[here](https://www.courier.com/docs/automations/steps/).
"""
Runs a series of automation steps supplied inline, without a saved template, and
returns a runId.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -231,7 +226,8 @@ async def invoke_by_template(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomationInvokeResponse:
"""
Invoke an automation run from an automation template.
Starts an automation run from a saved template for one recipient, with optional
data and profile, and returns a runId.

Args:
extra_headers: Send extra headers
Expand Down
Loading