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

# Actualizar un ticket, título, severidad, resumen de IA o categoría



## OpenAPI

````yaml /openapi-v1.es.json patch /v1/tickets/{id}
openapi: 3.0.0
info:
  title: Woku Client API v1
  description: >-
    API REST pública para la administración programática de programas
    Voice-of-Customer de woku: trackers, instrumentos VoC (NPS, woku, CES,
    CSAT), planes de acción, tickets de soporte, envío multicanal y captura de
    respuestas. Las solicitudes están delimitadas por empresa mediante la clave
    API. Nunca envíe un id de empresa.
  version: 1.0.0
  contact:
    name: Woku
    url: https://woku.app
    email: team@woku.app
servers:
  - url: https://clientapi.woku.app
    description: Producción
security: []
tags: []
paths:
  /v1/tickets/{id}:
    patch:
      tags:
        - v1 - tickets
      summary: Actualizar un ticket, título, severidad, resumen de IA o categoría
      operationId: V1TicketsController_updateTicket
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
            format: ObjectId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTicketBodyDTO'
      responses:
        '200':
          description: Ticket actualizado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTicketDto'
        '400':
          description: Error de validación
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseDto'
        '401':
          description: Clave de API inválida o ausente
        '404':
          description: Ticket no encontrado
      security:
        - bearer: []
components:
  schemas:
    UpdateTicketBodyDTO:
      type: object
      properties:
        title:
          type: string
          maxLength: 200
        severity:
          type: string
          enum:
            - high
            - medium
            - low
        aiSummary:
          type: string
          maxLength: 2000
        aiCategory:
          type: string
          maxLength: 200
    PublicTicketDto:
      type: object
      properties:
        _id:
          type: string
        code:
          type: string
        title:
          type: string
        severity:
          type: string
          enum:
            - high
            - medium
            - low
        destinationId:
          type: string
        destinationIds:
          description: >-
            Todos los destinos a los que llegó el ticket; destinationId es el
            principal.
          type: array
          items:
            type: string
        origin:
          $ref: '#/components/schemas/PublicTicketOriginDto'
        contentVersion:
          type: number
          minimum: 1
          default: 1
          description: Versión monotónica del contenido generado del ticket.
        followUp:
          $ref: '#/components/schemas/TicketFollowUpDto'
        score:
          type: object
          properties:
            value:
              type: number
            max:
              type: number
            kind:
              type: string
            display:
              type: string
        aiSummary:
          type: string
        aiCategory:
          type: string
        caseDescription:
          type: string
        historyHighlights:
          type: array
          items:
            type: string
        whatCustomerWants:
          type: string
        suggestedResolution:
          type: string
        language:
          type: string
        churnRisk:
          type: string
        criteria:
          type: array
          items:
            type: string
        historySnapshot:
          type: object
          additionalProperties: true
        sentiment:
          type: string
        generatedByAI:
          type: boolean
        customerComment:
          type: object
          properties:
            text:
              type: string
            isAudio:
              type: boolean
            audioUrl:
              type: string
            transcription:
              type: string
        client:
          type: object
          properties:
            clientId:
              type: string
            name:
              type: string
            email:
              type: string
            phone:
              type: string
        timeline:
          type: array
          items:
            type: object
            additionalProperties: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - _id
        - title
        - severity
        - origin
        - contentVersion
    ValidationErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          description: Código de estado HTTP
          example: 400
        message:
          description: Arreglo de mensajes de error de validación
          example:
            - email must be a valid email
            - password must be at least 8 characters
          type: array
          items:
            type: string
        error:
          type: string
          description: Tipo de error
          example: Bad Request
      required:
        - statusCode
        - message
        - error
    PublicTicketOriginDto:
      type: object
      properties:
        tool:
          type: string
          enum:
            - woku
            - nps
            - form
            - csat
            - ces
        refId:
          type: string
        instrumentId:
          type: string
        instrumentName:
          type: string
        trackers:
          type: array
          items:
            type: object
            properties:
              trackerId:
                type: string
              name:
                type: string
              value:
                type: string
              label:
                type: string
                description: >-
                  Nombre de la entidad que identifica el valor (el nombre de un
                  viaje), si existe.
        folder:
          description: Carpeta de la herramienta de origen, cuando está dentro de una.
          allOf:
            - $ref: '#/components/schemas/PublicTicketOriginFolderDto'
      required:
        - tool
        - refId
    TicketFollowUpDto:
      type: object
      properties:
        conversationId:
          type: string
        state:
          type: string
          enum:
            - not_applicable
            - pending
            - initial_sent
            - awaiting_detail
            - closing
            - completed
            - timed_out
            - cancelled
        reason:
          type: string
        availableSummaryVersion:
          type: number
        enrichmentState:
          type: string
          enum:
            - processing
            - applied
            - failed
            - skipped
          description: Resultado actual de aplicar la evidencia del seguimiento al ticket.
        enrichmentReason:
          type: string
          description: >-
            Código del motivo del resultado del enriquecimiento, sin detalles
            del proveedor ni credenciales.
        appliedSummaryVersion:
          type: number
          description: >-
            Última versión del resumen aplicada correctamente al ticket. El
            cierre de la conversación por sí solo no implica enriquecimiento.
        enrichedAt:
          type: string
          format: date-time
      required:
        - state
    PublicTicketOriginFolderDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        path:
          type: string
          description: Ruta de carpetas desde la raíz ("Tiendas > Santiago").
        ancestorIds:
          description: Primero la carpeta y luego sus padres hasta la raíz.
          type: array
          items:
            type: string
      required:
        - id
        - name
        - path
        - ancestorIds
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: Clave API secreta de la empresa.

````

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