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

# Update a contact

> Changes only the keys sent: name, first_name, last_name, title, role, department and accounts at the top level (unless a sync in your workspace owns one), custom fields under `fields`. Each value written counts as Statisfy's: later CRM syncs do not overwrite it. A cleared value is not kept that way: a sync from your CRM may fill it again. `null` or a blank string clears title, role, department, first_name and last_name; `name` cannot be cleared. A name part sent without `name` rebuilds the name from the parts sent and the stored ones (the middle name included); a `name` sent beside them is the name as sent. For a contact with only a full name stored, a lone part is a 422 (send `name` with it), as is clearing every part. Sending name, first_name or last_name for a portal user (a contact with a login) is a 422: their name lives on their login profile. `accounts` replaces the contact's accounts, the primary first (live account ids, each once); it cannot be emptied. Key-contact marks on accounts dropped from the list are removed; marks on accounts it keeps stay. As in the app, the accounts count as set by hand. `email` is set at create and cannot change: create a new contact for a new address. Every key is checked before anything is written, and any problem refuses the whole request with a 422 listing each one in `details`. Where your workspace pushes contacts to Salesforce, the next push sends the name, title and mapped custom fields; not role, department or accounts, and not a cleared value. A 500 whose `details` list fields as `written` means those standard fields were written and the custom values were not; it says whether to send them again or what refused them.



## OpenAPI

````yaml /api/statisfy-api.openapi.json patch /v1/objects/contact/records/{contact_id}
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/objects/contact/records/{contact_id}:
    patch:
      tags:
        - contacts
      summary: Update a contact
      description: >-
        Changes only the keys sent: name, first_name, last_name, title, role,
        department and accounts at the top level (unless a sync in your
        workspace owns one), custom fields under `fields`. Each value written
        counts as Statisfy's: later CRM syncs do not overwrite it. A cleared
        value is not kept that way: a sync from your CRM may fill it again.
        `null` or a blank string clears title, role, department, first_name and
        last_name; `name` cannot be cleared. A name part sent without `name`
        rebuilds the name from the parts sent and the stored ones (the middle
        name included); a `name` sent beside them is the name as sent. For a
        contact with only a full name stored, a lone part is a 422 (send `name`
        with it), as is clearing every part. Sending name, first_name or
        last_name for a portal user (a contact with a login) is a 422: their
        name lives on their login profile. `accounts` replaces the contact's
        accounts, the primary first (live account ids, each once); it cannot be
        emptied. Key-contact marks on accounts dropped from the list are
        removed; marks on accounts it keeps stay. As in the app, the accounts
        count as set by hand. `email` is set at create and cannot change: create
        a new contact for a new address. Every key is checked before anything is
        written, and any problem refuses the whole request with a 422 listing
        each one in `details`. Where your workspace pushes contacts to
        Salesforce, the next push sends the name, title and mapped custom
        fields; not role, department or accounts, and not a cleared value. A 500
        whose `details` list fields as `written` means those standard fields
        were written and the custom values were not; it says whether to send
        them again or what refused them.
      operationId: contacts_update
      parameters:
        - in: path
          name: contact_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: true
              properties:
                accounts:
                  default: null
                  description: >-
                    Replaces the contact's accounts: live account ids, the
                    primary first
                  items:
                    type: string
                  title: Accounts
                  type: array
                department:
                  default: null
                  description: >-
                    The contact's department (free text); null or blank clears
                    it
                  title: Department
                  type: string
                fields:
                  anyOf:
                    - additionalProperties: true
                      type: object
                    - type: 'null'
                  default: null
                  description: Custom field keys to values
                  title: Fields
                first_name:
                  default: null
                  description: >-
                    Sent without name, rebuilds the name from the parts; null or
                    blank clears it
                  title: First Name
                  type: string
                last_name:
                  default: null
                  description: >-
                    Sent without name, rebuilds the name from the parts; null or
                    blank clears it
                  title: Last Name
                  type: string
                name:
                  default: null
                  description: The contact's full name; cannot be cleared
                  title: Name
                  type: string
                role:
                  default: null
                  description: >-
                    The contact's buying role, such as Economic Buyer (free
                    text); null or blank clears it
                  title: Role
                  type: string
                title:
                  default: null
                  description: The contact's job title; null or blank clears it
                  title: Title
                  type: string
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    Contact:
      properties:
        account:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The id of the contact's primary account; null when it has none (it
            may still be on accounts)
          title: Account
        accounts:
          description: The ids of every account the contact is on, the primary first
          items:
            type: string
          title: Accounts
          type: array
        crm_contact_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The contact's id in your CRM
          title: Crm Contact Id
        department:
          anyOf:
            - type: string
            - type: 'null'
          title: Department
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        engagements:
          default: 0
          description: Engagements in the last 90 days
          title: Engagements
          type: integer
        fields:
          additionalProperties: true
          title: Fields
          type: object
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        id:
          title: Id
          type: string
        is_key_contact:
          default: false
          title: Is Key Contact
          type: boolean
        last_engagement_date:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            YYYY-MM-DD (UTC) of the latest engagement, at any time; null when
            none
          title: Last Engagement Date
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        origin:
          anyOf:
            - enum:
                - crm
                - statisfy
              type: string
            - type: 'null'
          description: Where the contact first came from; null when not recorded
          title: Origin
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        sentiment:
          anyOf:
            - enum:
                - negative
                - neutral
                - positive
              type: string
            - type: 'null'
          description: null when none is recorded
          title: Sentiment
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - id
      title: Contact
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.