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

# Update a contact

> Update mutable contact fields.

**Scope:** `write:contacts`



## OpenAPI

````yaml /openapi.json patch /contacts/{id}
openapi: 3.1.0
info:
  title: GainTrace API
  version: 1.0.0
  description: >-
    The GainTrace REST API (v1). Read your customer data and push product-usage
    events, metric events, and signals into GainTrace.


    All endpoints are authenticated with a Bearer API key and scoped to a single
    workspace.
servers:
  - url: https://app.gaintrace.com/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Companies
    description: Read and manage canonical company records.
  - name: Signals
    description: Read, create, and manage buyer / risk signals.
  - name: Ingest
    description: Push product-usage and metric events into GainTrace.
  - name: Contacts
    description: Read and manage the people on an account.
  - name: Webhooks
    description: Subscribe to workspace events with signed, retried delivery.
paths:
  /contacts/{id}:
    patch:
      tags:
        - Contacts
      summary: Update a contact
      description: |-
        Update mutable contact fields.

        **Scope:** `write:contacts`
      operationId: updateContact
      parameters:
        - $ref: '#/components/parameters/pathId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactPatch'
      responses:
        '200':
          description: The updated contact.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Contact'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Email already in use.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    pathId:
      name: id
      in: path
      required: true
      description: >-
        Resource UUID. For companies you may also pass `ext:<externalId>` to
        address by your external id.
      schema:
        type: string
  schemas:
    ContactPatch:
      type: object
      description: Any subset of the mutable contact fields.
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
        email:
          type:
            - string
            - 'null'
          format: email
          description: Unique per workspace.
          maxLength: 255
        externalId:
          type:
            - string
            - 'null'
          maxLength: 255
        phone:
          type:
            - string
            - 'null'
          maxLength: 50
        role:
          type:
            - string
            - 'null'
          maxLength: 100
        contactRole:
          $ref: '#/components/schemas/ContactRole'
        isChampion:
          type: boolean
        linkedinUrl:
          type:
            - string
            - 'null'
          maxLength: 2000
        avatarUrl:
          type:
            - string
            - 'null'
          maxLength: 2000
    Contact:
      type: object
      properties:
        id:
          type: string
          format: uuid
        accountId:
          type: string
          format: uuid
          description: The golden account this contact belongs to.
        name:
          type: string
        email:
          type:
            - string
            - 'null'
          format: email
        externalId:
          type:
            - string
            - 'null'
          description: Your stable user id (for event resolution).
        phone:
          type:
            - string
            - 'null'
        role:
          type:
            - string
            - 'null'
        contactRole:
          anyOf:
            - $ref: '#/components/schemas/ContactRole'
            - type: 'null'
        isChampion:
          type:
            - boolean
            - 'null'
        linkedinUrl:
          type:
            - string
            - 'null'
        avatarUrl:
          type:
            - string
            - 'null'
        lastSeenAt:
          type:
            - string
            - 'null'
          format: date-time
        engagementScore:
          type:
            - number
            - 'null'
          description: Read-only.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable, safe error message.
        detail:
          type: string
        code:
          type: string
      required:
        - error
    ContactRole:
      type: string
      enum:
        - decision_maker
        - champion
        - end_user
        - billing
        - influencer
        - executive_sponsor
        - technical
        - other
  responses:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Insufficient scope, or API v1 is not enabled for the workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Referenced resource not found in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Per-key rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer API key. Secret server keys start with `gt_live_`; client-safe
        browser keys start with `gt_pub_` (write-only, origin-pinned). Create
        and scope keys in Settings → API Keys.

````