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

# Rerun Voice Agent Session Analysis

> Run a session's post-call analysis again when the first run did not give you a usable result

There is no request body. You can rerun an analysis that:

* ended in `error` or `skipped`,
* finished on a transcript that was still incomplete, or
* is stuck: `queued` for more than 5 minutes, or `running` for more than 15 minutes.

Any other analysis, including one that completed on a full transcript, returns `409`. A session whose content has been deleted under the data retention policy returns `410`. A session with no analysis record returns `404`.

The rerun uses the analysis settings pinned when the session started, so changing the agent's analysis settings afterwards doesn't change what it produces.

The call returns `201` with the analysis as it stands after it was queued: `status` is usually `queued` and the results are empty. The run finishes in the background, so poll [Get Voice Agent Session](https://docs.fish.audio/api-reference/endpoint/agent/get-agent-session.md) and read its `analysis` for the outcome. When the rerun finishes, Fish sends the `call.analyzed` webhook again; see [Webhooks](https://docs.fish.audio/agents/monitor/webhooks.md).

Each team can make 30 calls per minute to this endpoint. The 31st call within the same minute returns `429`, and the count starts again in the next minute.

For what the analysis contains, see [Post-call analysis](https://docs.fish.audio/agents/monitor/post-call-analysis.md).


## OpenAPI

````yaml post /v1/agent/sessions/{session_id}/analysis/rerun
openapi: 3.1.0
info:
  title: FishAudio OpenAPI
  version: '1'
servers:
  - description: Fish Audio API
    url: https://api.fish.audio
security: []
tags: []
paths:
  /v1/agent/sessions/{session_id}/analysis/rerun:
    post:
      tags:
        - Agent Sessions
      summary: Rerun Session Analysis
      description: >-
        Run the session's post-call analysis again when the first run did not
        give

        you a usable result. There is no request body.


        Only an analysis that ended in `error` or `skipped`, one that finished
        on a

        transcript that was still incomplete, or one that is stuck can be rerun.
        An

        analysis is stuck when it has been `queued` for more than 5 minutes, or

        `running` for more than 15 minutes (its processing lease has expired).
        Any

        other analysis returns 409. A session whose content has been deleted
        under the data

        retention policy returns 410. A session with no analysis record returns

        404 with `Analysis not found`.


        The rerun uses the analysis settings that were pinned when the session

        started, so changing the agent's analysis settings afterwards does not

        change what a rerun produces. An analysis that completed on a full

        transcript is rejected with 409.


        The call returns 201 with the analysis as it stands right after it was

        queued: `status` is usually `queued` and the results are empty. The run

        finishes in the background, so poll `GET
        /v1/agent/sessions/{session_id}`

        and read its `analysis` for the outcome. A finished rerun sends the

        `call.analyzed` webhook again.


        Each team can make 30 of these calls per minute; the 31st within the
        same

        minute returns 429 and the count starts again the next minute.
      parameters:
        - in: path
          name: session_id
          description: ''
          required: true
          schema:
            title: Session Id
            type: string
          deprecated: false
      responses:
        '201':
          description: >-
            The rerun was queued. The body is the session's analysis as it
            stands right now: `status` is usually `queued` and the results are
            empty. Poll `GET /v1/agent/sessions/{session_id}` and read its
            `analysis` for the outcome.
          content:
            application/json:
              schema:
                description: The post-call analysis of the session.
                properties:
                  status:
                    enum:
                      - queued
                      - running
                      - completed
                      - skipped
                      - error
                    title: Status
                    type: string
                  summary:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Summary
                  data:
                    items:
                      $ref: '#/components/schemas/AgentSessionAnalysisDataValue'
                    title: Data
                    type: array
                  criteria_results:
                    items:
                      $ref: '#/components/schemas/AgentSessionAnalysisCriterionResult'
                    title: Criteria Results
                    type: array
                  error:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    description: >-
                      error: why the analysis failed. Null for every other
                      status.
                    title: Error
                  transcript_incomplete:
                    default: false
                    description: >-
                      True when the transcript still looked cut short after the
                      analysis waited for it, so the summary, data and criteria
                      may rest on an incomplete conversation. Can be true for
                      completed and skipped.
                    title: Transcript Incomplete
                    type: boolean
                  finished_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    description: >-
                      When the analysis finished, as an RFC 3339 timestamp in
                      UTC, for example `2026-07-20T06:05:07.250000Z`. Null while
                      it has not finished.
                    title: Finished At
                required:
                  - status
                type: object
        '401':
          description: No permission -- see authorization schemes
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '404':
          description: Nothing matches the given URI
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '409':
          description: Request conflict
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '410':
          description: URI no longer exists and has been permanently removed
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '429':
          description: >-
            The user has sent too many requests in a given amount of time ("rate
            limiting")
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '503':
          description: The server cannot process the request due to a high load
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: bash
          label: Rerun Session Analysis
          source: |-
            curl --request POST \
              --url https://api.fish.audio/v1/agent/sessions/<session-id>/analysis/rerun \
              --header 'Authorization: Bearer <token>'
components:
  schemas:
    AgentSessionAnalysisDataValue:
      properties:
        name:
          title: Name
          type: string
        type:
          enum:
            - boolean
            - text
            - number
            - enum
          title: Type
          type: string
        value:
          anyOf:
            - type: boolean
            - type: number
            - type: string
            - type: 'null'
          default: null
          title: Value
        rationale:
          default: ''
          title: Rationale
          type: string
      required:
        - name
        - type
      title: AgentSessionAnalysisDataValue
      type: object
    AgentSessionAnalysisCriterionResult:
      properties:
        name:
          title: Name
          type: string
        result:
          enum:
            - success
            - failure
            - unknown
          title: Result
          type: string
        rationale:
          default: ''
          title: Rationale
          type: string
      required:
        - name
        - result
      title: AgentSessionAnalysisCriterionResult
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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