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

# Get the field-update audit for an execution

> Per-field AI decision audit — one row per PSA field a CHAINED_ACTIONS smart action predicted for this run (triage/categorize, dispatch, field updates, merge, QA, tagging, sentiment, …): chosen value, justification, the raw LLM `system_prompt` / `user_prompt` / `gpt_response`, and the candidate `options_to_choose_from`. An AGENTIC agent's field writes appear here only as a stub (prompts `"N/A"`, no options) — its reasoning is in the step trace.



## OpenAPI

````yaml https://api.neoagent.io/public-api/openapi.json get /public-api/executions/{execution_id}/field-update-audit
openapi: 3.1.0
info:
  description: >-
    Neo's public contract for the dashboard ChatAgent, partner integrations, and
    MSP automation. Every response is wrapped in a `{data, meta}` envelope;
    errors use `{error: {code, message, details?}, meta: {request_id}}`.
    Authenticate with a `Bearer neo_sk_<env>_<secret>` API key (service account)
    or a Microsoft Entra ID JWT (dashboard user). Signed-URL endpoints (end-user
    feedback links) take a `signature` query parameter instead.
  title: Neo Public API
  version: 1.0.0
servers:
  - url: https://api.neoagent.io
security: []
tags:
  - description: Service metadata — health, OpenAPI.
    name: Meta
  - description: Agents and workflows — read, version history, delete, stats.
    name: Agents
  - description: Agent/workflow execution history, sub-resources, retry/cancel.
    name: Executions
  - description: PSA webhook events and their workflow-match results.
    name: Callbacks
  - description: Technician-in-the-loop approval requests.
    name: TIL requests
  - description: RMM script executions triggered by agents.
    name: RMM scripts
  - description: Dispatch-agent field-update decisions.
    name: Dispatch
  - description: The authenticated tenant.
    name: Tenant
  - description: Agent-builder schema catalogs (raw JSON payloads).
    name: Schemas
  - description: Escalate to the Neo team (HubSpot ticket).
    name: Escalation
  - description: Tenant settings.
    name: Settings
  - description: Tenant API-key management (dashboard JWT only).
    name: API keys
  - description: End-user feedback links (signed-URL auth).
    name: Feedback
  - description: End-client companies (CRUD + bulk-update).
    name: End companies
  - description: Channels — bind a CONVERSATIONAL agent to a transport (Teams).
    name: Channels
  - description: PSA/RMM/M365 integration status and connection management.
    name: Integrations
  - description: Technician roster (controls TIL routing and paging).
    name: Technicians
  - description: Future runs queued for TRIGGERED agents.
    name: Scheduled work
  - description: Subscription state and customer-facing credit usage (no provider $).
    name: Billing
  - description: Inbox messages and announcements.
    name: Inbox & Comms
  - description: Tenant-authored agent skills (CRUD) and the built-in skill catalog.
    name: Skills
paths:
  /public-api/executions/{execution_id}/field-update-audit:
    get:
      tags:
        - Executions
      summary: Get the field-update audit for an execution
      description: >-
        Per-field AI decision audit — one row per PSA field a CHAINED_ACTIONS
        smart action predicted for this run (triage/categorize, dispatch, field
        updates, merge, QA, tagging, sentiment, …): chosen value, justification,
        the raw LLM `system_prompt` / `user_prompt` / `gpt_response`, and the
        candidate `options_to_choose_from`. An AGENTIC agent's field writes
        appear here only as a stub (prompts `"N/A"`, no options) — its reasoning
        is in the step trace.
      operationId: public_api.executions_field_update_audit_get
      parameters:
        - in: path
          name: execution_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/FieldUpdateAuditEntry'
                    type: array
                  meta:
                    $ref: '#/components/schemas/SuccessMeta'
                required:
                  - data
                  - meta
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad request — malformed input.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthenticated — missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden — authenticated but not allowed.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Not found.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Conflict — the resource is in a state that blocks this operation.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Request validation failed.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Rate limited — see Retry-After.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Internal server error.
      security:
        - bearerAuth: []
