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

# Create a new broadcast

> Creates a new broadcast with the specified phone number and contacts query.



## OpenAPI

````yaml POST /broadcasts
openapi: 3.0.0
info:
  title: Cogfy Messenger Public API
  version: 1.0.0
  description: API for interacting with the Cogfy Messenger platform
servers:
  - url: https://messenger-public-api.cogfy.com
    description: Production server
  - url: http://localhost:53981
    description: Local server
security:
  - ApiKeyAuth: []
tags: []
paths:
  /broadcasts:
    post:
      tags:
        - Broadcasts
      summary: Create a new broadcast
      description: >-
        Creates a new broadcast with the specified phone number and contacts
        query.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - text
                  description: The type of the broadcast message.
                title:
                  type: string
                  maxLength: 100
                  description: The title of the broadcast message.
                content:
                  type: string
                  maxLength: 1024
                  description: The content of the broadcast message.
                phoneNumberId:
                  type: string
                  format: uuid
                  description: The ID of the phone number to use for the broadcast.
                contactsQuery:
                  type: object
                  properties:
                    tags:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                            description: The tags to filter contacts for the broadcast.
      responses:
        '201':
          description: Broadcast created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The ID of the created broadcast.
        '400':
          description: Bad request, invalid input data
        '404':
          description: Phone number not found
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key

````