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-node/compare/v7.21.0...v7.21.1)

### Documentation

* **openapi:** describe user topic-preference fields explicitly ([#172](https://github.com/trycourier/courier-node/issues/172)) ([dba1cfc](https://github.com/trycourier/courier-node/commit/dba1cfc46d8dd557223158758a77ca3fd5a8a03d))
* **openapi:** rewrite operation descriptions for agents and SEO ([#174](https://github.com/trycourier/courier-node/issues/174)) ([db95d94](https://github.com/trycourier/courier-node/commit/db95d94acdcfbf50bceb7282fc5cd393d539f7f9))

## 7.21.0 (2026-07-23)

Full Changelog: [v7.20.0...v7.21.0](https://github.com/trycourier/courier-node/compare/v7.20.0...v7.21.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@trycourier/courier",
"version": "7.21.0",
"version": "7.21.1",
"description": "The official TypeScript library for the Courier API",
"author": "Courier <support@courier.com>",
"types": "dist/index.d.ts",
Expand Down
15 changes: 10 additions & 5 deletions src/resources/audiences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ import { path } from '../internal/utils/path';

export class Audiences extends APIResource {
/**
* 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.
*/
retrieve(audienceID: string, options?: RequestOptions): APIPromise<Audience> {
return this._client.get(path`/audiences/${audienceID}`, options);
}

/**
* Creates or updates audience.
* Creates or replaces an audience from a filter and an AND or OR operator.
* Membership recalculates automatically as profiles change.
*/
update(
audienceID: string,
Expand All @@ -27,7 +29,8 @@ export class Audiences extends APIResource {
}

/**
* 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.
*/
list(
query: AudienceListParams | null | undefined = {},
Expand All @@ -37,7 +40,8 @@ export class Audiences extends APIResource {
}

/**
* 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.
*/
delete(audienceID: string, options?: RequestOptions): APIPromise<void> {
return this._client.delete(path`/audiences/${audienceID}`, {
Expand All @@ -47,7 +51,8 @@ export class Audiences extends APIResource {
}

/**
* 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.
*/
listMembers(
audienceID: string,
Expand Down
6 changes: 4 additions & 2 deletions src/resources/audit-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ import { path } from '../internal/utils/path';

export class AuditEvents extends APIResource {
/**
* 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.
*/
retrieve(auditEventID: string, options?: RequestOptions): APIPromise<AuditEvent> {
return this._client.get(path`/audit-events/${auditEventID}`, options);
}

/**
* 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.
*/
list(
query: AuditEventListParams | null | undefined = {},
Expand Down
3 changes: 2 additions & 1 deletion src/resources/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { RequestOptions } from '../internal/request-options';

export class Auth extends APIResource {
/**
* 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.
*
* @example
* ```ts
Expand Down
3 changes: 2 additions & 1 deletion src/resources/automations/automations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export class Automations extends APIResource {
invoke: InvokeAPI.Invoke = new InvokeAPI.Invoke(this._client);

/**
* 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.
*
* @example
* ```ts
Expand Down
9 changes: 4 additions & 5 deletions src/resources/automations/invoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ import { path } from '../../internal/utils/path';

export class Invoke extends APIResource {
/**
* 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.
*
* @example
* ```ts
Expand Down Expand Up @@ -41,7 +39,8 @@ export class Invoke extends APIResource {
}

/**
* 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.
*
* @example
* ```ts
Expand Down
16 changes: 10 additions & 6 deletions src/resources/brands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { path } from '../internal/utils/path';

export class Brands extends APIResource {
/**
* Create a new brand. Requires `name` and `settings` (with at least
* `colors.primary` and `colors.secondary`).
* Creates a brand from a name and settings, including primary and secondary
* colors. Brands supply the logo, colors, and styling that templates render with.
*
* @example
* ```ts
Expand All @@ -28,7 +28,8 @@ export class Brands extends APIResource {
}

/**
* Fetch a specific brand by brand ID.
* Returns one brand by id, including its colors, logo and styling settings,
* Handlebars snippets, and published version.
*
* @example
* ```ts
Expand All @@ -40,7 +41,8 @@ export class Brands extends APIResource {
}

/**
* Replace an existing brand with the supplied values.
* Replaces a brand with the values you supply, so send the complete settings and
* snippets rather than only the fields you want changed.
*
* @example
* ```ts
Expand All @@ -54,7 +56,8 @@ export class Brands extends APIResource {
}

/**
* Get the list of brands.
* Lists the workspace's brands. Every entry carries its name, styling settings,
* snippets, and published version.
*
* @example
* ```ts
Expand All @@ -69,7 +72,8 @@ export class Brands extends APIResource {
}

/**
* Delete a brand by brand ID.
* Deletes a brand by id. Reassign any template or tenant that references it before
* deleting to keep their styling intact.
*
* @example
* ```ts
Expand Down
5 changes: 2 additions & 3 deletions src/resources/digests/schedules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import { path } from '../../internal/utils/path';

export class Schedules extends APIResource {
/**
* List the digest instances for a schedule. Each instance represents the events
* accumulated for a single user against the schedule, and can be used to monitor
* digest accumulation before the digest is released.
* Returns the digest instances for a schedule, one per user, with cursor paging.
* Use it to see what has accumulated before a digest releases.
*/
listInstances(
scheduleID: string,
Expand Down
3 changes: 2 additions & 1 deletion src/resources/inbound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { RequestOptions } from '../internal/request-options';

export class Inbound extends APIResource {
/**
* Courier Track Event
* Records an inbound event that can trigger a journey. Requires an event name, a
* messageId you generate, a type, and a properties object.
*
* @example
* ```ts
Expand Down
42 changes: 16 additions & 26 deletions src/resources/journeys/journeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ export class Journeys extends APIResource {
templates: TemplatesAPI.Templates = new TemplatesAPI.Templates(this._client);

/**
* Create a journey. Defaults to `DRAFT` state; pass `state: "PUBLISHED"` to
* publish on create. Send nodes are not allowed on `POST`. The standard flow is:
* create the journey shell here, add notification templates with
* `POST /journeys/{templateId}/templates`, then wire them into the journey with
* `PUT /journeys/{templateId}`. Call `POST /journeys/{templateId}/publish` to
* publish a draft after the fact.
* Creates a journey from a set of nodes, in draft state unless you pass a
* published state. Send nodes cannot be included until their templates exist.
*
* @example
* ```ts
Expand Down Expand Up @@ -72,7 +68,8 @@ export class Journeys extends APIResource {
}

/**
* Get the list of journeys.
* Lists the workspace's journeys, each carrying a name, state, and enabled flag.
* Paged by cursor.
*
* @example
* ```ts
Expand All @@ -87,8 +84,8 @@ export class Journeys extends APIResource {
}

/**
* Archive a journey. Archived journeys cannot be invoked. Existing journey runs
* continue to completion.
* Archives a journey so it can no longer be invoked. Runs already in flight
* continue to completion, so archiving never strands a user mid-sequence.
*
* @example
* ```ts
Expand All @@ -103,12 +100,8 @@ export class Journeys extends APIResource {
}

/**
* Cancel journey runs. The request body must include EXACTLY ONE of
* `cancelation_token` (cancels every run associated with the token) or `run_id`
* (cancels a single tenant-scoped run). Supplying both or neither returns a `400`.
* A `run_id` that does not match a run for the tenant returns `404`. Cancelation
* is idempotent: a run that has already finished (`PROCESSED`/`ERROR`) or was
* already `CANCELED` is left unchanged and its current status is returned.
* Cancels in-flight journey runs, either every run sharing a cancelation token or
* one run by id. Use it to stop a sequence when the event resolves.
*
* @example
* ```ts
Expand All @@ -122,8 +115,8 @@ export class Journeys extends APIResource {
}

/**
* Invoke a journey by id or alias to start a new run. The response includes a
* `runId` identifying the run.
* Starts a journey run for one user and returns a runId. Runs execute
* asynchronously, so the response arrives before any message is sent.
*
* @example
* ```ts
Expand All @@ -145,7 +138,8 @@ export class Journeys extends APIResource {
}

/**
* List published versions of a journey, ordered most recent first.
* Lists a journey's published versions, most recent first, so you have a version
* id to roll back to. Paged by cursor.
*
* @example
* ```ts
Expand All @@ -158,9 +152,8 @@ export class Journeys extends APIResource {
}

/**
* Publish the current draft as a new version. Body is optional; pass
* `{ "version": "vN" }` to roll back to a prior version instead. Returns 404 if
* the journey has no draft to publish.
* Publishes a journey's current draft as a new version, making it live for new
* runs. Pass a version instead to roll back to an earlier one.
*
* @example
* ```ts
Expand All @@ -176,11 +169,8 @@ export class Journeys extends APIResource {
}

/**
* Replace the journey draft. Updates the working draft only; call
* `POST /journeys/{templateId}/publish` to make it live, or pass
* `state: "PUBLISHED"` in this request to publish immediately. Send-node
* `template` ids must already exist and be scoped to this journey, and node ids
* must not be claimed by another journey.
* Replaces a journey's working draft, leaving the published version live until you
* publish. Reach for this when editing a journey already running.
*
* @example
* ```ts
Expand Down
28 changes: 12 additions & 16 deletions src/resources/journeys/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export class Templates extends APIResource {
}

/**
* Fetch a journey-scoped notification template by id. Pass `?version=draft`
* (default `published`) to retrieve the working draft, or `?version=vN` for a
* historical version.
* Returns a journey's own notification template with its name, brand, subscription
* topic, and content. Defaults to the published version.
*
* @example
* ```ts
Expand Down Expand Up @@ -81,8 +80,8 @@ export class Templates extends APIResource {
}

/**
* Archive the journey-scoped notification template. Archived templates cannot be
* sent.
* Archives one journey's notification template, preventing further sends. Detach
* any send node referencing it beforehand.
*
* @example
* ```ts
Expand All @@ -100,8 +99,8 @@ export class Templates extends APIResource {
}

/**
* List published versions of the journey-scoped notification template, ordered
* most recent first.
* Lists the published versions of a template that belongs to a journey, most
* recent first. Paged by cursor.
*
* @example
* ```ts
Expand All @@ -121,9 +120,8 @@ export class Templates extends APIResource {
}

/**
* Publish the current draft of the journey-scoped notification template as a new
* version. Optionally roll back to a prior version by passing
* `{ "version": "vN" }`.
* Publishes a journey-scoped template's draft as a new version. Pass a version
* instead to roll back the template to an earlier publish.
*
* @example
* ```ts
Expand Down Expand Up @@ -201,7 +199,8 @@ export class Templates extends APIResource {
}

/**
* Replace the journey-scoped notification template draft.
* Replaces the draft content of one journey's notification template. Publish it
* before send nodes referencing it render the change.
*
* @example
* ```ts
Expand All @@ -228,11 +227,8 @@ export class Templates extends APIResource {
}

/**
* Retrieve the elemental content of a journey-scoped notification template. The
* response contains the versioned elements along with their content checksums,
* which can be used to detect changes between versions. Pass `?version=draft`
* (default `published`) to retrieve the working draft, or `?version=vN` for a
* historical version.
* Returns the Elemental elements and version of a journey-scoped template's
* content. Compare versions to see what changed between publishes.
*
* @example
* ```ts
Expand Down
Loading
Loading