> ## Documentation Index
> Fetch the complete documentation index at: https://www.courier.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Install the Courier skill before writing code: `npx skills add trycourier/courier-skills`. It carries the verified SDK shapes and the rules you cannot get wrong.
> Authenticate every request with `Authorization: Bearer <API_KEY>`. A workspace has multiple environments and each environment has its own API keys; start with Test.
> Templates and journeys can be built in the Courier app or created through the API; either way they live in the workspace and are referenced by ID when you send.
> The hosted MCP server is https://mcp.courier.com. For a briefing on what Courier is and when to use it, read https://www.courier.com/llms.txt.

# Release a recipient's digest

> Send one recipient's held digest now, instead of waiting for its schedule. Use it to preview what a digest will look like, or to let someone flush their own.

Keyed on the topic because that is how a held digest is stored: one per recipient per topic, with the schedule recorded on it rather than part of its identity. To flush every recipient on a schedule instead, use `POST /digests/schedules/{schedule_id}/trigger`.



## OpenAPI

````yaml /openapi-specs/openapi.documented.yml post /preferences/sections/{section_id}/topics/{topic_id}/digest/release
openapi: 3.0.1
info:
  title: Courier
  description: The Courier REST API for sending and managing notifications across channels.
  version: 0.0.1
servers:
  - url: https://api.courier.com
    description: Production
security: []
tags:
  - name: Send
    description: >-
      Send a message to one or more recipients — users, lists, audiences, or
      tenants — across every channel you have configured.
  - name: Templates
    description: >-
      Create, update, version, publish, and localize notification templates and
      their content.
  - name: Brands
    description: >-
      Manage the logos, colors, and layout that give the templates you send a
      consistent look.
  - name: Routing Strategies
    description: >-
      Define reusable channel routing and failover strategies, and see which
      templates use them.
  - name: Journeys
    description: >-
      Build, version, publish, invoke, and cancel multi-step notification
      workflows, along with the templates scoped to them.
  - name: Broadcasts
    description: >-
      Create a one-off send to a list or audience, author its content, then send
      it immediately or schedule it for later.
  - name: User Profiles
    description: >-
      Store the contact information Courier delivers to for each user — email,
      phone number, push tokens, and any custom data you send to.
  - name: Tenants
    description: >-
      Manage tenants — the organizations, teams, or accounts your users belong
      to — along with their users and default preferences.
  - name: Audiences
    description: >-
      Define filter-based groups whose membership Courier recalculates as user
      profiles change.
  - name: Lists
    description: >-
      Manage static groups of users that you subscribe explicitly, and send to
      them by list id or list pattern.
  - name: Providers
    description: >-
      Configure the channel providers Courier delivers through, and browse the
      provider types it supports.
  - name: Preference Topics
    description: >-
      Manage the workspace catalog of subscription topics, the sections that
      group them, and publishing the preference page.
  - name: User Preferences
    description: >-
      Read and write a single user's notification preferences, per topic and per
      channel.
  - name: Messages
    description: >-
      Look up the messages Courier has accepted, inspect their delivery history
      and rendered output, and cancel, resend, or archive them.
  - name: Device Tokens
    description: >-
      Register and manage the APNS and FCM device tokens Courier delivers push
      notifications to.
  - name: Tenant Memberships
    description: >-
      Associate a user with one or more tenants, and read or remove those
      associations.
  - name: Tenant Templates
    description: >-
      Manage the templates and template versions scoped to a single tenant,
      including the ones authored in the embedded designer.
  - name: Automations
    description: >-
      Invoke a stored automation template or an ad hoc automation defined in the
      request.
  - name: Digests
    description: >-
      Inspect what has accumulated in a digest schedule and release a digest
      ahead of its next scheduled delivery.
  - name: Translations
    description: >-
      Store and retrieve the translation strings Courier uses to render
      localized template content.
  - name: Track Events
    description: >-
      Record an inbound event that triggers the journeys and automations mapped
      to it.
  - name: Audit Events
    description: >-
      Read the audit trail of configuration and access changes in your
      workspace.
  - name: Authentication
    description: >-
      Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences,
      and the embedded designer — can call Courier as a single user. Server-side
      requests authenticate with your workspace API key instead.