components:
  schemas:
    FieldUpdateAuditEntry:
      properties:
        agent_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Agent Id
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
        ai_justification:
          anyOf:
            - type: string
            - type: 'null'
          title: Ai Justification
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Created At
        current_value:
          anyOf:
            - type: string
            - type: number
            - type: 'null'
          title: Current Value
        custom_field_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Custom Field Name
        entity_id:
          title: Entity Id
          type: string
        entity_type:
          $ref: '#/components/schemas/EntityType'
        field_name:
          $ref: '#/components/schemas/FieldNameType'
        gpt_response:
          title: Gpt Response
          type: string
        is_custom_field:
          title: Is Custom Field
          type: boolean
        options_to_choose_from:
          anyOf:
            - items:
                $ref: '#/components/schemas/FieldDecisionOption'
              type: array
            - type: 'null'
          title: Options To Choose From
        predicted_value:
          anyOf:
            - type: string
            - type: number
            - type: 'null'
          title: Predicted Value
        predicted_value_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Predicted Value Id
        should_update_field:
          title: Should Update Field
          type: boolean
        system_prompt:
          title: System Prompt
          type: string
        user_prompt:
          title: User Prompt
          type: string
      required:
        - entity_type
        - entity_id
        - field_name
        - is_custom_field
        - custom_field_name
        - current_value
        - predicted_value
        - predicted_value_id
        - ai_justification
        - should_update_field
        - agent_id
        - agent_name
        - created_at
        - system_prompt
        - user_prompt
        - gpt_response
        - options_to_choose_from
      title: FieldUpdateAuditEntry
      type: object
    SuccessMeta:
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        request_id:
          format: uuid
          type: string
        timings_ms:
          additionalProperties:
            type: number
          type: object
        warnings:
          description: >-
            Non-fatal warnings about the created/updated resource (e.g. an
            unhealthy PSA callback).
          items:
            type: string
          type: array
      required:
        - request_id
        - timings_ms
      type: object
    ErrorEnvelope:
      properties:
        error:
          properties:
            code:
              description: Stable machine-readable error code.
              type: string
            details:
              additionalProperties: true
              type: object
            message:
              type: string
          required:
            - code
            - message
          type: object
        meta:
          properties:
            request_id:
              format: uuid
              type:
                - string
                - 'null'
          type: object
      required:
        - error
        - meta
      type: object
    EntityType:
      enum:
        - ticket
        - project_ticket
        - task
        - scheduled_entry
        - time_entry
        - project
        - company
        - contact
        - resource
        - contract
        - opportunity
        - none
        - configuration
        - note
        - team
        - role
        - audit_trail
        - appointment
        - servicecall
        - contract_service
        - company_location
        - product
      title: EntityType
      type: string
    FieldNameType:
      description: >-
        Enum for the field names that can be used in the PSA systems.

        It's used to map the Enum -> PsaFieldName -> Supported PSAs -> Patch
        order


        Patch order is used to determine the order of the patches.

        Fields with the same patch order can be updated at the same time.

        We use the patch order to group fields by the order and then process
        (update) the groups in a sequential API requests.

        One example is CW_AGREEMENT that CANNOT be updated at same time of
        COMPANY.

        Therefore CW_AGREEMENT has patch_order=2 and COMPANY has patch_order=1
      enum:
        - - status
          - - CONNECTWISE
            - AUTOTASK
            - HALO
            - SERVICENOW
          - 1
          - - ticket
        - - priority
          - - CONNECTWISE
            - AUTOTASK
            - HALO
            - SERVICENOW
          - 1
          - - ticket
        - - company
          - - CONNECTWISE
            - AUTOTASK
            - HALO
            - SERVICENOW
          - 1
          - - ticket
        - - contact
          - - CONNECTWISE
            - AUTOTASK
            - HALO
            - SERVICENOW
          - 2
          - - ticket
        - - resource
          - - CONNECTWISE
            - AUTOTASK
            - HALO
            - SERVICENOW
          - 1
          - - ticket
        - - source
          - - CONNECTWISE
            - AUTOTASK
            - HALO
          - 1
          - - ticket
        - - auditTrailContains
          - - CONNECTWISE
            - AUTOTASK
            - SERVICENOW
          - 1
          - - audit_trail
        - - summary
          - - CONNECTWISE
          - 1
          - - ticket
          - true
        - - board
          - - CONNECTWISE
          - 1
          - - ticket
        - - agreement
          - - CONNECTWISE
          - 2
          - - ticket
        - - type
          - - CONNECTWISE
          - 1
          - - ticket
        - - types
          - - CONNECTWISE
          - 1
          - - contact
        - - subtype
          - - CONNECTWISE
          - 1
          - - ticket
        - - item
          - - CONNECTWISE
          - 1
          - - ticket
        - - budgetHours
          - - CONNECTWISE
          - 1
          - - ticket
        - - contactEmailAddress
          - - CONNECTWISE
          - 2
          - - ticket
        - - site
          - - CONNECTWISE
          - 1
          - - ticket
            - contact
        - - configuration
          - - CONNECTWISE
          - 1
          - - ticket
        - - company_territory
          - - CONNECTWISE
          - 1
          - - ticket
        - - location
          - - CONNECTWISE
          - 1
          - - ticket
        - - department
          - - CONNECTWISE
          - 1
          - - ticket
        - - team
          - - CONNECTWISE
          - 1
          - - ticket
        - - resources
          - - CONNECTWISE
          - 1
          - - ticket
        - - requiredDate
          - - CONNECTWISE
          - 1
          - - ticket
        - - automaticEmailCc
          - - CONNECTWISE
          - 1
          - - ticket
        - - customerUpdatedFlag
          - - CONNECTWISE
          - 1
          - - ticket
          - true
        - - billableOption
          - - CONNECTWISE
          - 1
          - - time_entry
        - - scheduledEntryType
          - - CONNECTWISE
          - 1
          - - scheduled_entry
        - - scheduledEntryStatus
          - - CONNECTWISE
          - 1
          - - scheduled_entry
        - - serviceLocation
          - - CONNECTWISE
          - 1
          - - scheduled_entry
        - - title
          - - AUTOTASK
          - 1
          - - ticket
          - true
        - - description
          - - AUTOTASK
          - 1
          - - ticket
        - - queue
          - - AUTOTASK
          - 1
          - - ticket
        - - ticketType
          - - AUTOTASK
          - 1
          - - ticket
        - - ticketCategory
          - - AUTOTASK
          - 1
          - - ticket
        - - issueType
          - - AUTOTASK
          - 1
          - - ticket
        - - subIssueType
          - - AUTOTASK
          - 1
          - - ticket
        - - estimatedHours
          - - AUTOTASK
          - 1
          - - ticket
        - - lineOfBusiness
          - - AUTOTASK
          - 1
          - - ticket
        - - completedByResourceID
          - - AUTOTASK
          - 1
          - - ticket
        - - createdByContactID
          - - AUTOTASK
          - 1
          - - ticket
        - - creatorResourceID
          - - AUTOTASK
          - 1
          - - ticket
        - - configurationItemID
          - - AUTOTASK
          - 1
          - - ticket
        - - resolution
          - - AUTOTASK
          - 1
          - - ticket
          - true
        - - assignedResourceRoleID
          - - AUTOTASK
          - 1
          - - ticket
        - - contract
          - - AUTOTASK
          - 1
          - - ticket
        - - TicketAdditionalContacts
          - - AUTOTASK
          - 1
          - - ticket
        - - dueDateTime
          - - AUTOTASK
          - 1
          - - ticket
          - true
        - - tag
          - - AUTOTASK
          - 1
          - - ticket
        - - companyLocationID
          - - AUTOTASK
          - 1
          - - contact
        - - secondaryResources
          - - AUTOTASK
          - 1
          - - ticket
        - - opportunityID
          - - AUTOTASK
          - 1
          - - ticket
        - - billingCode
          - - AUTOTASK
          - 1
          - - ticket
            - time_entry
        - - workType
          - - CONNECTWISE
          - 1
          - - ticket
            - time_entry
        - - isNonBillable
          - - AUTOTASK
          - 1
          - - time_entry
        - - resourceID
          - - AUTOTASK
          - 1
          - - time_entry
        - - hoursToBill
          - - AUTOTASK
          - 1
          - - time_entry
        - - summaryNotes
          - - AUTOTASK
          - 1
          - - time_entry
        - - offsetHours
          - - AUTOTASK
          - 1
          - - time_entry
        - - publish
          - - AUTOTASK
          - 1
          - - note
        - - noteType
          - - AUTOTASK
          - 1
          - - note
        - - Ticket Type
          - - HALO
          - 1
          - - ticket
        - - Halo Team
          - - HALO
          - 1
          - - ticket
        - - Category 1
          - - HALO
          - 1
          - - ticket
        - - Category 2
          - - HALO
          - 1
          - - ticket
        - - Category 3
          - - HALO
          - 1
          - - ticket
        - - Category 4
          - - HALO
          - 1
          - - ticket
        - - Impact
          - - HALO
          - 1
          - - ticket
        - - Urgency
          - - HALO
          - 1
          - - ticket
        - - Subject
          - - HALO
          - 1
          - - ticket
          - true
        - - asset_id
          - - HALO
          - 1
          - - ticket
        - - sla_id
          - - HALO
          - 1
          - - ticket
        - - outcome_id
          - - HALO
          - 1
          - - note
        - - Email CC List
          - - HALO
          - 1
          - - ticket
          - true
        - - Estimated Time
          - - HALO
          - 1
          - - ticket
          - true
        - - billable
          - - HALO
          - 1
          - - time_entry
        - - short_description
          - - SERVICENOW
          - 1
          - - ticket
          - true
        - - description
          - - SERVICENOW
          - 1
          - - ticket
          - true
        - - urgency
          - - SERVICENOW
          - 1
          - - ticket
        - - impact
          - - SERVICENOW
          - 1
          - - ticket
        - - assignment_group
          - - SERVICENOW
          - 1
          - - ticket
        - - category
          - - SERVICENOW
          - 1
          - - ticket
        - - subcategory
          - - SERVICENOW
          - 1
          - - ticket
        - - cmdb_ci
          - - SERVICENOW
          - 1
          - - ticket
        - - close_code
          - - SERVICENOW
          - 1
          - - ticket
        - - close_notes
          - - SERVICENOW
          - 1
          - - ticket
          - true
        - - ticket_type
          - - SERVICENOW
          - 1
          - - ticket
          - true
        - - comments
          - - SERVICENOW
          - 1
          - - time_entry
          - true
        - - time_in_seconds
          - - SERVICENOW
          - 1
          - - time_entry
          - true
        - - u_is_billable
          - - SERVICENOW
          - 1
          - - time_entry
        - - category
          - - SERVICENOW
          - 1
          - - time_entry
        - - customFields
          - - CONNECTWISE
            - AUTOTASK
            - HALO
          - 1
          - - ticket
      title: FieldNameType
      type: array
    FieldDecisionOption:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
      required:
        - id
        - name
        - description
      title: FieldDecisionOption
      type: object
    Pagination:
      properties:
        has_more:
          type: boolean
        next_cursor:
          type:
            - string
            - 'null'
      required:
        - next_cursor
        - has_more
      type: object
  securitySchemes:
    bearerAuth:
      description: >-
        `Authorization: Bearer <token>` where `<token>` is either a
        `neo_sk_<env>_<secret>` API key (service account) or a Microsoft Entra
        ID access token (dashboard user).
      scheme: bearer
      type: http

````