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

# Update contact

> Updates the supplied fields of one contact without replacing unrelated attributes. Use it to keep recipient names, numbers, tags, or custom data synchronized with your application.



## OpenAPI

````yaml /openapi.json put /contacts/{id}
openapi: 3.1.0
info:
  title: Wachat API
  version: v1
  description: >-
    Wachat REST API. Authenticate with a workspace API key: send it as
    `Authorization: Bearer <key>`. Generate keys in the dashboard under
    Developers / API.
servers:
  - url: https://crm.wachat.net/api/v1
security:
  - http: []
tags:
  - name: Message
    description: >-
      Send a single WhatsApp message — text, media (image / video / document /
      audio) or a location pin — to one number, then read its delivery status or
      your message history. A file can be attached directly as a multipart
      `media` field or referenced by a public URL.
  - name: Template
    description: >-
      Create, list and manage your approved WhatsApp templates, and send a
      template to one number with your own header, body variables and button
      values. Use this for utility / marketing sends that need a pre-approved
      template — including one with a PDF / document header (pass the file's
      public URL as the header, e.g. from the Media endpoint).
  - name: Media
    description: >-
      Upload a file once (multipart / form-data, field name `file`, up to 16 MB)
      and get back a hosted public URL you can reuse across sends — for example
      a PDF to use as a document-header on a template, or an image on a message.
  - name: Contact
    description: >-
      Full create / read / update / delete over your contacts and leads,
      including search by number, tags and custom attributes.
  - name: ContactGroup
    description: >-
      Organise contacts into groups: create groups, list them, and add or remove
      members — handy for targeting broadcasts and campaigns.
  - name: Broadcast
    description: >-
      Send the same message to many contacts at once and track each broadcast's
      progress and per-recipient delivery.
  - name: Campaign
    description: >-
      Create, start, pause and monitor drip / marketing campaigns and their
      recipients.
  - name: Scheduled
    description: >-
      Schedule a WhatsApp send for a future time, list upcoming scheduled
      messages, and cancel one before it goes out.
  - name: AutoReply
    description: >-
      Manage keyword auto-replies — the automatic responses that fire when an
      inbound message matches a rule.
  - name: Flow
    description: >-
      Enroll a contact into an automation flow (chatbot) and manage your flows
      through the API.
  - name: Device
    description: >-
      List the WhatsApp numbers / devices connected to your workspace and check
      each one's connection status.
  - name: Webhook
    description: >-
      Register and manage webhook endpoints so Wachat POSTs real-time events
      (message received / sent / delivered / read / failed, plus campaign and
      contact events) to your server. When you set a signing secret each
      delivery carries an HMAC-SHA256 signature header you can verify.
  - name: Deal
    description: >-
      Manage sales-pipeline deals — create, list, update and move deals between
      stages.
  - name: Conversation
    description: >-
      Read your workspace inbox: list chat threads (conversations) and fetch the
      messages inside a thread.
  - name: Account
    description: Read your account details, plan, limits and message-credit usage.
paths:
  /contacts/{id}:
    put:
      tags:
        - Contact
      summary: Update contact
      description: >-
        Updates the supplied fields of one contact without replacing unrelated
        attributes. Use it to keep recipient names, numbers, tags, or custom
        data synchronized with your application.
      operationId: v1.contacts.update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContactRequest'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
                  meta:
                    type: string
                required:
                  - data
                  - meta
        '404':
          description: Request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        const: not_found
                      message:
                        type: string
                        const: Contact not found.
                      details:
                        type: string
                    required:
                      - code
                      - message
                      - details
                required:
                  - error
        '422':
          $ref: '#/components/responses/ValidationException'
          description: Request failed.
components:
  schemas:
    UpdateContactRequest:
      type: object
      description: >-
        Update an existing contact in the current workspace. Every field is

        optional — only the keys present in the request body are changed.
        Scramble

        reads these rules to document the request body.
      properties:
        name:
          type:
            - string
            - 'null'
          description: Contact's full display name.
          maxLength: 191
        first_name:
          type:
            - string
            - 'null'
          description: Optional name parts.
          maxLength: 191
        middle_name:
          type:
            - string
            - 'null'
          maxLength: 191
        last_name:
          type:
            - string
            - 'null'
          maxLength: 191
        title:
          type:
            - string
            - 'null'
          description: Optional salutation/title (e.g. Mr, Dr).
          maxLength: 50
        phone:
          type:
            - string
            - 'null'
          description: Phone number in international format (digits, E.164).
          maxLength: 32
        country_code:
          type:
            - string
            - 'null'
          description: Country dial code (e.g. +91). Prefixed onto the phone if missing.
          maxLength: 10
        email:
          type:
            - string
            - 'null'
          format: email
          description: Email address.
          maxLength: 191
        language:
          type:
            - string
            - 'null'
          description: Preferred language / locale.
          maxLength: 80
        address:
          type:
            - string
            - 'null'
          description: Postal address.
          maxLength: 1000
        note:
          type:
            - string
            - 'null'
          description: Free-text note attached to the contact.
          maxLength: 2000
        attributes:
          type:
            - array
            - 'null'
          description: Free-form key/value attributes stored against the contact.
          items:
            type: string
        is_unsubscribed:
          type:
            - boolean
            - 'null'
          description: Whether the contact has opted out of messages.
        group_ids:
          type:
            - array
            - 'null'
          description: Group ids the contact belongs to (replaces the existing set).
          items:
            type: integer
            description: |-
              Scope the existence check to the caller's workspace so a foreign
              group id is rejected (was a global `exists` → cross-tenant ref).
      title: UpdateContactRequest
  responses:
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer

````