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

# Update Contact

> Update a contact.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/contacts/{contact_id}
openapi: 3.1.0
info:
  title: wazzapi Public API
  description: >-
    Public API surface for external API-key clients. Only stable /api/v1
    endpoints are included.


    ## Webhook deliveries

    This reference also includes the webhook requests Wazzapi sends to your
    endpoint for incoming messages, message status updates, and device status
    changes. See the `Incoming webhooks` section in the sidebar for headers,
    payload fields, and concrete examples.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Incoming webhooks
    description: >-
      POST deliveries that Wazzapi sends to your webhook endpoint after you
      subscribe to supported events. Verify the signature against the raw body
      and return a 2xx response quickly.
paths:
  /api/v1/contacts/{contact_id}:
    patch:
      tags:
        - contacts
      summary: Update Contact
      description: Update a contact.
      operationId: update_contact_api_v1_contacts__contact_id__patch
      parameters:
        - name: contact_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Contact Id
        - name: Authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ContactUpdateRequest:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Email
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        custom_fields:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Custom Fields
        is_opted_out:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Opted Out
      type: object
      title: ContactUpdateRequest
      description: Request to update a contact.
    ContactResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        phone_number:
          type: string
          title: Phone Number
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        whatsapp_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Whatsapp Name
        profile_picture_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Picture Url
        custom_fields:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Custom Fields
        source:
          type: string
          title: Source
        source_details:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Details
        is_opted_out:
          type: boolean
          title: Is Opted Out
        opted_out_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Opted Out At
        tags:
          items:
            type: string
          type: array
          title: Tags
        last_message_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Message At
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
      type: object
      required:
        - id
        - phone_number
        - source
        - is_opted_out
        - tags
        - created_at
        - updated_at
      title: ContactResponse
      description: Single contact response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````