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

# Create Schedule

> Create Schedule



## OpenAPI

````yaml openapi-whatsapp POST /schedule
openapi: 3.0.3
info:
  title: l2msg API
  version: 2.1.1
servers:
  - url: https://api.l2msg.com/whatsapp
security: []
paths:
  /schedule:
    post:
      tags:
        - Schedules
      summary: Create Schedule
      description: Create Schedule
      operationId: createSchedule
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - phone
                - text
                - sendAt
                - channel
              properties:
                phone:
                  type: string
                  description: O número de telefone de destino com código do país.
                text:
                  type: string
                  description: O texto da mensagem a ser enviada.
                sendAt:
                  type: integer
                  description: O timestamp Unix de quando a mensagem deve ser enviada.
                channel:
                  type: string
                  description: O canal de envio da mensagem.
                cronExpr:
                  type: string
                  description: A expressão cron para agendamentos recorrentes (opcional).
                repeats:
                  type: integer
                  description: >-
                    O número de repetições para o agendamento recorrente
                    (opcional, só pode ser usado com cronExpr e sem until).
                until:
                  type: integer
                  description: >-
                    Timestamp Unix até quando a mensagem deve ser repetida
                    (opcional, só pode ser usado com cronExpr e sem repeats).
            example:
              phone: '+5561999999999'
              text: CRON REP TEST
              sendAt: 1744228685
              channel: Channel
              cronExpr: '*/3 * * * *'
              repeats: 2
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: O identificador único do agendamento.
                  phone:
                    type: string
                    description: O número de telefone de destino com código do país.
                  text:
                    type: string
                    description: O texto da mensagem a ser enviada.
                  sendAt:
                    type: integer
                    description: O timestamp Unix de quando a mensagem deve ser enviada.
                  channel:
                    type: string
                    description: O canal de envio da mensagem.
                  cronExpr:
                    type: string
                    description: A expressão cron para agendamentos recorrentes.
                  repeats:
                    type: integer
                    description: O número de repetições para o agendamento recorrente.
              example:
                id: 780bd49b-f451-46f8-b60d-1526bdda9a27
                phone: '+5561999999999'
                text: CRON REP TEST
                sendAt: 1744228685
                channel: Channel
                cronExpr: '*/3 * * * *'
                repeats: 2
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Your authorization key header

````