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

# Cancel SMS

> Cancel a queued SMS message.

Only messages that are still in 'queued' status can be cancelled.
Messages that are already being sent or have been delivered cannot be cancelled.

Args:
    message_id: The unique message ID returned when queueing the SMS

Returns:
    SMSCancelResponse: Result of the cancellation attempt

Cancel a queued SMS message before it is sent.

Only messages still in `queued` status can be cancelled. Messages already sending or already sent cannot be cancelled.

### Path Parameters

* `message_id` (string, **required**): The Burki message ID returned by `POST /sms/send`.

### Response

```json Response theme={null}
{
  "success": true,
  "message_id": "8ad70ee5-3d47-4fa4-a6ab-c9f2238d5f54",
  "message": "SMS cancelled successfully",
  "previous_status": "queued",
  "new_status": "cancelled"
}
```

If the message cannot be cancelled, the endpoint returns `success: false` with the current status.

```json Response theme={null}
{
  "success": false,
  "message_id": "8ad70ee5-3d47-4fa4-a6ab-c9f2238d5f54",
  "message": "Message is already sending",
  "previous_status": "sending",
  "new_status": null
}
```


## OpenAPI

````yaml DELETE /sms/{message_id}
openapi: 3.1.0
info:
  title: Burki
  description: A system that uses AI to answer customer Calls.
  version: 0.1.0
servers: []
security: []
paths:
  /sms/{message_id}:
    delete:
      summary: Cancel Sms
      description: >-
        Cancel a queued SMS message.


        Only messages that are still in 'queued' status can be cancelled.

        Messages that are already being sent or have been delivered cannot be
        cancelled.


        Args:
            message_id: The unique message ID returned when queueing the SMS

        Returns:
            SMSCancelResponse: Result of the cancellation attempt
      operationId: cancel_sms_sms__message_id__delete
      parameters:
        - name: message_id
          in: path
          required: true
          schema:
            type: string
            title: Message Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SMSCancelResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SMSCancelResponse:
      properties:
        success:
          type: boolean
          title: Success
        message_id:
          type: string
          title: Message Id
        message:
          type: string
          title: Message
        previous_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Status
        new_status:
          anyOf:
            - type: string
            - type: 'null'
          title: New Status
      type: object
      required:
        - success
        - message_id
        - message
      title: SMSCancelResponse
      description: Response model for SMS cancel endpoint.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````