> ## 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.

# Override an AI field on a contact

> Sets one AI field on a contact with your value and a reason, and holds it from the AI, as editing the field in the app does (the ordinary update refuses AI fields). The AI leaves the value alone for `lock_days`, or until `locked_until`: left out, your workspace's default on a field the AI has written, and no hold on one it has not. Send `base_value`, the value you read: when the field has moved since (the AI or someone else wrote it), nothing is saved and the 409 says what it is now, who changed it and when. The reason is required unless the field asks for none, and the AI reads it before its next pass. Sending the same value again keeps it and restarts the hold. Renewal Size follows the expected amount, so it is refused (a 422). An unknown field, or one that is not an AI field, is a 404. The edit is recorded as the person the key acts for, as in the app, so a workspace key or a digital worker cannot make it (a 403); a Member edits only the records in their book.



## OpenAPI

````yaml /api/statisfy-api.openapi.json put /v1/objects/contact/records/{contact_id}/ai-fields/{field_key}
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}/ai-fields/{field_key}:
    put:
      tags:
        - contacts
      summary: Override an AI field on a contact
      description: >-
        Sets one AI field on a contact with your value and a reason, and holds
        it from the AI, as editing the field in the app does (the ordinary
        update refuses AI fields). The AI leaves the value alone for
        `lock_days`, or until `locked_until`: left out, your workspace's default
        on a field the AI has written, and no hold on one it has not. Send
        `base_value`, the value you read: when the field has moved since (the AI
        or someone else wrote it), nothing is saved and the 409 says what it is
        now, who changed it and when. The reason is required unless the field
        asks for none, and the AI reads it before its next pass. Sending the
        same value again keeps it and restarts the hold. Renewal Size follows
        the expected amount, so it is refused (a 422). An unknown field, or one
        that is not an AI field, is a 404. The edit is recorded as the person
        the key acts for, as in the app, so a workspace key or a digital worker
        cannot make it (a 403); a Member edits only the records in their book.
      operationId: contacts_override_ai_field
      parameters:
        - description: >-
            The AI field's key, as `GET /v1/fields` lists it. An account's
            `type` the AI manages is one too
          in: path
          name: field_key
          required: true
          schema:
            examples:
              - renewal_forecast
            maxLength: 255
            minLength: 1
            type: string
        - description: The contact's Statisfy id
          in: path
          name: contact_id
          required: true
          schema:
            maxLength: 255
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                base_value:
                  default: null
                  description: >-
                    The value you read before this edit (the record's `fields`,
                    or the newest history row). It is always compared: when the
                    field has moved since, nothing is saved and the 409 says
                    what it is now. Left out means you read it empty
                  title: Base Value
                lock_days:
                  anyOf:
                    - maximum: 365
                      minimum: 0
                      type: integer
                    - type: 'null'
                  default: null
                  description: >-
                    How many days the AI leaves your value alone. 0 saves it and
                    lets the AI update it on its next run. Left out, with no
                    `locked_until`: your workspace's default when the AI has
                    written the field, no hold on a field it has not
                  title: Lock Days
                locked_until:
                  anyOf:
                    - format: date-time
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    Instead of `lock_days`: when the hold ends, with a timezone
                    offset, at most a year ahead
                  title: Locked Until
                reason:
                  anyOf:
                    - maxLength: 5000
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    Why you are changing it. Required unless the field asks for
                    none; the AI reads it before its next pass
                  title: Reason
                value:
                  default: null
                  description: >-
                    The new value, in the field's own type (a number, text, a
                    date, a picklist option, a list for a multi-select).
                    Required: send null to clear the field, which is an edit too
                  title: Value
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiFieldWrite'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    AiFieldWrite:
      properties:
        changed:
          description: >-
            Whether the value moved; false when you saved the value it already
            had
          title: Changed
          type: boolean
        field_key:
          title: Field Key
          type: string
        locked_until:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the AI may update the field again; null when it is not held
          title: Locked Until
      required:
        - field_key
        - changed
      title: AiFieldWrite
      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.