> ## 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 Label

> Partially updates a label. Only fields present in the request body are applied (pointer-nil merge semantics). Renaming a label cascades updates to scorecard criteria and intelligence-item-collection criteria that reference the old label name. Cross-organization updates return 404.



## OpenAPI

````yaml patch /labels/{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:
  /labels/{id}:
    patch:
      tags:
        - Label
      summary: Update Label
      description: >-
        Partially updates a label. Only fields present in the request body are
        applied (pointer-nil merge semantics). Renaming a label cascades updates
        to scorecard criteria and intelligence-item-collection criteria that
        reference the old label name. Cross-organization updates return 404.
      operationId: updateLabel
      parameters:
        - name: id
          in: path
          description: UUID of the label to update.
          required: true
          schema:
            type: string
      requestBody:
        description: Fields to update. Omit a field to leave it unchanged.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLabelRequest'
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/UpdateLabelRequest'
        required: true
      responses:
        '200':
          description: Label successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/LabelResponse'
        '400':
          description: >-
            Invalid request body (empty update, name too long, description too
            long, or invalid option shape)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: invalid_parameter
                status: '400'
                code: '400'
                title: Invalid Parameter
                detail: description must be 0 to 2000 characters
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Authentication failed. Please provide a valid organization-scoped
            API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: unauthorized
                status: '401'
                code: '401'
                title: Unauthorized
                detail: Valid organization-scoped API key required
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Label not found in the caller's organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: not_found
                status: '404'
                code: '404'
                title: Not Found
                detail: Label not found
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Another label in the organization already uses the requested name
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: conflict
                status: '409'
                code: '409'
                title: Conflict
                detail: A label with this name already exists in the organization
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Schema-level validation failure (e.g. body fails
            minLength/maxLength). Returned before handler-level business rules
            are applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 604
                message: name in body should be at least 1 chars long
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected server error. Please try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error occurred while updating the label
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateLabelRequest:
      type: object
      properties:
        name:
          maxLength: 128
          minLength: 1
          type: string
          description: >-
            New label name. Trimmed before validation. Must be unique within the
            organization. Renaming cascades to scorecard criteria and
            intelligence-item-collection criteria that reference the old name.
          example: Buying Signal (v2)
        description:
          maxLength: 2000
          type: string
          description: >-
            New description. Pass an empty string to clear. 0 to 2000
            characters. Omit to leave unchanged.
          nullable: true
          example: Updated description of the buying signal label.
        aiFlow:
          type: boolean
          description: New AI-flow participation value. Omit to leave unchanged.
          nullable: true
          example: false
        allTeams:
          type: boolean
          description: New allTeams value. Omit to leave unchanged.
          nullable: true
          example: true
        options:
          type: array
          description: >-
            New option set. When provided, the full list replaces the existing
            options. Omit to leave unchanged; send an empty array to clear.
          items:
            $ref: '#/components/schemas/LabelOption'
      description: >-
        Payload for partially updating a label. Only fields present in the body
        are applied (pointer-nil merge semantics). At least one mutable field
        must be provided.
      example:
        name: Buying Signal (v2)
        description: Updated description of the buying signal label.
        aiFlow: false
    LabelResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Label'
      description: Single-resource response envelope for label endpoints.
      example:
        data:
          uuid: fe515723-fe2e-4959-a5fa-c4d3937fe7e4
          name: Buying Signal
          description: Conversations where the prospect expresses a buying signal.
          aiFlow: true
          allTeams: false
          isDefaultTemplate: false
          options: []
          organizationUUID: 16b78cec-82ef-46d2-8213-5d3bb7d2571c
          createdAt: '2026-04-16T18:00: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
    LabelOption:
      type: object
      properties:
        value:
          type: string
          description: >-
            The option value as displayed to callers. Stored as an arbitrary
            JSON value server-side; surfaced here as a string for REST
            ergonomics.
          example: high-intent
        description:
          type: string
          description: >-
            Optional human-readable description of the option, used for tooltips
            and AI-flow prompts.
          example: Prospect has explicit buying signals
      description: >-
        A single selectable value within a label's option set. Present when the
        label is configured as a multi-value enum.
      example:
        value: high-intent
        description: Prospect has explicit buying signals
    Label:
      required:
        - aiFlow
        - allTeams
        - createdAt
        - isDefaultTemplate
        - name
        - organizationUUID
        - uuid
      type: object
      properties:
        uuid:
          type: string
          description: Unique identifier of the label.
          example: fe515723-fe2e-4959-a5fa-c4d3937fe7e4
        name:
          type: string
          description: >-
            Human-readable label name. Unique per organization. Trimmed; 1 to
            128 characters.
          example: Buying Signal
        description:
          type: string
          description: >-
            Longer description of the label's meaning or criteria. 0 to 2000
            characters.
          example: Conversations where the prospect expresses a buying signal.
        aiFlow:
          type: boolean
          description: >-
            Whether this label participates in the AI flow (auto-classification
            during conversation post-processing).
          example: true
        allTeams:
          type: boolean
          description: >-
            Whether this label applies to all teams in the organization. When
            false, label visibility is constrained by team assignments managed
            through the internal API.
          example: false
        isDefaultTemplate:
          type: boolean
          description: >-
            Whether this label originated from the organization's default
            template. Default-template labels are typically managed as a
            system-seeded group.
          example: false
        options:
          type: array
          description: >-
            Optional set of selectable values when the label is a multi-value
            enum. Empty or omitted for binary labels.
          items:
            $ref: '#/components/schemas/LabelOption'
        organizationUUID:
          type: string
          description: >-
            UUID of the organization that owns the label. Always matches the
            authenticated principal's organization on responses.
          example: 16b78cec-82ef-46d2-8213-5d3bb7d2571c
        createdAt:
          type: string
          description: Timestamp when the label was created, in ISO 8601 (RFC 3339) format.
          format: date-time
          example: '2026-04-16T18:00:00Z'
      description: >-
        A label (label category) used to classify conversations and drive AI
        flows, scorecard criteria, and intelligence-item-collection criteria.
        Labels are scoped to a single organization.
      example:
        uuid: fe515723-fe2e-4959-a5fa-c4d3937fe7e4
        name: Buying Signal
        description: Conversations where the prospect expresses a buying signal.
        aiFlow: true
        allTeams: false
        isDefaultTemplate: false
        options:
          - value: high-intent
            description: Prospect has explicit buying signals
        organizationUUID: 16b78cec-82ef-46d2-8213-5d3bb7d2571c
        createdAt: '2026-04-16T18:00:00Z'
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header

````