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

# Update status of conversation.

> DEPRECATED: use regular conversation update endpoint.




## OpenAPI

````yaml /openapi/chat-client.yaml patch /conversations/{id}/status
openapi: 3.0.3
info:
  version: 1.0.0
  title: HealviChat Client API
servers:
  - url: https://{tenant_domain}/third-party/v1
    variables:
      tenant_domain:
        default: your-tenant.onhealvi.com
        description: Your tenant domain
security:
  - bearerAuth: []
paths:
  /conversations/{id}/status:
    patch:
      tags:
        - conversations
      summary: Update status of conversation.
      description: |
        DEPRECATED: use regular conversation update endpoint.
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  $ref: '#/components/schemas/ConversationStatus'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Conversation'
      deprecated: true
components:
  schemas:
    ConversationStatus:
      description: Status of a conversation.
      type: string
      enum:
        - to-do
        - in-progress
        - done
    Conversation:
      description: >
        A conversation between an agent and a customer.

        Assignable to a user to mark who is actively managing the conversation.

        Assignable to an folder to mark which folder the conversation belongs
        to.
      type: object
      properties:
        id:
          type: integer
          description: Internal ID.
        folder_id:
          type: integer
          description: |
            Internal ID of folder this conversation belongs to.
            When null, the conversation is not assigned to an folder.
          nullable: true
        created_at:
          description: Datetime when conversation was created.
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        channel:
          $ref: '#/components/schemas/Channel'
        status:
          $ref: '#/components/schemas/ConversationStatus'
        pinned:
          type: boolean
        archived:
          type: boolean
        snooze_until:
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        agent:
          $ref: '#/components/schemas/Agent'
        customer:
          $ref: '#/components/schemas/Customer'
        user:
          $ref: '#/components/schemas/User'
        latest_message:
          allOf:
            - $ref: '#/components/schemas/Message'
          nullable: true
        latest_customer_message:
          description: Contains the latest message from the customer, if available.
          allOf:
            - $ref: '#/components/schemas/Message'
          nullable: true
        last_reply_from:
          description: >
            Date and time of the last message received from either customer or
            agent. This value remains even if

            you delete the last message.
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        last_customer_reply_from:
          description: >
            Date and time of the last message received from the customer. This
            value remains even if

            you delete the last customer message.
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        latest_note:
          description: Contains the latest note written from business.
          allOf:
            - $ref: '#/components/schemas/Note'
          nullable: true
        unread_customer_messages_count:
          description: Number of messages from customer which do not have status "read".
          type: integer
        reply_until:
          description: >
            Indicates until when it's possible to send a (free form) reply to
            this conversation. If a datetime

            in the future is given,

            it should be possible to send a reply without errors (exception:
            WhatsApp, see below).

            If this field is null, a reply can only be sent if the user

            initiates a new conversation. The timing differs per channel.
            WhatsApp has the

            most complex rules on sending messages. Currently it's only possible
            to initiate business messages

            by using pre approved templates. Note: even when this field
            indicates that no reply is possible,

            you can still call the API to send a reply. You will then receive a
            message status update from the channel

            if the message could not be delivered.

            Important (WhatsApp): there is the special case when the business
            initiates a conversation (e.g. using the restart method).

            As soon as the message is sent, a reply_until value will be given
            from WhatsApp. The business will only be able to

            send more messages if the user replies something within the 24 hour
            window. So even though this field indicates

            that a reply would be possible, an error will be received when the
            business tries to send another message without

            user interaction. See the fields "reply_possible" and
            "customer_interaction_required".
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        reply_possible:
          description: >
            Flag to indicate if a (free form) reply to this conversation is
            possible. If true, all requirements

            should be met that a message without error can be sent. Use this
            flag to enable/disable your chat input field.

            The "reply_until" field can be used to show how much time is left
            until conversation expires.
          type: boolean
        customer_interaction_required:
          description: >
            Flag to indicate if a message from the customer is required. Typical
            used in combination with the "restart"

            endpoint. After restarting a conversation, the "reply_possible" flag
            will turn true as soon as the customer

            sends any message.
          type: boolean
    Channel:
      description: Type of messenger service.
      type: string
      enum:
        - bridge
        - whatsapp
        - facebook
        - widget
    Agent:
      description: |
        Represents an agent belonging to a messenger service.
        A business phone number registered on WhatsApp is an agent.
      type: object
      properties:
        id:
          type: integer
          description: Internal ID.
        channel:
          $ref: '#/components/schemas/Channel'
        display_id:
          type: string
          description: An unique identifier within a channel.
          example: 4915223567929
        name:
          type: string
          description: Name received from channel.
          example: John Doe
        in_sync:
          type: boolean
          description: >
            Indicates whether the agent is actually a connected agent (e.g. a
            WhatsApp number).

            In case of disconnecting a tenants service, this flag will turn
            false to keep conversations.

            You should not use this agent anymore to send messages as you will
            receive errors.
        healthy:
          type: boolean
          description: Whether the agent is healthy and can send/receive messages.
          example: true
        unread_conversations_count:
          type: integer
          description: Number of conversation with at least one unread customer message.
        bot_id:
          type: integer
          description: Default bot that should handle new conversations.
          nullable: true
        proxy_email:
          type: string
          description: >
            If given, messages will be sent to this email address.

            When a reply to that email is received, the message will be
            forwarded to the customer.
          nullable: true
        whatsapp:
          description: Field only available if this agent has channel "whatsapp".
          type: object
          properties:
            is_on_biz_app:
              type: boolean
              description: Whether the agent is connected to a BizApp.
              example: false
            is_missing_funds:
              type: boolean
              description: >
                Whether the agent (360dialog number) needs to pay in order to
                send billable messages.

                (e.g. WhatsApp marketing template messages)
              example: false
    Customer:
      description: |
        Represents a customer using a messenger service.
        A person with a phone number registered on WhatsApp is a customer.
      type: object
      properties:
        id:
          type: integer
        channel:
          $ref: '#/components/schemas/Channel'
        display_id:
          type: string
          description: An unique identifier within a channel.
          example: 4915223567929
        canonical_id:
          type: string
          nullable: true
          description: >
            Additional ID that identifies the customer. Currently used for
            WhatsApp.

            In WhatsApp, the display_id is either the phone number or the
            username.

            The canonical_id is always the BSUID (see WhatsApp usernames
            documentation).

            For other channels, the canonical_id is not used.
          example: DE.abc123
        name:
          type: string
          description: Name received from channel.
          example: John Doe
        username:
          type: string
          nullable: true
          description: Self given username. See WhatsApp usernames.
          example: john_doe
        profile:
          $ref: '#/components/schemas/ProfileSummary'
        conversations:
          description: Not always included.
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
    User:
      description: |
        User from business which operates this app.
      type: object
      properties:
        id:
          type: integer
          description: Internal ID.
        name:
          type: string
        email:
          type: integer
          nullable: true
        roles:
          description: List of roles. "admin" has all permissions implicitly.
          type: array
          items:
            type: string
        permissions:
          description: List of permissions.
          type: array
          items:
            type: string
        has_password:
          type: boolean
        has_pin:
          type: boolean
        created_at:
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
    Message:
      description: A message within a conversation.
      type: object
      properties:
        id:
          type: integer
          description: Internal ID.
        conversation_id:
          type: integer
          description: Foreign ID of related conversation.
        from:
          $ref: '#/components/schemas/MessageFrom'
        source:
          $ref: '#/components/schemas/MessageSource'
        user_id:
          description: Id of user who created this message.
          type: integer
          nullable: true
        contents:
          description: >
            A message can contain multiple contents when receiving.

            Usually it is just one item. For example when sending multiple

            contacts with WhatsApp, it will generate one message with multiple

            contacts within the contents array. When sending, only one item in
            the

            array is allowed.
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TextMessageContent'
              - $ref: '#/components/schemas/ImageMessageContent'
              - $ref: '#/components/schemas/VideoMessageContent'
              - $ref: '#/components/schemas/AudioMessageContent'
              - $ref: '#/components/schemas/DocumentMessageContent'
              - $ref: '#/components/schemas/LocationMessageContent'
              - $ref: '#/components/schemas/ContactMessageContent'
              - $ref: '#/components/schemas/InteractiveMessageContent'
            minLength: 1
        status:
          $ref: '#/components/schemas/MessageStatus'
        agent_reaction:
          description: String containing a single emoji.
          type: string
          nullable: true
        customer_reaction:
          description: String containing a single emoji.
          type: string
          nullable: true
        sent_at:
          description: Datetime when message was sent.
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        reference:
          description: Reference to a message within the same conversation.
          type: object
          nullable: true
        latest_error:
          description: Contains the latest error if something went wrong.
          allOf:
            - $ref: '#/components/schemas/MessageError'
          nullable: true
        wa_template_id:
          description: >-
            If "source" is "whatsapp-campaign" then this will be the ID of the
            WhatsApp template used.
          type: integer
          nullable: true
        wa_flow_id:
          description: ID of WhatsApp flow that has been used.
          type: integer
          nullable: true
    Note:
      description: Note within a conversation. Only visible to business.
      type: object
      properties:
        id:
          type: integer
          description: Internal ID.
        conversation_id:
          type: integer
        text:
          description: Note content.
          type: string
        created_at:
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
    ProfileSummary:
      description: >
        Profile data of a customer, without the nested list of other customers
        on the same profile.

        Used when embedding a profile inside a customer, to avoid re-embedding
        the customer itself.
      type: object
      properties:
        id:
          type: integer
        salutation:
          type: string
          enum:
            - formal_male
            - formal_female
            - informal
        name:
          type: string
          example: John Doe
        gender:
          type: string
          enum:
            - undisclosed
            - male
            - female
            - diverse
        blocked:
          type: boolean
          description: If a profile is blocked, receiving messages will be disabled.
        date_of_birth:
          type: string
          format: date
          nullable: true
          example: '1970-01-01'
        phone_number:
          description: Phone number in international format.
          type: string
          nullable: true
          example: '+4915224367929'
        email:
          type: string
          format: email
          nullable: true
        address:
          type: string
          nullable: true
        custom_1:
          description: >-
            One of five custom fields. Names of custom fields can be configured
            via settings.
          type: string
          nullable: true
        custom_2:
          type: string
          nullable: true
        custom_3:
          type: string
          nullable: true
        custom_4:
          type: string
          nullable: true
        custom_5:
          type: string
          nullable: true
        created_at:
          description: Datetime when profile was created.
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        updated_at:
          description: Datetime when profile was last updated.
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
    MessageFrom:
      description: Who wrote the message.
      type: string
      enum:
        - system
        - agent
        - customer
    MessageSource:
      description: What triggered the message.
      type: string
      enum:
        - user
        - bot
        - whatsapp-campaign
        - proxy-mail
    TextMessageContent:
      description: Simple message content containing text.
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        content:
          description: The content of the text message.
          type: string
    ImageMessageContent:
      description: Message content containing an image.
      allOf:
        - $ref: '#/components/schemas/FileMessageContent'
        - type: object
          properties:
            type:
              type: string
              enum:
                - image
            caption:
              description: Caption of image.
              type: string
              nullable: true
    VideoMessageContent:
      description: Message content containing a video.
      allOf:
        - $ref: '#/components/schemas/FileMessageContent'
        - type: object
          properties:
            type:
              type: string
              enum:
                - video
            caption:
              description: Caption of video.
              type: string
              nullable: true
    AudioMessageContent:
      description: Message content containing an audio recording.
      allOf:
        - $ref: '#/components/schemas/FileMessageContent'
        - type: object
          properties:
            type:
              type: string
              enum:
                - audio
            voice:
              description: True if audio is a voice recording.
              type: boolean
    DocumentMessageContent:
      description: Message content containing a document.
      allOf:
        - $ref: '#/components/schemas/FileMessageContent'
        - type: object
          properties:
            type:
              type: string
              enum:
                - document
            filename:
              description: Name of document.
              type: string
              nullable: true
            caption:
              description: Caption of document.
              type: string
              nullable: true
    LocationMessageContent:
      description: Message content containing a GPS location.
      type: object
      properties:
        type:
          type: string
          enum:
            - location
        latitude:
          type: string
        longitude:
          type: string
        address:
          type: string
          nullable: true
        name:
          description: Name of the place.
          type: string
          nullable: true
        url:
          type: string
          nullable: true
    ContactMessageContent:
      description: Message content containing a contact.
      type: object
      required:
        - name
      properties:
        type:
          type: string
          enum:
            - contact
        name:
          type: object
          required:
            - formatted_name
            - first_name
          properties:
            formatted_name:
              type: string
            first_name:
              type: string
              nullable: true
            middle_name:
              type: string
              nullable: true
            last_name:
              type: string
              nullable: true
            prefix:
              type: string
              nullable: true
            suffix:
              type: string
              nullable: true
        birthday:
          type: string
          format: date
          nullable: true
          example: '1970-01-01T00:00:00.000Z'
        phones:
          type: array
          items:
            type: object
            properties:
              phone:
                type: string
              type:
                type: string
                description: >-
                  Type of phone number. For example, cell, mobile, main, iPhone,
                  home, work, etc.
        emails:
          type: array
          items:
            type: object
            properties:
              email:
                type: string
              type:
                type: string
                description: Type of email, such as personal or work.
        addresses:
          type: array
          items:
            type: object
            properties:
              street:
                type: string
              city:
                type: string
              state:
                type: string
              zip:
                type: string
              country:
                type: string
              country_code:
                type: string
              type:
                type: string
        org:
          type: object
          properties:
            company:
              type: string
            department:
              type: string
            title:
              type: string
    InteractiveMessageContent:
      description: >
        See all interactive types:

        https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/interactive-cta-url-messages

        Except media carousel. Header supports only text.
      type: object
      properties:
        type:
          type: string
          enum:
            - interactive
        interactive_type:
          type: string
          enum:
            - url
            - button
            - list
            - whatsapp_flow
            - whatsapp_catalog_message
            - whatsapp_request_contact_info
        header_text:
          type: string
          nullable: true
        body_text:
          type: string
        footer_text:
          type: string
          nullable: true
        url_action:
          nullable: true
          type: object
          properties:
            url:
              type: string
              format: uri
            title:
              type: string
        button_action:
          nullable: true
          type: object
          properties:
            buttons:
              type: array
              items:
                type: object
                properties:
                  title:
                    type: string
                  id:
                    type: string
                    nullable: true
        list_action:
          nullable: true
          type: object
          properties:
            title:
              type: string
            sections:
              type: array
              items:
                type: object
                properties:
                  title:
                    type: string
                  rows:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        description:
                          type: string
                          nullable: true
                        id:
                          type: string
                          nullable: true
        whatsapp_flow_action:
          nullable: true
          type: object
          properties:
            cta:
              type: string
              description: Text on the button that opens the flow.
            flow_id:
              type: string
            flow_token:
              type: string
              nullable: true
              description: >-
                Optional custom value that will be posted back and stored in the
                meta field of the message.
            screen:
              type: string
              nullable: true
              description: Optional alternate start screen.
            data:
              type: object
              nullable: true
              description: Optional start data for the first screen.
        whatsapp_catalog_action:
          nullable: true
          type: object
          properties:
            thumbnail_product_retailer_id:
              type: string
              nullable: true
    MessageStatus:
      description: >-
        Status of message. Created messages have not been sent yet via external
        API.
      type: string
      enum:
        - created
        - sent
        - delivered
        - read
        - error
    MessageError:
      description: Error description when something went wrong sending/receiving a message.
      type: object
      properties:
        id:
          type: integer
          description: Internal ID.
        message_id:
          type: integer
          description: Foreign ID of related message.
        type:
          type: string
          enum:
            - status-update
            - other
        original_message:
          description: Error message from bridge or messenger service.
          type: string
        user_friendly_message:
          description: If given, contains error message that can be shown to the user.
          type: string
          nullable: true
        created_at:
          description: Datetime when error was created.
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
    FileMessageContent:
      description: Base object for message content having a file.
      type: object
      properties:
        has_file:
          type: boolean
          enum:
            - true
        uuid:
          description: Unique UUID of file. Used to retrieve file data from server.
          type: string
        name:
          description: Name of file.
          nullable: true
        mime_type:
          description: Type of file.
          type: string
          example: audio/ogg
        size:
          description: Size of file in bytes.
          type: integer
        download_url:
          deprecated: true
          description: >
            URL to directly download the file. URL is our API endpoint. Token
            still needed.

            Please use the public_download_url field instead to get CDN access
            directly.
          type: string
        public_download_url:
          description: |
            URL to directly download the file without a token.
            WARNING: Temporary valid for 7 days!
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````