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

# Update Whatsapp Account

> Update a WhatsApp account



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/convai/whatsapp-accounts/{phone_number_id}
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/whatsapp-accounts/{phone_number_id}:
    patch:
      tags:
        - Agents Platform
      summary: Update Whatsapp Account
      description: Update a WhatsApp account
      operationId: update_whatsapp_account
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
            title: Phone Number Id
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWhatsAppAccountRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWhatsAppAccountResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateWhatsAppAccountRequest:
      properties:
        assigned_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assigned Agent Id
        enable_messaging:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enable Messaging
        enable_audio_message_response:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enable Audio Message Response
        enable_typing_indicator:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enable Typing Indicator
      type: object
      title: UpdateWhatsAppAccountRequest
    GetWhatsAppAccountResponse:
      properties:
        business_account_id:
          type: string
          title: Business Account Id
        phone_number_id:
          type: string
          title: Phone Number Id
        business_account_name:
          type: string
          title: Business Account Name
        phone_number_name:
          type: string
          title: Phone Number Name
        phone_number:
          type: string
          title: Phone Number
        account_type:
          type: string
          const: cloud_api
          title: Account Type
          description: Which Embedded Signup flow produced this account.
          default: cloud_api
        assigned_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assigned Agent Id
        enable_messaging:
          type: boolean
          title: Enable Messaging
          default: true
        enable_audio_message_response:
          type: boolean
          title: Enable Audio Message Response
          default: true
        enable_typing_indicator:
          type: boolean
          title: Enable Typing Indicator
          default: true
        assigned_agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Assigned Agent Name
        is_token_expired:
          type: boolean
          title: Is Token Expired
          default: false
        registration_status:
          $ref: '#/components/schemas/WhatsAppRegistrationStatus'
          title: Registration Status
      type: object
      required:
        - business_account_id
        - phone_number_id
        - business_account_name
        - phone_number_name
        - phone_number
        - assigned_agent_name
        - registration_status
      title: GetWhatsAppAccountResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WhatsAppRegistrationStatus:
      type: string
      enum:
        - UNKNOWN
        - REGISTERING
        - REGISTERED
        - UNCERTAIN
        - ACTION_REQUIRED
      title: WhatsAppRegistrationStatus
    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

````