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

# Update a quality scorecard

> Update an existing quality scorecard. Requires qualityManageScorecards permission.



## OpenAPI

````yaml https://dev.enneo.dev/api/mind/docs/open-api patch /quality/scorecard/{id}
openapi: 3.0.0
info:
  version: '1'
  title: enneo.MIND API
  description: This describes the API of enneo Mind, the main ticketing backend
  contact:
    name: enneo GmbH
    email: richard@enneo.ai
  license:
    name: Proprietary software
    url: https://enneo.ai
servers:
  - url: https://demo.enneo.ai/api/mind
    description: Production server, demo client
  - url: https://main.enneo.dev/api/mind
    description: Development main branch
  - url: http://localhost:8005/api/mind
    description: Local development server
security:
  - bearerAuth:
      - api
  - cookieAuth:
      - api
paths:
  /quality/scorecard/{id}:
    patch:
      tags:
        - Quality Management
      summary: Update a quality scorecard
      description: >-
        Update an existing quality scorecard. Requires qualityManageScorecards
        permission.
      operationId: updateQualityScorecard
      parameters:
        - name: id
          in: path
          required: true
          description: Scorecard ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the scorecard
                state:
                  type: string
                  enum:
                    - draft
                    - active
                    - retired
                    - deleted
                  description: State of the scorecard
                categories:
                  type: array
                  description: Categories with nested criteria definitions
                  items:
                    type: object
                    additionalProperties: true
                assignment:
                  type: object
                  description: >-
                    Assignment rules (optional). Omitted fields are cleared to
                    empty (no filter).
                  properties:
                    ticketTags:
                      type: array
                      items:
                        type: integer
                    teams:
                      type: array
                      items:
                        type: integer
                    channels:
                      type: array
                      items:
                        type: string
                    responseContexts:
                      type: array
                      description: |
                        Work-session contexts to match. Empty = no filter.
                      items:
                        type: string
                        enum:
                          - afterCustomerMessage
                          - withoutCustomerMessage
                liveCoach:
                  type: object
                  description: >-
                    Live Quality Coach configuration. Only updated when the
                    field is present in the payload.
                  properties:
                    enabled:
                      type: boolean
                    threshold:
                      type: integer
                      minimum: 0
                      maximum: 100
                createNewRevision:
                  type: boolean
                  default: true
                  description: >-
                    If true (default) and the scorecard is active, creates a new
                    revision instead of overwriting.
            example:
              name: Voice - Tier 2 escalation (v2)
              categories:
                - categoryId: 1
                  label: Greeting
                  order: 1
                  criteria:
                    - id: 100
                      label: Tone
                      description: Agent greets the customer within 10 seconds
                      maxPoints: 5
                      scoringType: numericScale
                      autoGenerateByAi: false
                      assessmentPrompt: Score how friendly the greeting was.
                      makeOrBreakForCategory: false
                      makeOrBreakForAssessment: true
              assignment:
                teams:
                  - 12
                channels:
                  - phone
              createNewRevision: false
      responses:
        '200':
          description: Scorecard updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  scorecard:
                    $ref: '#/components/schemas/QualityScorecard'
                  message:
                    type: string
                    nullable: true
                    description: >-
                      Set when the server transparently redirected the update to
                      the latest revision.
              examples:
                default:
                  summary: Active scorecard updated without new revision
                  value:
                    scorecard:
                      id: 42
                      baseId: 17
                      revision: 3
                      name: Email QA - Tier 1
                      state: active
                      categories: []
                      assignment:
                        teams:
                          - 5
                        channels:
                          - email
                      modifiedAt: '2024-06-01T10:30:00Z'
                      canEdit: true
                    message: null
                redirected:
                  summary: Update redirected to the latest revision
                  value:
                    scorecard:
                      id: 50
                      baseId: 17
                      revision: 4
                      name: Email QA - Tier 1
                      state: active
                      categories: []
                      assignment: null
                      modifiedAt: '2024-07-02T11:00:00Z'
                      canEdit: true
                    message: >-
                      You want to update an old version of a scorecard. We
                      gracefully use the most recent version (ID: 50) instead
        '403':
          description: Unauthorized
        '404':
          description: Scorecard not found
        '500':
          description: Internal error
components:
  schemas:
    QualityScorecard:
      type: object
      description: Quality scorecard for assessing agent performance
      properties:
        id:
          type: integer
          description: Scorecard ID
          example: 1
        baseId:
          type: integer
          description: Base ID for versioning (stable across revisions)
          example: 1
        revision:
          type: integer
          description: Revision number
          example: 1
        name:
          type: string
          description: Scorecard name
          example: Junior agent standard review
        state:
          type: string
          enum:
            - draft
            - active
            - retired
            - deleted
          description: Scorecard state
          example: active
        categoryCount:
          type: integer
          description: Number of categories (summary format only)
          example: 3
        categories:
          type: array
          description: Scorecard categories with criteria (full format only)
          items:
            type: object
            properties:
              categoryId:
                type: integer
              label:
                type: string
              order:
                type: integer
              criteria:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    label:
                      type: string
                    description:
                      type: string
                    maxPoints:
                      type: integer
                    scoringType:
                      type: string
                      enum:
                        - metNotMet
                        - numericScale
                    autoGenerateByAi:
                      type: boolean
                    assessmentPrompt:
                      type: string
                    makeOrBreakForCategory:
                      type: boolean
                    makeOrBreakForAssessment:
                      type: boolean
        assignment:
          type: object
          description: Assignment rules for scorecard applicability
          properties:
            ticketTags:
              type: array
              items:
                type: integer
            teams:
              type: array
              items:
                type: integer
            channels:
              type: array
              items:
                type: string
            responseContexts:
              type: array
              description: >
                Work-session contexts to match: 'afterCustomerMessage' (customer
                contacted first or worklog linked to an inbound message),
                'withoutCustomerMessage' (proactive outbound action with no
                linked customer message). Empty array (or field absent) means no
                filter. Existing scorecards default to ['afterCustomerMessage']
                via data migration.
              items:
                type: string
                enum:
                  - afterCustomerMessage
                  - withoutCustomerMessage
        liveCoach:
          type: object
          description: >
            Live Quality Coach configuration. When `enabled` is true and this
            scorecard

            is applicable to the ticket, the real-time draft check

            (`POST /ticket/{id}/quality/check`) scores against it and the
            server-side

            send gate blocks replies whose score is below `threshold` (unless
            the user

            has `qualityBypassSendGate`).
          properties:
            enabled:
              type: boolean
              description: Use this scorecard as Live Quality Coach
              example: false
            threshold:
              type: integer
              minimum: 0
              maximum: 100
              description: Minimum percentage a draft must reach to pass the send gate
              example: 85
        createdBy:
          type: integer
          description: User ID who created the scorecard
        modifiedBy:
          type: integer
          description: User ID who last modified the scorecard
        createdAt:
          type: string
          format: date-time
        modifiedAt:
          type: string
          format: date-time
        canEdit:
          type: boolean
          description: Whether current user can edit this scorecard
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT-based authentication
      x-scopes:
        api: Full access to the API
    cookieAuth:
      type: apiKey
      in: cookie
      name: connect.sid
      description: Cookie-based authentication
      x-scopes:
        api: Full access to the API

````