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

# Update Contact

> Updates the details of an existing contact. company_id accepts an integer ID or a domain string to auto-resolve the company.



## OpenAPI

````yaml PATCH /public/v2/contacts/{contact_id}
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers: []
security: []
paths:
  /public/v2/contacts/{contact_id}:
    patch:
      tags:
        - public
      description: >-
        Updates the details of an existing contact. company_id accepts an
        integer ID or a domain string to auto-resolve the company.
      operationId: Modify contact (v2)
      parameters:
        - in: path
          name: contact_id
          schema:
            type: integer
          required: true
        - in: query
          name: structure
          schema:
            type: string
            enum:
              - FLAT
              - NESTED
            default: NESTED
          description: >-
            Format of custom fields in response. NESTED returns array of objects
            with id, field_name, field_value. FLAT returns object with field
            names as keys.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedContactPatchRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedContactPatchRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedContactPatchRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactPatchResponseV2'
          description: ''
        '400':
          description: Bad Request. Invalid data has been provided.
        '401':
          description: Unauthorized. Company does not belong to this client.
        '403':
          description: Forbidden. Missing authentication credentials or invalid API key.
        '404':
          description: Not Found. Contact with this ID does not exist.
        '409':
          description: >-
            Conflict. A contact with this email or LinkedIn URL already exists
            for this client.
        '500':
          description: Internal Server Error. An unexpected error occurred on the server.
components:
  schemas:
    PatchedContactPatchRequest:
      type: object
      properties:
        email:
          type: string
        linkedin_url:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        company_id:
          type: integer
          nullable: true
        origin:
          type: string
        contact_status:
          type: string
        contact_custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/ContactCustomFieldPatch'
    ContactPatchResponseV2:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        email:
          type: string
        linkedin_url:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        company_id:
          type: integer
        contact_custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/ContactCustomFields'
        origin:
          type: string
        contact_status:
          type: string
        first_campaign_email_sent:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        last_campaign_email_sent:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        last_reply_received:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        previous_status:
          type: string
          readOnly: true
          nullable: true
        status_changed_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - first_campaign_email_sent
        - first_name
        - id
        - last_campaign_email_sent
        - last_name
        - last_reply_received
        - origin
        - previous_status
        - status_changed_at
        - updated_time
    ContactCustomFieldPatch:
      type: object
      properties:
        field_name:
          type: string
        field_value:
          type: string
          nullable: true
      required:
        - field_name
    ContactCustomFields:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        field_name:
          type: string
        field_value:
          type: string
          maxLength: 2500
      required:
        - field_name
        - field_value
        - id
        - updated_time

````