> ## Documentation Index
> Fetch the complete documentation index at: https://api.zenedu.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Створити розсилку

> Створює розсилку.



## OpenAPI

````yaml POST /api/v1/bot/{bot}/broadcasts
openapi: 3.1.0
info:
  title: Zenedu API v1
  description: >-
    API for managing Telegram bots, subscribers, products, funnels, offers, and
    orders on the Zenedu platform.
  version: 1.0.0
servers:
  - url: https://app.zenedu.io
security:
  - bearerAuth: []
tags:
  - name: User
    description: Current user profile
  - name: Bots
    description: Bot management
  - name: Subscribers
    description: Subscriber management
  - name: Orders
    description: Order management
  - name: Products
    description: Product management
  - name: Funnels
    description: Funnel management
  - name: Offers
    description: Offer management
  - name: Links
    description: Link generation
  - name: Files
    description: File downloads
  - name: Zapier
    description: Zapier webhook management
  - name: Webhooks
    description: Account webhook subscriptions
  - name: Payment systems
    description: Account payment methods
  - name: Bot settings
    description: 'Bot configuration: email, branding, integrations, legal documents'
  - name: Commands
    description: Bot menu commands
  - name: Custom fields
    description: Subscriber custom fields
  - name: Folders
    description: Folders for products, funnels, channels and groups
  - name: Slugs
    description: Public link slugs
  - name: Funnel links
    description: Subscription links of a funnel
  - name: Coupons
    description: Coupon management
  - name: Subscriptions
    description: Recurring subscription management
  - name: Tasks
    description: Student task review
  - name: Broadcasts
    description: Broadcast messages
  - name: Automations
    description: Event-based automations
  - name: Affiliate
    description: Affiliate program management
  - name: Shop
    description: Bot shop draft and publication
  - name: Channels
    description: Telegram channels connected to the bot
  - name: Groups
    description: Telegram groups connected to the bot
  - name: Mini-app
    description: Telegram mini app configuration
  - name: Web
    description: Web app configuration
  - name: Telegram files
    description: Telegram file attachments for steps and broadcasts
paths:
  /api/v1/bot/{bot}/broadcasts:
    post:
      tags:
        - Broadcasts
      summary: Create broadcast
      description: Creates a broadcast.
      operationId: createBroadcast
      parameters:
        - name: bot
          in: path
          required: true
          description: Bot ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  maxLength: 255
                  description: Broadcast name
                text:
                  type: string
                  nullable: true
                  description: Message text
                link_preview:
                  type: boolean
                  description: Whether to show link previews
                settings:
                  type: object
                  properties:
                    attach_file:
                      type: boolean
                    has_spoiler:
                      type: boolean
                    attach_style:
                      type: string
                      nullable: true
                      enum:
                        - classic
                        - under_text
                    autodelete:
                      type: integer
                    protect_content:
                      type: boolean
                  description: Message display settings
                filters:
                  type: object
                  description: Recipient filters (same shape as subscriber filters)
                telegram_file_ids:
                  type: array
                  items:
                    type: integer
                  description: >-
                    IDs of files registered via `POST
                    /api/v1/bot/{bot}/telegram-files` to attach to this
                    broadcast (photos, videos, documents, etc.). The given set
                    replaces the current attachments entirely. Only files you
                    uploaded that are not yet attached to anything are accepted
                    — an already-attached, non-existent, or another user's id
                    returns 422 (`telegram_file_ids: Not found`). Omit the field
                    or send an empty array to leave attachments unchanged;
                    `null` is rejected with 422. To remove an attachment, use
                    `DELETE …/broadcasts/{broadcast}/attachments/{file}`.
      responses:
        '201':
          description: Broadcast created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Broadcast'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — lacks access to this bot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Broadcast:
      type: object
      properties:
        id:
          type: integer
          description: Broadcast ID
        name:
          type: string
          description: Broadcast name
        text:
          type:
            - string
            - 'null'
          description: Message text
        status:
          type: string
          description: Broadcast status
        scheduled_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Scheduled send time
        link_preview:
          type: boolean
          description: Whether link previews are shown
        settings:
          type: object
          properties:
            attach_file:
              type: boolean
              description: Whether a file is attached
            has_spoiler:
              type: boolean
              description: Whether media is a spoiler
            attach_style:
              type:
                - string
                - 'null'
              description: Attachment style
            autodelete:
              type: integer
              description: Auto-delete delay in seconds
            protect_content:
              type: boolean
              description: Whether content is protected from forwarding
        filters:
          type: object
          description: Normalized recipient filters
        recipients_count:
          type:
            - integer
            - 'null'
          description: Planned recipients count
        sent_by_user_id:
          type:
            - integer
            - 'null'
          description: ID of the user who sent the broadcast
        subscribers_count:
          type: integer
          description: Number of subscribers reached
        clicks_count:
          type: integer
          description: Distinct button clicks
        attachments:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                description: Attachment ID
              type:
                type: string
                description: Attachment type
              name:
                type:
                  - string
                  - 'null'
                description: File name
        buttons:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                description: Button ID
              type:
                type: string
                description: Button type
              name:
                type: string
                description: Button label
              link:
                type:
                  - string
                  - 'null'
                description: Button URL
              offer_id:
                type:
                  - integer
                  - 'null'
                description: Offer ID
              actions:
                type: array
                items:
                  type: object
              settings:
                type: object
              sort:
                type: integer
                description: Sort order
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Creation timestamp
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Validation errors keyed by field name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from the Zenedu dashboard

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.