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

# Update a contact

> Update a contact's attributes



## OpenAPI

````yaml https://raw.githubusercontent.com/chatwoot/chatwoot/develop/swagger/tag_groups/client_swagger.json patch /public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}
openapi: 3.1.0
info:
  title: Chatwoot
  description: This is the API documentation for Chatwoot server.
  version: 1.1.0
  termsOfService: https://www.chatwoot.com/terms-of-service/
  contact:
    email: hello@chatwoot.com
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://app.chatwoot.com/
security: []
tags:
  - name: Contacts API
    description: Public contact APIs
  - name: Conversations API
    description: Public conversation APIs
  - name: Messages API
    description: Public message APIs
paths:
  /public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}:
    parameters:
      - $ref: '#/components/parameters/public_inbox_identifier'
      - $ref: '#/components/parameters/public_contact_identifier'
    patch:
      tags:
        - Contacts API
      summary: Update a contact
      description: Update a contact's attributes
      operationId: update-a-contact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/public_contact_create_update_payload'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/public_contact_record'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request_error'
      security: []
components:
  parameters:
    public_inbox_identifier:
      in: path
      name: inbox_identifier
      schema:
        type: string
      required: true
      description: The identifier obtained from API inbox channel
    public_contact_identifier:
      in: path
      name: contact_identifier
      schema:
        type: string
      required: true
      description: The source id of contact obtained on contact create
  schemas:
    public_contact_create_update_payload:
      type: object
      properties:
        identifier:
          type: string
          description: External identifier of the contact
          example: '1234567890'
        identifier_hash:
          type: string
          description: Identifier hash prepared for HMAC authentication
          example: e93275d4eba0e5679ad55f5360af00444e2a888df9b0afa3e8b691c3173725f9
        email:
          type: string
          description: Email of the contact
          example: alice@acme.inc
        name:
          type: string
          description: Name of the contact
          example: Alice
        phone_number:
          type: string
          description: Phone number of the contact
          example: '+123456789'
        avatar:
          type: string
          format: binary
          description: >-
            Send the form data with the avatar image binary or use the
            avatar_url
        custom_attributes:
          type: object
          description: Custom attributes of the customer
          example: {}
    public_contact_record:
      type: object
      additionalProperties: true
      description: >-
        Full serialized contact record returned when the public API renders a
        Contact model directly.
      properties:
        id:
          type: integer
          description: Id of the contact
        name:
          type:
            - string
            - 'null'
          description: Name of the contact when available
        email:
          type:
            - string
            - 'null'
          description: Email of the contact
        phone_number:
          type:
            - string
            - 'null'
          description: Phone number of the contact
        identifier:
          type:
            - string
            - 'null'
          description: Identifier of the contact
        blocked:
          type: boolean
          description: Whether the contact is blocked
        additional_attributes:
          type:
            - object
            - 'null'
          description: Additional attributes of the contact when present
        custom_attributes:
          type:
            - object
            - 'null'
          description: Custom attributes of the contact when present
        contact_type:
          type:
            - string
            - 'null'
          description: Contact type of the contact when available
        country_code:
          type:
            - string
            - 'null'
          description: Country code of the contact
        last_activity_at:
          type:
            - string
            - 'null'
          description: Last activity timestamp of the contact in ISO 8601 format
        created_at:
          type:
            - string
            - 'null'
          description: Created timestamp of the contact in ISO 8601 format
        updated_at:
          type:
            - string
            - 'null'
          description: Updated timestamp of the contact in ISO 8601 format
        last_name:
          type:
            - string
            - 'null'
          description: Last name of the contact
        middle_name:
          type:
            - string
            - 'null'
          description: Middle name of the contact
        location:
          type:
            - string
            - 'null'
          description: Location of the contact
        account_id:
          type: integer
          description: Account id of the contact
        company_id:
          type:
            - integer
            - 'null'
          description: Company id of the contact
        label_list:
          type: array
          description: Labels applied to the contact
          items:
            type: string
    bad_request_error:
      title: data
      type: object
      properties:
        description:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/request_error'
    request_error:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
        code:
          type: string

````