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

# Create Scheduled Message

> Cria uma mensagem agendada para envio futuro a contatos ou listas de contatos.



## OpenAPI

````yaml openapi-v2 POST /scheduler/create/{instance}
openapi: 3.0.3
info:
  title: ZapThinker API
  version: 2.1.1
servers:
  - url: https://api.zapthinker.com
security: []
paths:
  /scheduler/create/{instance}:
    post:
      tags:
        - Scheduler Controller
      summary: Create a scheduled message
      description: >-
        Cria uma mensagem agendada para envio futuro a contatos ou listas de
        contatos.
      operationId: createScheduledMessage
      parameters:
        - name: instance
          in: path
          required: true
          description: Nome da instância
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Nome do agendamento
                targets:
                  type: array
                  items:
                    type: string
                  description: Lista de JIDs de destino
                contactListId:
                  type: string
                  description: ID da lista de contatos (alternativa a targets)
                content:
                  type: object
                  properties:
                    text:
                      type: string
                    caption:
                      type: string
                mediaUrl:
                  type: string
                  description: URL da mídia para envio
                mediaType:
                  type: string
                  enum:
                    - image
                    - document
                    - video
                runAt:
                  type: string
                  format: date-time
                  description: Data/hora de execução (ISO 8601)
                timezone:
                  type: string
                  description: 'Timezone (ex: America/Sao_Paulo)'
              required:
                - name
                - content
                - runAt
      responses:
        '201':
          description: Agendamento criado com sucesso
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Parâmetros inválidos
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Your authorization key header

````