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

# Delete Message threads

> Delete a message thread and all associated messages.

Delete a message thread from the database and also deletes all the messages in the thread.

<Warning>
  Deleting a thread will delete all of the messages related to the thread.
</Warning>


## OpenAPI

````yaml v1/api-reference/sms/sms-collection.json DELETE /{instance}/delete-message-thread
openapi: 3.1.0
info:
  title: Hypersender SMS API Docs
  version: v1.0
  description: >-
    Send and receive sms messages, with Hypersender SMS API. This Documentation
    provides a comprehensive guide to the API, including detailed information on
    how to send and receive sms messages, controll message threads, and monitor
    phone heartbeats.


    **How it works**


    To use the API, you need to have the Hypersender app installed on your
    android phone. The app will receive the messages and send them to the
    recipient.


    **Download the app**


    You can download it from the release page on
    [github](https://github.com/hypersender/sms-app-releases/releases).


    **How to use the app**


    - Download the app from the release page.


    - Install the app on your android phone.


    - Grant the app the necessary permissions, see the
    [permissions](https://docs.hypersender.com/docs/hypersender/overview/sms-quick-start#step-4-download-the-hypersender-sms-app),
    section for more information.


    - Open the app, and scan the QR code to link the app with the API.


    - The app will start receiving messages, and then send them to the
    recipient.



    <hr />


    **Quick Demo**

      **Learn how to use Hypersender SMS API to send a message using Postman:**
      [Demo Link](https://app.hypersender.com/send-sms-message-in-postman) **to easily interact with our API.**

    <hr />


    **postman collection**


    You can download our [Postman
    Collection](https://docs.hypersender.com/sms-postman-collection.json) to
    easily interact with our API.
servers:
  - url: https://app.hypersender.com/api/sms/v1
    description: Production
security:
  - Authorization: []
paths:
  /{instance}/delete-message-thread:
    parameters:
      - schema:
          type: string
        name: instance
        in: path
        required: true
    delete:
      tags:
        - Message threads
      summary: Delete Message threads
      description: >-
        ## Delete Message threads


        Delete a message thread from the database and also deletes all the
        messages in the thread.


        :::warning


        Deleting a thread will delete all of the messages related to the thread.


        :::
      operationId: delete-message-thread
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
        - name: messageThreadId
          in: query
          schema:
            type: string
          example: 6ccd5a83-b0cf-4cdf-933e-2a44bf64bdaf
        - name: instance
          in: path
          description: Instance UUID copied from hypersender dashboard
          required: true
          schema:
            type: string
            example: '{{ instance_id }}'
          examples:
            default:
              value: '{{ instance_id }}'
      responses:
        '204':
          description: Successful response
          content: {}
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
components:
  schemas:
    Error404:
      title: Error500
      x-stoplight:
        id: 9j9buxw3w3pig
      type: object
      properties:
        message:
          type: string
          x-stoplight:
            id: 5rbetqawbxxn7
          example: Not Found
      required:
        - message
    Error500:
      title: Error500
      x-stoplight:
        id: pwoo8am0y1e5j
      type: object
      properties:
        message:
          type: string
          x-stoplight:
            id: 5rbetqawbxxn7
          example: Internal Server Error
      required:
        - message
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````