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

# Create a broadcast draft

> Resolves recipients from `filter_tags`/`filter_conv_status`, a `segment_id`, or a `list_id` (list takes precedence) and creates a **DRAFT** — this call never sends anything. A broadcast only actually sends after a separate `POST /api/v1/broadcasts/{id}/confirm/` call.



## OpenAPI

````yaml /openapi.json post /api/v1/broadcasts/
openapi: 3.0.3
info:
  title: ChatBridge Public API
  version: 1.0.0
  description: >-
    Customer-facing REST API for ChatBridge — contacts, conversations, messages,
    templates, team, catalogue, tickets, and WhatsApp Flows. Authenticate with a
    workspace API key: `Authorization: Bearer cb_...`. See
    https://github.com/algosmiths/whatschat/blob/main/public_api.md for the full
    scope/versioning reference.
servers:
  - url: https://api.algosmiths.com
    description: Production
security: []
paths:
  /api/v1/broadcasts/:
    post:
      tags:
        - Broadcasts
      summary: Create a broadcast draft
      description: >-
        Resolves recipients from `filter_tags`/`filter_conv_status`, a
        `segment_id`, or a `list_id` (list takes precedence) and creates a
        **DRAFT** — this call never sends anything. A broadcast only actually
        sends after a separate `POST /api/v1/broadcasts/{id}/confirm/` call.
      operationId: broadcasts_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BroadcastCreateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BroadcastCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BroadcastCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
          description: >-
            Bad Request — validation error (e.g. missing phone_number_id or
            template_id)
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized — missing or invalid API key
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Forbidden — insufficient scope (requires broadcast.manage) or
            workspace trial expired
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests — rate limit exceeded (60 requests/minute per key)
      security:
        - ApiKeyAuth: []
        - tokenAuth: []
        - CookieAuth: []
components:
  schemas:
    BroadcastCreateRequest:
      type: object
      properties:
        phone_number_id:
          type: integer
          description: Phone number ID from GET /api/v1/phone-numbers/
        template_id:
          type: integer
          description: Template ID from GET /api/v1/templates/
        template_params:
          type: object
          nullable: true
          description: Legacy template parameter overrides
        template_variables:
          type: object
          nullable: true
          description: >-
            Per-contact template variable mapping (maps placeholder index to
            field/static value)
        filter_tags:
          type: array
          items:
            type: string
          nullable: true
          description: 'Recipient filter: contacts matching any of these tags'
        filter_conv_status:
          type: string
          nullable: true
          description: 'Recipient filter: conversation status (e.g. OPEN, CLOSED, PENDING)'
        segment_id:
          type: integer
          nullable: true
          description: 'Recipient filter: segment ID'
        list_id:
          type: integer
          nullable: true
          description: >-
            Recipient filter: contact list ID (takes precedence over segment_id
            and filter_*)
      required:
        - phone_number_id
        - template_id
    ValidationErrorResponse:
      type: object
      additionalProperties:
        type: array
        items:
          type: string
      description: >-
        Field-level validation error response (400). Keys are field names;
        values are lists of error messages. May include 'non_field_errors' for
        non-field-specific errors.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: cb_...
      description: >-
        Workspace API key, e.g. `Authorization: Bearer cb_live_...`. Create one
        in Settings → API Keys. See public_api.md § 3 for scopes.
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"
    CookieAuth:
      type: apiKey
      in: cookie
      name: token
      description: Dashboard session cookie — internal use only, not the public contract.

````