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

# List callbacks

> PSA callbacks (webhook events) received for the caller's tenant. Requires an indexed filter — `entity_type`+`entity_id`, `entity_number`, or `since` (≤ 7 days). **Default `page_size` is 20 here** (lower than the public-API global of 50): each row carries the per-workflow `workflow_matches` audit, so 50-row responses can exceed the chat-agent context budget.



## OpenAPI

````yaml https://api.neoagent.io/public-api/openapi.json get /public-api/callbacks
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/callbacks:
    get:
      tags:
        - Callbacks
      summary: List callbacks
      description: >-
        PSA callbacks (webhook events) received for the caller's tenant.
        Requires an indexed filter — `entity_type`+`entity_id`, `entity_number`,
        or `since` (≤ 7 days). **Default `page_size` is 20 here** (lower than
        the public-API global of 50): each row carries the per-workflow
        `workflow_matches` audit, so 50-row responses can exceed the chat-agent
        context budget.
      operationId: public_api.callbacks_list_get
      parameters:
        - description: PSA entity type (e.g. TICKET).
          in: query
          name: entity_type
          required: false
          schema:
            type: string
        - description: PSA entity id.
          in: query
          name: entity_id
          required: false
          schema:
            type: string
        - description: PSA entity number (e.g. ticket number).
          in: query
          name: entity_number
          required: false
          schema:
            type: string
        - description: ISO-8601 lower bound on receipt time (≤ 7 days ago).
          in: query
          name: since
          required: false
          schema:
            type: string
        - description: ISO-8601 upper bound on receipt time.
          in: query
          name: until
          required: false
          schema:
            type: string
        - description: Comma-separated change types to include.
          in: query
          name: change_type
          required: false
          schema:
            type: string
        - description: Only callbacks that matched (or failed to match) this agent.
          in: query
          name: agent_id
          required: false
          schema:
            type: integer
        - description: If true, only callbacks that were filtered out.
          in: query
          name: filtered_only
          required: false
          schema:
            type: boolean
        - description: Items per page (1-200, default 50).
          in: query
          name: page_size
          required: false
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/Callback'
                    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:
    Callback:
      properties:
        callback_id:
          title: Callback Id
          type: string
        change_type:
          $ref: '#/components/schemas/EventType'
        created_in_psa_at:
          format: date-time
          title: Created In Psa At
          type: string
        entity_id:
          title: Entity Id
          type: string
        entity_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Number
        entity_type:
          $ref: '#/components/schemas/EntityType'
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        failed_to_match_workflow_ids:
          items:
            type: integer
          title: Failed To Match Workflow Ids
          type: array
        finished_processing_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Finished Processing At
        matcher_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Matcher Run Id
        started_workflow_ids:
          items:
            type: integer
          title: Started Workflow Ids
          type: array
        state:
          $ref: '#/components/schemas/EventState'
        workflow_matches:
          anyOf:
            - items:
                $ref: '#/components/schemas/CallbackWorkflowMatch'
              type: array
            - type: 'null'
          title: Workflow Matches
      required:
        - callback_id
        - state
        - entity_type
        - change_type
        - entity_id
        - entity_number
        - created_in_psa_at
        - finished_processing_at
        - matcher_run_id
        - started_workflow_ids
        - failed_to_match_workflow_ids
        - error_message
        - workflow_matches
      title: Callback
      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
    EventType:
      description: >-
        Something that happened in the PSA or NeoAgent.


        Each member also carries `agent_trigger_description`: a one-line
        sentence rendered

        into the agent's EXECUTION_CONTEXT prompt under "Triggered by:" so the
        agent can

        branch its behaviour on the specific signal. Keep these phrased from the
        AGENT's

        perspective ("the customer replied", not "CUSTOMER_REPLIED fired"). None
        means we

        don't render a line for this event type (the executed_by fallback
        handles it).
      enum:
        - - CREATE
          - PSA
          - PSA callback — the entity was created
        - - UPDATE
          - PSA
          - >-
            PSA callback — a ticket field was updated (inspect the audit trail
            for the specific field and values)
        - - DELETE
          - PSA
          - PSA callback — the entity was deleted
        - - ANY
          - PSA
          - null
        - - CUSTOMER_REPLIED
          - PSA
          - PSA callback — the customer replied on the ticket
        - - TECHNICIAN_REPLIED_TO_CUSTOMER
          - PSA
          - PSA callback — a technician replied to the customer
        - - TIME_ENTRY_CREATED
          - PSA
          - PSA callback — a time entry was created on the ticket
        - - LAST_ACTIVITY_DATE_CHANGED
          - PSA
          - PSA callback — the ticket's last-activity date changed
        - - NOTE_ADDED
          - PSA
          - PSA callback — a note was added to the ticket (non-Neo author)
        - - MANUAL_ONLY
          - NEO_AGENT
          - A human manually triggered this workflow
        - - WORKFLOW_FINISHED
          - NEO_AGENT
          - >-
            Another workflow finished and this workflow was configured to react
            to it
        - - WORKFLOW_TRIGGERED
          - NEO_AGENT
          - Another workflow triggered this run via the TRIGGER_WORKFLOW action
      title: EventType
      type: array
    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
    EventState:
      enum:
        - PENDING_PROCESSING
        - PROCESSING
        - PROCESSED
        - SKIPPED
        - FAILED
      title: EventState
      type: string
    CallbackWorkflowMatch:
      properties:
        error:
          title: Error
          type: boolean
        match_details:
          anyOf:
            - $ref: '#/components/schemas/CallbackMatchDetails'
            - type: 'null'
        match_reason:
          title: Match Reason
          type: string
        matched:
          title: Matched
          type: boolean
        workflow_id:
          title: Workflow Id
          type: integer
        workflow_name:
          title: Workflow Name
          type: string
      required:
        - workflow_id
        - workflow_name
        - matched
        - error
        - match_reason
        - match_details
      title: CallbackWorkflowMatch
      type: object
    Pagination:
      properties:
        has_more:
          type: boolean
        next_cursor:
          type:
            - string
            - 'null'
      required:
        - next_cursor
        - has_more
      type: object
    CallbackMatchDetails:
      description: >-
        Structured breakdown of why a workflow match did/didn't match — answers

        'which value satisfied (or didn't satisfy) which rule' without parsing
        `match_reason`.

        Present when the matcher recorded structured data; `None` for older
        callbacks or for

        matches that short-circuit before per-field comparison (e.g. wrong
        trigger type).
      properties:
        category:
          $ref: '#/components/schemas/MatchResultCategory'
        event_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Type
        field_comparisons:
          items:
            $ref: '#/components/schemas/CallbackFieldComparison'
          title: Field Comparisons
          type: array
      required:
        - category
        - event_type
        - field_comparisons
      title: CallbackMatchDetails
      type: object
    MatchResultCategory:
      description: >-
        Categories for workflow match results to provide user-friendly
        explanations.
      enum:
        - matched
        - wrong_trigger_type
        - already_ran_recently
        - run_once_limit
        - manual_only
        - entity_type_mismatch
        - empty_audit_trail
        - audit_trail_mismatch
        - ticket_filter_mismatch
        - missing_event_settings
        - error
      title: MatchResultCategory
      type: string
    CallbackFieldComparison:
      description: >-
        One rule-vs-entity comparison the matcher made when evaluating a
        workflow's filter.
      properties:
        field_name:
          title: Field Name
          type: string
        field_value:
          title: Field Value
        is_match:
          title: Is Match
          type: boolean
        operator:
          title: Operator
          type: string
        rule_value:
          title: Rule Value
      required:
        - field_name
        - field_value
        - rule_value
        - operator
        - is_match
      title: CallbackFieldComparison
      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

````