# Update a WhatsAppMessage activity

PUT https://api.close.com/api/v1/activity/whatsapp_message/{id}/
Content-Type: application/json

Reference: https://developer.close.com/api/resources/activities/whatsapp/update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Close API
  version: 1.0.0
paths:
  /activity/whatsapp_message/{id}/:
    put:
      operationId: update
      summary: Update a WhatsAppMessage activity
      tags:
        - subpackage_activitiesWhatsappMessages
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppMessageActivity'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWhatsAppMessage'
servers:
  - url: https://api.close.com/api/v1
components:
  schemas:
    WhatsAppAttachmentData:
      type: object
      properties:
        content_type:
          type: string
        filename:
          type: string
        url:
          type: string
      required:
        - content_type
        - filename
        - url
      title: WhatsAppAttachmentData
    CommunicationDirection:
      type: string
      enum:
        - incoming
        - outgoing
      description: >-
        This is the former EmailDirection.

        Any activity that has a concept of direction (in or out) should be using

        this enum.

        For historical reasons, this is different from PhoneActivityDirection

        but at some point PhoneActivityDirection should be deprecated and
        replaced

        with CommunicationDirection.
      title: CommunicationDirection
    UpdateWhatsAppMessage:
      type: object
      properties:
        activity_at:
          type: string
          format: date-time
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/WhatsAppAttachmentData'
        contact_id:
          type: string
        direction:
          $ref: '#/components/schemas/CommunicationDirection'
        integration_link:
          type:
            - string
            - 'null'
          format: uri
        local_phone:
          type: string
        message_markdown:
          type: string
        remote_phone:
          type: string
        response_to_id:
          type:
            - string
            - 'null'
        user_id:
          type: string
      title: UpdateWhatsAppMessage
    Attachment:
      type: object
      properties:
        content_type:
          type:
            - string
            - 'null'
        filename:
          type:
            - string
            - 'null'
        size:
          type:
            - integer
            - 'null'
        thumbnail_url:
          type:
            - string
            - 'null'
        url:
          type: string
      required:
        - content_type
        - filename
        - size
        - url
      title: Attachment
    CreationSource:
      type: string
      enum:
        - ui
        - api
        - import
        - clipper
        - email
        - suggestion
        - segment-integration
        - customerio-integration
        - calendly-integration
        - ai
        - whatsapp
        - webform
      title: CreationSource
    WhatsAppMessageActivity:
      type: object
      properties:
        _type:
          type: string
        activity_at:
          type:
            - string
            - 'null'
          format: date-time
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
        contact_id:
          type:
            - string
            - 'null'
        created_by:
          type:
            - string
            - 'null'
        created_by_name:
          type:
            - string
            - 'null'
        date_created:
          type: string
          format: date-time
        date_updated:
          type: string
          format: date-time
        direction:
          $ref: '#/components/schemas/CommunicationDirection'
        external_whatsapp_message_id:
          type: string
        id:
          type: string
        integration_link:
          type:
            - string
            - 'null'
        integration_name:
          type:
            - string
            - 'null'
        lead_id:
          type:
            - string
            - 'null'
        local_phone:
          type: string
        local_phone_formatted:
          type: string
        message_html:
          type: string
        message_markdown:
          type: string
        organization_id:
          type: string
        remote_phone:
          type: string
        remote_phone_formatted:
          type: string
        response_to_id:
          type:
            - string
            - 'null'
        sequence_id:
          type:
            - string
            - 'null'
        sequence_name:
          type:
            - string
            - 'null'
        sequence_subscription_id:
          type:
            - string
            - 'null'
        source:
          $ref: '#/components/schemas/CreationSource'
        text:
          type: string
        updated_by:
          type:
            - string
            - 'null'
        updated_by_name:
          type:
            - string
            - 'null'
        user_id:
          type:
            - string
            - 'null'
        user_name:
          type:
            - string
            - 'null'
        users:
          type: array
          items:
            type: string
      required:
        - _type
        - activity_at
        - contact_id
        - created_by
        - date_created
        - date_updated
        - direction
        - external_whatsapp_message_id
        - id
        - integration_link
        - integration_name
        - lead_id
        - local_phone
        - local_phone_formatted
        - message_html
        - message_markdown
        - organization_id
        - remote_phone
        - remote_phone_formatted
        - response_to_id
        - source
        - text
        - updated_by
        - user_id
        - users
      title: WhatsAppMessageActivity
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: basic
    OAuth2:
      type: http
      scheme: bearer

```