> ## 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.

# Edit Message Thread

> Edit the archived status of a message thread.

Edit message thread archived status


## OpenAPI

````yaml v1/api-reference/sms/sms-collection.json PUT /{instance}/edit-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}/edit-message-thread:
    put:
      tags:
        - Message threads
      summary: Edit Message Thread
      description: |-
        ## Edit Message Thread

        Edit message thread archived status
      operationId: edit-message-thread
      parameters:
        - name: instance
          in: path
          description: Instance UUID copied from hypersender dashboard
          required: true
          schema:
            type: string
            example: '{{ instance_id }}'
          examples:
            default:
              value: '{{ instance_id }}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                is_archived:
                  type: boolean
                  x-stoplight:
                    id: 7j9utaiqgoav7
                  description: >-
                    Specifies whether the message thread should be marked as
                    archived.
                messageThreadId:
                  type: string
                  x-stoplight:
                    id: eyek4cihig84l
                  description: Specifies the message thread id you want to be archived
        description: ''
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditMessageThread'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '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:
    EditMessageThread:
      type: object
      x-stoplight:
        id: tlnnvr0h1rnez
      properties:
        id:
          type: string
        phone_id:
          type: string
        last_message_id:
          type: string
        from_phone_number:
          type: string
        to_phone_number:
          type: string
        is_archived:
          type: boolean
        last_message_content:
          type: string
        last_message_at:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      x-examples:
        Example 1:
          id: 9df34332-2070-4cc5-beba-ad21fcf9ff6f
          phone_id: 9defcf1e-552c-4bef-a843-872edec576ef
          last_message_id: 9e03fc6b-ce90-4399-a472-6b029857e15b
          from_phone_number: WE
          to_phone_number: '+201478930987'
          is_archived: true
          last_message_content: >-
            اشترك الآن في أجدع شحنه 26.6 واحصل علي 1,300 وحده تستخدمهم في
            المكالمات الصوتيه و الانترنت ب 26.6 جنيه صالحه لمدة 14 يوم. للإشتراك
            اتصل ب #566* او زور تطبيق MyWE
          last_message_at: '2025-01-20 18:59:28'
          created_at: '2025-01-12 11:28:19'
          updated_at: '2025-01-20 18:59:30'
      description: ''
    Error400:
      title: Error400
      x-stoplight:
        id: 8swvc1ct1z3h7
      type: object
      properties:
        errors:
          type: object
          x-stoplight:
            id: rw2idauwtmv2j
          description: This Object contains the key and the message
        message:
          type: string
          x-stoplight:
            id: 5rbetqawbxxn7
          example: The given data was invalid.
        status:
          type: string
          x-stoplight:
            id: ueqvh7touhe34
          example: '400'
      required:
        - errors
        - message
        - status
    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

````