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

# Analyze Ticket Autonomy

> Analyze one closed ticket again, for instance after it was reopened or the agent changed.

Each call is one request to the workspace's default model, answered once the analysis is done. A ticket that
cannot be analyzed is refused with 422 and why: `not_closed`, `no_conversation`, `simulation` or `no_agent_reply`.



## OpenAPI

````yaml /openapi-v1.json post /api/v1/autonomy-gaps/tickets/{ticket_id}/analyze
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/autonomy-gaps/tickets/{ticket_id}/analyze:
    post:
      tags:
        - Autonomy Gaps
      summary: Analyze Ticket Autonomy
      description: >-
        Analyze one closed ticket again, for instance after it was reopened or
        the agent changed.


        Each call is one request to the workspace's default model, answered once
        the analysis is done. A ticket that

        cannot be analyzed is refused with 422 and why: `not_closed`,
        `no_conversation`, `simulation` or `no_agent_reply`.
      operationId: analyze_ticket_autonomy
      parameters:
        - in: path
          name: ticket_id
          schema:
            format: uuid
            title: Ticket Id
            type: string
          required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketAutonomyAnalysisResponseSchema'
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    TicketAutonomyAnalysisResponseSchema:
      properties:
        analysis:
          anyOf:
            - $ref: '#/components/schemas/TicketAutonomyAnalysisSchema'
            - type: 'null'
        closed:
          title: Closed
          type: boolean
      required:
        - analysis
        - closed
      title: TicketAutonomyAnalysisResponseSchema
      type: object
    TicketAutonomyAnalysisSchema:
      properties:
        ticket_id:
          format: uuid
          title: Ticket Id
          type: string
        category:
          title: Category
          type: string
        customer_request:
          title: Customer Request
          type: string
        resolution:
          title: Resolution
          type: string
        explanation:
          title: Explanation
          type: string
        missing:
          title: Missing
          type: string
        evidence:
          title: Evidence
          type: string
        confidence:
          title: Confidence
          type: number
        used_support_replies:
          title: Used Support Replies
          type: boolean
        analyzed_at:
          format: date-time
          title: Analyzed At
          type: string
        gap:
          anyOf:
            - $ref: '#/components/schemas/TicketAutonomyGapSchema'
            - type: 'null'
        knowledge_update_request_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Knowledge Update Request Id
      required:
        - ticket_id
        - category
        - customer_request
        - resolution
        - explanation
        - missing
        - evidence
        - confidence
        - used_support_replies
        - analyzed_at
        - gap
        - knowledge_update_request_id
      title: TicketAutonomyAnalysisSchema
      type: object
    TicketAutonomyGapSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        title:
          title: Title
          type: string
        recommendation:
          title: Recommendation
          type: string
        status:
          title: Status
          type: string
        ticket_count:
          title: Ticket Count
          type: integer
      required:
        - id
        - title
        - recommendation
        - status
        - ticket_count
      title: TicketAutonomyGapSchema
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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