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

# Add a passive call's notes to a ticket

> Writes the note of a call Neo placed on no ticket on the ticket named by `ticket_number`: the same note, with the summary and transcript, Neo writes when it finds the ticket itself. The call must have `status` `UNMATCHED`, or `STORED` (the number's ticket notes are off; the call is still written when asked), a summary, and no ticket. The note's visibility follows the number's setting. When the number saves recordings, Neo attaches the recording of a `TWILIO_CARRIED` call to the ticket a little later. Returns the call, now `NOTED` with `ticket_match_method` `ADDED_BY_HAND`. The note is written once per call: 409 `passive_call_already_noted` when the call has its note or a ticket already, 409 `passive_call_has_no_notes` for a call with any other status or no summary, 404 `ticket_not_found` when the PSA has no such ticket, 404 `passive_call_not_found` for an id that is not one of the tenant's calls, and 400 or 422 for a missing or empty `ticket_number`.



## OpenAPI

````yaml https://api.neoagent.io/public-api/openapi.json post /public-api/phone/passive-calls/{call_id}/ticket
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: >-
      Every tool call the tenant's agents made in the last 30 days, within the
      caller's workflow access.
    name: Audit Log
  - 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 or Slack).
    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/phone/passive-calls/{call_id}/ticket:
    post:
      tags:
        - Phone Agent
      summary: Add a passive call's notes to a ticket
      description: >-
        Writes the note of a call Neo placed on no ticket on the ticket named by
        `ticket_number`: the same note, with the summary and transcript, Neo
        writes when it finds the ticket itself. The call must have `status`
        `UNMATCHED`, or `STORED` (the number's ticket notes are off; the call is
        still written when asked), a summary, and no ticket. The note's
        visibility follows the number's setting. When the number saves
        recordings, Neo attaches the recording of a `TWILIO_CARRIED` call to the
        ticket a little later. Returns the call, now `NOTED` with
        `ticket_match_method` `ADDED_BY_HAND`. The note is written once per
        call: 409 `passive_call_already_noted` when the call has its note or a
        ticket already, 409 `passive_call_has_no_notes` for a call with any
        other status or no summary, 404 `ticket_not_found` when the PSA has no
        such ticket, 404 `passive_call_not_found` for an id that is not one of
        the tenant's calls, and 400 or 422 for a missing or empty
        `ticket_number`.
      operationId: public_api.phone_passive_call_ticket_post
      parameters:
        - in: path
          name: call_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicPassiveCallTicketRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/PublicPassiveCall'
                  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:
    PublicPassiveCallTicketRequest:
      description: The ticket to put a passive call's notes on.
      properties:
        ticket_number:
          description: >-
            The ticket number as the PSA shows it, for example a
            `spoken_ticket_numbers` entry.
          title: Ticket Number
          type: string
      required:
        - ticket_number
      title: PublicPassiveCallTicketRequest
      type: object
    PublicPassiveCall:
      description: >-
        Public projection of a `passive_calls` row: a call routed to the MSP's
        help desk while Neo

        takes notes, answered or not. No recording URL or binary content, as for
        `PublicPhoneCall`.
      properties:
        billable_minutes:
          description: >-
            The call's minutes, rounded up. No credit is charged for passive
            calls today.
          title: Billable Minutes
          type: integer
        call_outcome:
          description: Whether the caller and the help desk were connected.
          enum:
            - ANSWERED
            - NO_ANSWER
            - BUSY
            - FAILED
            - CANCELED
          title: Call Outcome
          type: string
        caller_number:
          anyOf:
            - type: string
            - type: 'null'
          description: The caller ID, in E.164, when the caller sent one.
          title: Caller Number
        duration_seconds:
          title: Duration Seconds
          type: number
        ended_at:
          format: date-time
          title: Ended At
          type: string
        help_desk_number:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The help desk number Neo forwarded a `TWILIO_CARRIED` call to, as it
            was set when the call ended; null for the other sources.
          title: Help Desk Number
        id:
          title: Id
          type: integer
        msp_number:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The MSP-side number of the call: the Neo number for
            `TWILIO_CARRIED`, the dialled number for an inbound call, the
            outgoing line for an outbound call; null when Neo does not have it.
          title: Msp Number
        sentiment:
          anyOf:
            - $ref: '#/components/schemas/Sentiment'
            - type: 'null'
          description: >-
            How the end user experienced the call with the help desk: `POSITIVE`
            (satisfied), `NEUTRAL`, or `NEGATIVE` (frustrated or upset by the
            end of the call). `sentiment` in `GET /phone/calls` uses the same
            values but rates how the phone agent handled its call. Null for a
            call with no summary, and for a call summarized before Neo recorded
            sentiment.
        source:
          description: >-
            Where the call came from: `TWILIO_CARRIED` for a Neo number in
            `PASSIVE` mode, `ONESTREAM` or `THREECX` for the MSP's phone system.
          enum:
            - TWILIO_CARRIED
            - ONESTREAM
            - THREECX
          title: Source
          type: string
        spoken_ticket_numbers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            The ticket numbers said in the call, as Neo heard them, whether or
            not the PSA has them; [] when none was said, null for a call with no
            summary.
          title: Spoken Ticket Numbers
        started_at:
          description: >-
            When the help desk answered, or when the ringing began for a call
            that never connected.
          format: date-time
          title: Started At
          type: string
        status:
          description: >-
            What Neo did: `NOTED` (transcript and summary on the ticket),
            `UNMATCHED` (no matching ticket was found or created, so nothing was
            written to the PSA), `STORED` (ticket notes are off), `EMPTY` (no
            speech), `NOT_CONNECTED`, `RECORDING_MISSING`, `FAILED`, or
            `RECEIVED` while Neo is still working on the call.
          enum:
            - RECEIVED
            - NOTED
            - UNMATCHED
            - EMPTY
            - STORED
            - NOT_CONNECTED
            - RECORDING_MISSING
            - FAILED
          title: Status
          type: string
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        ticket_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The PSA ticket Neo picked or created for the call, or null. The
            notes are on it only when `status` is `NOTED`.
          title: Ticket Id
        ticket_match_method:
          anyOf:
            - enum:
                - SPOKEN_TICKET_NUMBER
                - CALLER_CONTACT
                - TECHNICIAN
                - CREATED
                - ADDED_BY_HAND
              type: string
            - type: 'null'
          description: >-
            How Neo found the ticket: a ticket number said in the call, the
            caller's open ticket, the technician's ticket, a new ticket it
            created, or `ADDED_BY_HAND` when a person gave the ticket number
            afterwards.
          title: Ticket Match Method
        ticket_reference:
          anyOf:
            - type: string
            - type: 'null'
          description: The ticket number as the PSA shows it, when Neo has it.
          title: Ticket Reference
        ticket_url:
          anyOf:
            - type: string
            - type: 'null'
          description: The PSA link to the ticket, when Neo has one.
          title: Ticket Url
        transcript:
          anyOf:
            - type: string
            - type: 'null'
          title: Transcript
      required:
        - id
        - source
        - msp_number
        - help_desk_number
        - caller_number
        - started_at
        - ended_at
        - duration_seconds
        - billable_minutes
        - call_outcome
        - status
        - ticket_id
        - ticket_reference
        - ticket_url
        - ticket_match_method
        - summary
        - transcript
        - sentiment
        - spoken_ticket_numbers
      title: PublicPassiveCall
      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
    Sentiment:
      enum:
        - POSITIVE
        - NEGATIVE
        - NEUTRAL
      title: Sentiment
      type: string
    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

````

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