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

# Update a pending scheduled message's time, body (manual only), or
cancel-on-reply flag. Creator or team members only.



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json patch /lead/{leadId}/scheduled-message/{scheduledMessageId}
openapi: 3.0.4
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
tags:
  - name: Account
  - name: AccountNotification
  - name: Agency
  - name: Analytics
  - name: Billing
  - name: Bot
  - name: BotMetric
  - name: BotSourceVariable
  - name: BotTemplate
  - name: BotTesting
  - name: Dashboard
  - name: Hierarchy
  - name: Lead
  - name: Leaderboard
  - name: Library
  - name: LiveDemo
  - name: Notification
  - name: Persona
  - name: Report
  - name: SmartFAQ
  - name: Source
  - name: SourceChannel
  - name: Webhook
paths:
  /lead/{leadId}/scheduled-message/{scheduledMessageId}:
    patch:
      tags:
        - Lead
      summary: |-
        Update a pending scheduled message's time, body (manual only), or
        cancel-on-reply flag. Creator or team members only.
      parameters:
        - name: leadId
          in: path
          required: true
          schema:
            type: string
        - name: scheduledMessageId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScheduledMessageInputDto'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateScheduledMessageInputDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateScheduledMessageInputDto'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ScheduledMessageDto'
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledMessageDto'
            text/json:
              schema:
                $ref: '#/components/schemas/ScheduledMessageDto'
components:
  schemas:
    UpdateScheduledMessageInputDto:
      type: object
      properties:
        sendAt:
          type: string
          format: date-time
          nullable: true
        body:
          type: string
          description: Manual messages only; AI messages have no stored body.
          nullable: true
        cancelOnReply:
          type: boolean
          nullable: true
      additionalProperties: false
    ScheduledMessageDto:
      required:
        - cancelOnReply
        - createdAt
        - createdByAccountId
        - id
        - kind
        - leadId
        - sendAt
        - status
      type: object
      properties:
        id:
          type: string
          nullable: true
        leadId:
          type: string
          nullable: true
        sourceId:
          type: string
          nullable: true
        kind:
          type: string
          nullable: true
        body:
          type: string
          nullable: true
        channel:
          type: string
          nullable: true
        botId:
          type: string
          nullable: true
        sendAt:
          type: string
          format: date-time
        cancelOnReply:
          type: boolean
        status:
          type: string
          nullable: true
        statusReason:
          type: string
          nullable: true
        createdByAccountId:
          type: string
          nullable: true
        createdByName:
          type: string
          nullable: true
        createdByIconUrl:
          type: string
          nullable: true
        sentMessageId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
      additionalProperties: false
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````