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

# Update a Contact

> Update a specific contact by its ID.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json patch /orgs/{org_id}/contacts/{contact_id}
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
paths:
  /orgs/{org_id}/contacts/{contact_id}:
    patch:
      tags:
        - Orgs Contacts
      summary: Update a Contact
      description: Update a specific contact by its ID.
      parameters:
        - schema:
            type: string
          required: true
          description: Org ID
          name: org_id
          in: path
        - schema:
            type: string
          required: true
          description: Contact ID
          name: contact_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContactSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UpdateContactSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactSchema'
components:
  schemas:
    UpdateContactSchema:
      type: object
      properties:
        name:
          type:
            - string
            - 'null'
          maxLength: 512
          description: Name of the contact
        blocked:
          type: boolean
          description: Whether the contact is blocked
        unsubscribed:
          type: boolean
          description: Whether the contact is unsubscribed
        ai_replies:
          type: boolean
          description: >-
            Whether the assistant auto-replies to this contact (false =
            human-handled only)
      description: Schema for updating a contact
    ContactSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        blocked:
          type: boolean
        blocked_at:
          type: string
          format: date-time
        unsubscribed:
          type: boolean
        unsubscribed_at:
          type: string
          format: date-time
        unsubscribe_reason:
          type: string
        unsubscribe_feedback:
          type: string
        ai_replies:
          type: boolean
        ai_replies_at:
          type: string
          format: date-time
        is_admin:
          type: boolean
        channels:
          type: array
          items:
            $ref: '#/components/schemas/ContactChannelSchema'
        segments:
          type: array
          items:
            $ref: '#/components/schemas/SegmentLimitedSchema'
        properties:
          type: object
          additionalProperties: {}
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - blocked
        - unsubscribed
        - ai_replies
        - is_admin
        - channels
        - segments
        - properties
        - created_at
        - updated_at
      description: Schema for the contact
    ContactChannelSchema:
      type: object
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/ConnectionIntegrationIdSchema'
        user_id:
          type: string
          description: >-
            The unique identifier for the contact channel, e.g Phone Number or
            User ID
        avatar:
          type:
            - string
            - 'null'
          description: The avatar for the contact channel, e.g X Avatar URL
        name:
          type:
            - string
            - 'null'
          description: The name for the contact channel, e.g Full Name
        username:
          type:
            - string
            - 'null'
          description: The username for the contact channel, e.g Username
        email:
          type:
            - string
            - 'null'
          description: The email for the contact channel, e.g Email
        phone:
          type:
            - string
            - 'null'
          description: The phone number for the contact channel, e.g Phone Number
        country:
          type:
            - string
            - 'null'
          description: >-
            The country code associated with the contact channel, e.g US for
            United States
        agent:
          type:
            - string
            - 'null'
          description: The user agent associated with the contact channel
        ip:
          type:
            - string
            - 'null'
          description: The IP address associated with the contact channel
        language:
          type:
            - string
            - 'null'
          description: >-
            The language code associated with the contact channel, e.g en for
            English
        link:
          type: string
          description: >-
            A link to the contact channel, e.g a link to the social media
            profile
        platform_data:
          $ref: '#/components/schemas/ContactChannelPlatformDataSchema'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - type
        - user_id
        - avatar
        - name
        - username
        - email
        - phone
        - country
        - agent
        - ip
        - language
        - platform_data
        - created_at
        - updated_at
      description: Schema for the contact channel
    SegmentLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        color:
          $ref: '#/components/schemas/ColorNameSchema'
        contacts_count:
          type: number
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - color
        - contacts_count
        - created_at
        - updated_at
      description: Schema for the segment
    ConnectionIntegrationIdSchema:
      type: string
      enum:
        - internal
        - org
        - custom
        - whatsapp_bot
        - messenger_bot
        - instagram_dm
        - tiktok_dm
        - telegram_bot
        - gmail
        - slack_bot
        - twilio
        - telnyx
        - email
      description: ID of the connection integration
    ContactChannelPlatformDataSchema:
      type: object
      properties: {}
      description: Schema for the platform-specific data of a contact channel
    ColorNameSchema:
      type: string
      enum:
        - red
        - orange
        - amber
        - yellow
        - lime
        - green
        - teal
        - cyan
        - sky
        - blue
        - indigo
        - violet
        - purple
        - fuchsia
        - pink
        - rose
        - neutral
      description: The name of the color to use in the UI
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````