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

# Cancel a scheduled SMS message for a lead

> Cancels a scheduled SMS event before delivery, preserving the event record while preventing the queued message from being sent.



## OpenAPI

````yaml /openapi.json post /sms/{smsEventId}/cancel
openapi: 3.0.4
info:
  title: Leadping API
  description: >-
    Leadping API for lead intake, messaging, calling, automations, billing,
    business settings, and compliant lead communication workflows.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1
servers:
  - url: https://api.leadping.ai
    description: Production
security: []
tags:
  - name: Analytics
  - name: Automations
  - name: Contact
  - name: Conversations
  - name: Dispositions
  - name: Feedback
  - name: Leads
  - name: LeadStatuses
  - name: Notifications
  - name: OutboundDelivery
  - name: Sources
  - name: Suppressions
  - name: Tags
  - name: Users
  - name: Calls
  - name: PhoneNumbers
  - name: Sms
  - name: Telephony
  - name: UserDataExports
  - name: CallEvents
  - name: Events
  - name: SmsEvents
  - name: Businesses
  - name: PaymentMethods
  - name: Transactions
  - name: Usage
  - name: Wallets
paths:
  /sms/{smsEventId}/cancel:
    post:
      tags:
        - Sms
      summary: Cancel a scheduled SMS message for a lead
      description: >-
        Cancels a scheduled SMS event before delivery, preserving the event
        record while preventing the queued message from being sent.
      operationId: Sms_CancelScheduled
      parameters:
        - name: smsEventId
          in: path
          description: The sms event identifier.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Returns the sms response.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SmsResponse'
                description: >-
                  Response schema for the Leadping API SMS message returned to
                  authenticated clients.
        '400':
          description: The request was invalid or failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    SmsResponse:
      type: object
      properties:
        conversationId:
          type: string
          description: >-
            Conversation ID that links this SMS message to the Leadping inbox
            thread.
        leadId:
          type: string
          description: Lead ID associated with the SMS conversation or outreach attempt.
        fromPhoneNumberId:
          type: string
          description: Sender phone number ID used for this outbound SMS or call.
        outboundPhoneNumberId:
          type: string
          description: Phone number ID selected for outbound delivery.
        fromPhoneNumber:
          type: string
          description: Sender phone number used for this communication.
          nullable: true
        selectionReason:
          enum:
            - StickyConversation
            - LeadAssigned
            - CampaignOrSource
            - Preferred
            - LocalArea
            - HealthyPool
            - FallbackDefault
            - ManualOverride
          type: string
          description: Defines the supported Outgoing Number Selection Reason values.
          nullable: true
        wasManuallyOverridden:
          type: boolean
          description: >-
            Indicates whether a user manually overrode Leadping's automatic
            number selection for this SMS message.
        campaignId:
          type: string
          description: Messaging campaign identifier associated with this SMS message.
          nullable: true
        sourceId:
          type: string
          description: >-
            Lead source ID used for attribution and sender selection on this SMS
            message.
          nullable: true
        text:
          type: string
          description: >-
            Body text for the SMS message or communication represented by this
            SMS message.
        status:
          enum:
            - draft
            - scheduled
            - queued
            - sending
            - sent
            - received
            - delivered
            - failed
            - undeliverable
            - opted_out
            - blocked_compliance
            - blocked_billing
            - blocked_missing_campaign
            - canceled
          type: string
          description: Defines the supported SMS Message Status values.
          nullable: true
        statusReason:
          type: string
          description: >-
            Human-readable reason explaining the current status of this SMS
            message.
          nullable: true
        queuedAt:
          type: string
          description: UTC timestamp when Leadping queued this SMS message for processing.
          format: date-time
          nullable: true
        scheduledFor:
          type: string
          description: UTC timestamp when Leadping is scheduled to send this SMS message.
          format: date-time
          nullable: true
        scheduledReason:
          type: string
          description: Reason Leadping scheduled this delivery for a later time.
          nullable: true
        sendingStartedAt:
          type: string
          description: UTC timestamp when Leadping began sending this message.
          format: date-time
          nullable: true
        sentAt:
          type: string
          description: UTC timestamp when Leadping sent this message to the provider.
          format: date-time
          nullable: true
        deliveredAt:
          type: string
          description: UTC timestamp when the provider confirmed delivery.
          format: date-time
          nullable: true
        receivedAt:
          type: string
          description: UTC timestamp when Leadping received this inbound event or message.
          format: date-time
          nullable: true
        failedAt:
          type: string
          description: UTC timestamp when processing failed for this SMS message.
          format: date-time
          nullable: true
        undeliverableAt:
          type: string
          description: UTC timestamp when the provider marked the message undeliverable.
          format: date-time
          nullable: true
        blockedAt:
          type: string
          description: UTC timestamp when Leadping blocked this communication.
          format: date-time
          nullable: true
        nextRetryAt:
          type: string
          description: UTC timestamp when Leadping will retry this SMS message.
          format: date-time
          nullable: true
        retryCount:
          pattern: ^-?(?:0|[1-9]\d*)$
          description: Number of retry attempts already made for this SMS message.
          format: int32
        canceledAt:
          type: string
          description: UTC timestamp when this delivery or workflow was canceled.
          format: date-time
          nullable: true
        cancelReason:
          type: string
          description: Reason this delivery, run, or request was canceled.
          nullable: true
        errorCode:
          type: string
          description: >-
            Machine-readable error code returned while processing this SMS
            message.
          nullable: true
        errorMessage:
          type: string
          description: >-
            Human-readable error message returned while processing this SMS
            message.
          nullable: true
        trafficType:
          enum:
            - RealLead
            - Warmup
            - Test
            - SystemInternal
            - FailedAttempt
          type: string
          description: Defines the supported SMS Traffic Type values.
          nullable: true
        billableAmount:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          description: >-
            Monetary amount billed for this Leadping communication or
            transaction.
          format: double
          nullable: true
        billingStatus:
          type: string
          description: Billing state for this communication, charge, or transaction.
          nullable: true
        complianceAction:
          type: string
          description: Compliance action applied to this message, lead, or sender.
          nullable: true
        id:
          type: string
          description: The unique identifier for the entity.
        createdAt:
          type: string
          description: The date and time when the entity was created.
          format: date-time
        modifiedAt:
          type: string
          description: The date and time when the entity was last modified, if applicable.
          format: date-time
          nullable: true
      description: >-
        Response schema for the Leadping API SMS message returned to
        authenticated clients.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          description: URI reference that identifies the problem type.
          nullable: true
        title:
          type: string
          description: Short, human-readable summary of the problem.
          nullable: true
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          description: HTTP status code returned for the problem.
          format: int32
          nullable: true
        detail:
          type: string
          description: >-
            Human-readable explanation specific to this occurrence of the
            problem.
          nullable: true
        instance:
          type: string
          description: >-
            URI reference that identifies this specific occurrence of the
            problem.
          nullable: true

````