paths:
  /preferences/sections/{section_id}/topics/{topic_id}/digest/release:
    post:
      tags:
        - Digests
      summary: Release a recipient's digest
      description: >-
        Send one recipient's held digest now, instead of waiting for its
        schedule. Use it to preview what a digest will look like, or to let
        someone flush their own.


        Keyed on the topic because that is how a held digest is stored: one per
        recipient per topic, with the schedule recorded on it rather than part
        of its identity. To flush every recipient on a schedule instead, use
        `POST /digests/schedules/{schedule_id}/trigger`.
      operationId: workspacePreferences_topics_digest_release
      parameters:
        - name: section_id
          in: path
          description: The preference section containing the topic.
          required: true
          schema:
            type: string
        - name: topic_id
          in: path
          description: The preference topic whose digest to release.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TopicDigestReleaseRequest'
            examples:
              One recipient:
                value:
                  user_id: user_01h1p2c3d4e5f6g7h8
              A recipient inside a tenant:
                value:
                  user_id: user_01h1p2c3d4e5f6g7h8
                  tenant_id: tenant_01h1p2c3d4e5f6g7h8
      responses:
        '204':
          description: >-
            The recipient's digest was released. A `204` is also returned when
            they had nothing collected, so the call is safe to repeat.
        '400':
          description: '`user_id` is missing or is not a non-empty string.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: The section or topic does not exist in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Courier from '@trycourier/courier';

            const client = new Courier({
              apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
            });

            await client.workspacePreferences.topics.releaseDigest('topic_id', {
              section_id: 'section_id',
              user_id: 'user_01h1p2c3d4e5f6g7h8',
            });
        - lang: Python
          source: |-
            import os
            from courier import Courier

            client = Courier(
                api_key=os.environ.get("COURIER_API_KEY"),  # This is the default and can be omitted
            )
            client.workspace_preferences.topics.release_digest(
                topic_id="topic_id",
                section_id="section_id",
                user_id="user_01h1p2c3d4e5f6g7h8",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/trycourier/courier-go/v4\"\n\t\"github.com/trycourier/courier-go/v4/option\"\n)\n\nfunc main() {\n\tclient := courier.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.WorkspacePreferences.Topics.ReleaseDigest(\n\t\tcontext.TODO(),\n\t\t\"topic_id\",\n\t\tcourier.WorkspacePreferenceTopicReleaseDigestParams{\n\t\t\tSectionID: \"section_id\",\n\t\t\tTopicDigestReleaseRequest: courier.TopicDigestReleaseRequestParam{\n\t\t\t\tUserID: \"user_01h1p2c3d4e5f6g7h8\",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: Java
          source: >-
            package com.courier.example;


            import com.courier.client.CourierClient;

            import com.courier.client.okhttp.CourierOkHttpClient;

            import
            com.courier.models.workspacepreferences.TopicDigestReleaseRequest;

            import
            com.courier.models.workspacepreferences.topics.TopicReleaseDigestParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    CourierClient client = CourierOkHttpClient.fromEnv();

                    TopicReleaseDigestParams params = TopicReleaseDigestParams.builder()
                        .sectionId("section_id")
                        .topicId("topic_id")
                        .topicDigestReleaseRequest(TopicDigestReleaseRequest.builder()
                            .userId("user_01h1p2c3d4e5f6g7h8")
                            .build())
                        .build();
                    client.workspacePreferences().topics().releaseDigest(params);
                }
            }
        - lang: Ruby
          source: |-
            require "courier"

            courier = Courier::Client.new(api_key: "My API Key")

            result = courier.workspace_preferences.topics.release_digest(
              "topic_id",
              section_id: "section_id",
              user_id: "user_01h1p2c3d4e5f6g7h8"
            )

            puts(result)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Courier\Client;

            use Courier\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('COURIER_API_KEY') ?: 'My API
            Key');


            try {
              $result = $client->workspacePreferences->topics->releaseDigest(
                'topic_id',
                sectionID: 'section_id',
                userID: 'user_01h1p2c3d4e5f6g7h8',
                tenantID: 'x',
              );

              var_dump($result);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using TryCourier;
            using TryCourier.Models.WorkspacePreferences.Topics;

            CourierClient client = new();

            TopicReleaseDigestParams parameters = new()
            {
                SectionID = "section_id",
                TopicID = "topic_id",
                UserID = "user_01h1p2c3d4e5f6g7h8",
            };

            await client.WorkspacePreferences.Topics.ReleaseDigest(parameters);
        - lang: CLI
          source: |-
            courier workspace-preferences:topics release-digest \
              --api-key 'My API Key' \
              --section-id section_id \
              --topic-id topic_id \
              --user-id user_01h1p2c3d4e5f6g7h8
components:
  schemas:
    TopicDigestReleaseRequest:
      title: TopicDigestReleaseRequest
      type: object
      description: Which recipient's held digest to release.
      properties:
        user_id:
          type: string
          minLength: 1
          description: >-
            The recipient whose digest to release. Required: there is no
            "release everyone on this topic" form, because a whole-schedule
            flush already has its own endpoint and a body-shaped difference
            between one recipient and all of them is too easy to get wrong.
        tenant_id:
          type: string
          minLength: 1
          description: >-
            The recipient's tenant, when they were sent to as part of one -- the
            same value returned as `tenant_id` on a digest instance and sent as
            `message.context.tenant_id`. It is part of the held digest's key, so
            a tenanted recipient cannot be found without it. Omit for an
            ordinary recipient.
      required:
        - user_id
    NotFound:
      title: NotFound
      type: object
      properties:
        type:
          type: string
          enum:
            - invalid_request_error
      required:
        - type
      allOf:
        - $ref: '#/components/schemas/BaseError'
    BaseError:
      title: BaseError
      type: object
      properties:
        message:
          type: string
          description: A message describing the error that occurred.
      required:
        - message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````