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

# Update Scorecard

> Partially updates a scorecard. Only fields present in the request body are modified; omitted fields retain their current values. Requires an org-scoped API key.



## OpenAPI

````yaml patch /scorecards/{id}
openapi: 3.0.1
info:
  title: Attention Service V2
  description: Attention Service API V2
  termsOfService: https://www.attention.com/terms-of-use
  contact:
    name: Attention Team
    url: https://docs.attention.com/welcome
    email: support@attention.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.8.0
servers:
  - url: https://api.attention.tech/v2
security:
  - APIKeyHeader: []
paths:
  /scorecards/{id}:
    patch:
      tags:
        - Scorecard
      summary: Update Scorecard
      description: >-
        Partially updates a scorecard. Only fields present in the request body
        are modified; omitted fields retain their current values. Requires an
        org-scoped API key.
      operationId: updateScorecard
      parameters:
        - name: id
          in: path
          description: Scorecard UUID
          required: true
          schema:
            type: string
      requestBody:
        description: >-
          Fields to update. All fields are optional; at least one must be
          provided.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScorecardRequest'
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/UpdateScorecardRequest'
        required: true
      responses:
        '200':
          description: Scorecard successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScorecardResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ScorecardResponse'
        '400':
          description: >-
            Invalid request body (empty patch, title out of range, conflicting
            teamId+allTeams)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: invalid_parameter
                status: '400'
                code: '400'
                title: Invalid Parameter
                detail: request body must contain at least one field to update
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed - valid API key required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: unauthorized
                status: '401'
                code: '401'
                title: Unauthorized
                detail: Authentication failed - valid API key required
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Caller's API key does not have permission to modify this scorecard
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: forbidden
                status: '403'
                code: '403'
                title: Forbidden
                detail: Insufficient permissions to update this scorecard
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Scorecard not found in the caller's organization (returned for both
            missing and cross-org IDs)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: not_found
                status: '404'
                code: '404'
                title: Not Found
                detail: Scorecard not found
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Request body failed schema-level validation (string shorter than
            minLength, value outside declared range, etc.). Emitted by the
            swagger validation layer before handler code runs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 604
                message: title in body should be at least 1 chars long
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error occurred while updating the scorecard
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateScorecardRequest:
      type: object
      properties:
        title:
          type: string
          description: Replacement title (1-128 characters, trimmed).
        teamUUID:
          type: string
          description: >-
            Reassign the scorecard to a specific team. Mutually exclusive with
            allTeams=true.
        allTeams:
          type: boolean
          description: >-
            Reassign the scorecard to every team. Mutually exclusive with
            teamId.
          nullable: true
        enabled:
          type: boolean
          description: Toggle the scorecard active state.
          nullable: true
        interactionType:
          $ref: '#/components/schemas/ScorecardInteractionType'
        detailedInstructions:
          type: string
          description: Replacement detailed instructions (0-2000 characters).
        scorecardPrompt:
          type: string
          description: Replacement expert-mode prompt (0-8000 characters).
        expertMode:
          type: boolean
          description: Toggle expert mode.
          nullable: true
        criteria:
          $ref: '#/components/schemas/ScorecardCriteria'
      description: >-
        Partial update payload for a scorecard. All fields are optional; at
        least one must be present.
      example:
        title: Sales Discovery Scorecard (v2)
        enabled: false
    ScorecardResponse:
      required:
        - data
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Scorecard'
      description: Single-resource envelope wrapping a Scorecard.
      example:
        data:
          id: sc-uuid-123
          title: Sales Discovery Scorecard
          organizationId: org-uuid-456
          allTeams: true
          enabled: true
          interactionType: conversation
          expertMode: false
          isDefaultTemplate: false
          createdAt: '2026-04-16T10:15:00Z'
    Error:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        status:
          type: string
          description: >-
            The HTTP status code applicable to this problem, expressed as a
            string value.
        code:
          type: string
          description: An application-specific error code, expressed as a string value.
        title:
          type: string
          description: A short, human-readable summary of the problem.
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          properties: {}
      example:
        id: not_found_error
        status: '404'
        code: '404'
        title: Not Found Error
        detail: The requested resource was not found
        source:
          pointer: /data/attributes/id
    ScorecardInteractionType:
      type: string
      description: Type of interaction the scorecard evaluates.
      example: conversation
      enum:
        - conversation
        - chat
        - email
    ScorecardCriteria:
      type: object
      properties:
        operator:
          $ref: '#/components/schemas/ScorecardCriteriaOperator'
        conditions:
          type: array
          description: List of field/value conditions evaluated with the operator.
          items:
            $ref: '#/components/schemas/ScorecardCriteriaCondition'
      description: >-
        Label-based criteria that gate when a scorecard is applied to an
        interaction.
      example:
        operator: AND
        conditions:
          - field: label-uuid-123
            value: option-uuid-456
    Scorecard:
      required:
        - allTeams
        - createdAt
        - enabled
        - expertMode
        - interactionType
        - isDefaultTemplate
        - organizationUUID
        - title
        - uuid
      type: object
      properties:
        uuid:
          type: string
          description: Scorecard UUID.
        title:
          type: string
          description: Human-readable title of the scorecard (1-128 characters).
        organizationUUID:
          type: string
          description: UUID of the organization that owns the scorecard.
        teamUUID:
          type: string
          description: >-
            UUID of the specific team assigned to this scorecard, if any.
            Mutually exclusive with allTeams=true.
        allTeams:
          type: boolean
          description: Whether the scorecard is assigned to every team in the organization.
        enabled:
          type: boolean
          description: Whether the scorecard is active and runs against new interactions.
        interactionType:
          $ref: '#/components/schemas/ScorecardInteractionType'
        detailedInstructions:
          type: string
          description: Optional free-form guidance appended to the evaluator prompt.
        scorecardPrompt:
          type: string
          description: Optional prompt override used in expert mode.
        expertMode:
          type: boolean
          description: >-
            Whether this scorecard uses custom prompts (expert mode) instead of
            the default template.
        isDefaultTemplate:
          type: boolean
          description: >-
            Whether this scorecard was seeded as one of the default organization
            templates.
        criteria:
          $ref: '#/components/schemas/ScorecardCriteria'
        createdAt:
          type: string
          description: Timestamp when the scorecard was created.
          format: date-time
      description: A scorecard template used to evaluate a conversation, chat, or email.
      example:
        id: sc-uuid-123
        title: Sales Discovery Scorecard
        organizationId: org-uuid-456
        teamId: team-uuid-789
        allTeams: false
        enabled: true
        interactionType: conversation
        detailedInstructions: Focus on discovery quality and next-step commitments.
        scorecardPrompt: ''
        expertMode: false
        isDefaultTemplate: false
        criteria:
          operator: AND
          conditions: []
        createdAt: '2026-04-16T10:15:00Z'
    ScorecardCriteriaOperator:
      type: string
      description: Boolean operator joining criteria conditions.
      example: AND
      enum:
        - AND
        - OR
    ScorecardCriteriaCondition:
      type: object
      properties:
        field:
          type: string
          description: >-
            Field path being matched (for example, a label UUID or label option
            UUID).
        value:
          type: string
          description: Expected value for the field to satisfy the condition.
      description: A single criteria condition pairing a field path with an expected value.
      example:
        field: label-uuid-123
        value: option-uuid-456
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header

````