> ## 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.

# Create Broadcast

> Create a broadcast. Provisions a private notification template for the broadcast and returns the new broadcast in the draft state. Exactly one channel is required.



## OpenAPI

````yaml /openapi-specs/openapi.documented.yml post /broadcasts
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: Inbox
    description: Manage the messages in a user's in-app inbox.
  - 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:
  /broadcasts:
    post:
      tags:
        - Broadcasts
      summary: Create Broadcast
      description: >-
        Create a broadcast. Provisions a private notification template for the
        broadcast and returns the new broadcast in the draft state. Exactly one
        channel is required.
      operationId: broadcasts_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBroadcastRequest'
            examples:
              Example:
                value:
                  name: Spring Sale Announcement
                  channel: email
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Broadcast'
              examples:
                Example:
                  value:
                    id: bst_01kx4h2jdafq8bk9amzvy6hbv0
                    name: Spring Sale Announcement
                    channel: email
                    status: draft
                    schedule: null
                    created_at: '2026-01-01T00:00:00.000Z'
                    updated_at: '2026-01-01T00:00:00.000Z'
                    created_by: user_01kx4h2jdafq8bk9amzvy6hbv0
                    updated_by: user_01kx4h2jdafq8bk9amzvy6hbv0
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              examples:
                ValidationError:
                  value:
                    type: invalid_request_error
                    message: 'channel: channel is required'
      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
            });

            const broadcast = await client.broadcasts.create({
              channel: 'email',
              name: 'Spring Sale Announcement',
            });

            console.log(broadcast.id);
        - 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
            )
            broadcast = client.broadcasts.create(
                channel="email",
                name="Spring Sale Announcement",
            )
            print(broadcast.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/trycourier/courier-go\"\n\t\"github.com/trycourier/courier-go/option\"\n)\n\nfunc main() {\n\tclient := courier.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tbroadcast, err := client.Broadcasts.New(context.TODO(), courier.BroadcastNewParams{\n\t\tCreateBroadcastRequest: courier.CreateBroadcastRequestParam{\n\t\t\tChannel: courier.CreateBroadcastRequestChannelEmail,\n\t\t\tName:    \"Spring Sale Announcement\",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", broadcast.ID)\n}\n"
        - lang: Java
          source: |-
            package com.courier.example;

            import com.courier.client.CourierClient;
            import com.courier.client.okhttp.CourierOkHttpClient;
            import com.courier.models.broadcasts.Broadcast;
            import com.courier.models.broadcasts.CreateBroadcastRequest;

            public final class Main {
                private Main() {}

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

                    CreateBroadcastRequest params = CreateBroadcastRequest.builder()
                        .channel(CreateBroadcastRequest.Channel.EMAIL)
                        .name("Spring Sale Announcement")
                        .build();
                    Broadcast broadcast = client.broadcasts().create(params);
                }
            }
        - lang: Ruby
          source: >-
            require "courier"


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


            broadcast = courier.broadcasts.create(channel: :email, name: "Spring
            Sale Announcement")


            puts(broadcast)
        - 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 {
              $broadcast = $client->broadcasts->create(
                channel: 'email', name: 'Spring Sale Announcement'
              );

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

            CourierClient client = new();

            BroadcastCreateParams parameters = new()
            {
                Channel = Channel.Email,
                Name = "Spring Sale Announcement",
            };

            var broadcast = await client.Broadcasts.Create(parameters);

            Console.WriteLine(broadcast);
        - lang: CLI
          source: |-
            courier broadcasts create \
              --api-key 'My API Key' \
              --channel email \
              --name 'Spring Sale Announcement'
components:
  schemas:
    CreateBroadcastRequest:
      title: CreateBroadcastRequest
      type: object
      description: Request body for creating a broadcast.
      properties:
        name:
          type: string
          description: Human-readable name.
        channel:
          type: string
          description: The single delivery channel for this broadcast.
          enum:
            - email
            - sms
            - push
            - inbox
            - slack
            - msteams
      required:
        - name
        - channel
    Broadcast:
      title: Broadcast
      type: object
      description: >-
        A broadcast — a single-channel message delivered to a known set of
        recipients (a list or audience).
      properties:
        id:
          type: string
          description: The broadcast ID (bst_ prefix).
        name:
          type: string
          description: Human-readable name.
        channel:
          type: string
          description: The broadcast's delivery channel.
          enum:
            - email
            - sms
            - push
            - inbox
            - slack
            - msteams
        status:
          type: string
          enum:
            - draft
            - scheduled
            - sending
            - sent
          description: Lifecycle status of the broadcast.
        schedule:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/BroadcastSchedule'
          description: The broadcast's schedule, or null while it is an unscheduled draft.
        created_at:
          type: string
          description: ISO 8601 timestamp when the broadcast was created.
        updated_at:
          type: string
          description: ISO 8601 timestamp of the last update.
        created_by:
          type: string
          description: Actor that created the broadcast.
        updated_by:
          type: string
          description: Actor that last updated the broadcast.
        archived_at:
          type: string
          nullable: true
          description: ISO 8601 timestamp when the broadcast was archived, if archived.
        archived_by:
          type: string
          nullable: true
          description: Actor that archived the broadcast, if archived.
      required:
        - id
        - name
        - channel
        - status
        - created_at
        - updated_at
        - created_by
        - updated_by
    BadRequest:
      title: BadRequest
      type: object
      properties:
        type:
          type: string
          enum:
            - invalid_request_error
      required:
        - type
      allOf:
        - $ref: '#/components/schemas/BaseError'
    BroadcastSchedule:
      title: BroadcastSchedule
      type: object
      description: The delivery schedule and recipient targeting for a broadcast.
      properties:
        recipient_type:
          type: string
          enum:
            - list
            - audience
          description: Whether the broadcast targets a list or an audience.
        recipient_id:
          type: string
          description: ID of the target list or audience.
        scheduled_to:
          type: string
          nullable: true
          description: >-
            Wall-clock timestamp of the scheduled send, no timezone offset (e.g.
            "2026-07-21T20:00:00").
        timezone:
          type: string
          nullable: true
          description: IANA timezone for the scheduled send (e.g. America/New_York).
      required:
        - recipient_type
        - recipient_id
    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

````