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

# Update AI Check

> Replaces the name and quality requirements of an existing AI Check, and optionally updates its locale restrictions. Returns 404 if the UID does not exist.

When `locales` is absent from the request, existing locale restrictions are preserved. When `locales` is an empty array, any previously stored locale restrictions are cleared and the check applies to all locales.

Requires **ADMIN** or **OWNER** IDM role.



## OpenAPI

````yaml /openapi/phrase-quality-evaluator.json put /v2/aiChecks/{uid}
openapi: 3.1.2
info:
  title: Quality Evaluator API
  description: >
    The Quality Evaluator API enables you to evaluate the quality of translated
    segments using AI-powered checks.

    Create custom AI Checks with specific quality requirements, organize them
    into Quality Profiles, and run

    evaluations to identify translation issues automatically.
  version: 1.0.0
  termsOfService: https://phrase.com/terms/
  contact:
    name: Phrase Support
    url: https://support.phrase.com
servers:
  - url: https://eu.phrase.com/quality-evaluator
    description: Production EU
  - url: https://us.phrase.com/quality-evaluator
    description: Production US
security:
  - bearerAuth: []
tags:
  - name: AI Checks
    description: Create and manage AI Checks with custom quality requirements.
  - name: Analytics
    description: Retrieve aggregated evaluation analytics.
  - name: Evaluation
    description: Evaluate translation quality using AI Checks.
  - name: Quality Profiles
    description: Organize AI Checks into reusable Quality Profiles.
paths:
  /v2/aiChecks/{uid}:
    parameters:
      - name: uid
        in: path
        required: true
        description: Unique identifier of the AI Check.
        schema:
          type: string
          example: 6804a3f2e1b2c3d4e5f60789
    put:
      tags:
        - AI Checks
      summary: Update AI Check
      description: >-
        Replaces the name and quality requirements of an existing AI Check, and
        optionally updates its locale restrictions. Returns 404 if the UID does
        not exist.


        When `locales` is absent from the request, existing locale restrictions
        are preserved. When `locales` is an empty array, any previously stored
        locale restrictions are cleared and the check applies to all locales.


        Requires **ADMIN** or **OWNER** IDM role.
      operationId: updateAiCheckV2
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            example: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiCheckUpdateRequestV2'
            examples:
              withLocales:
                summary: Update with locale restrictions
                value:
                  name: No Yoda Speech
                  qualityRequirements: >-
                    The translation must not use Yoda-style inverted sentence
                    structure.
                  locales:
                    - en_us
                    - en_gb
              clearLocales:
                summary: Clear locale restrictions (applies to all locales)
                value:
                  name: No Yoda Speech
                  qualityRequirements: >-
                    The translation must not use Yoda-style inverted sentence
                    structure.
                  locales: []
      responses:
        '200':
          description: AI Check updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiCheckResponse'
              example:
                uid: 6804a3f2e1b2c3d4e5f60789
                name: No Yoda Speech
                qualityRequirements: >-
                  The translation must not use Yoda-style inverted sentence
                  structure.
                locales:
                  - en_us
                  - en_gb
        '400':
          description: >-
            Bad Request — validation failed (missing required fields or value
            out of range).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          description: Not Found — no AI Check with this UID exists.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        default:
          $ref: '#/components/responses/ErrorResponse'
      deprecated: true
components:
  schemas:
    AiCheckUpdateRequestV2:
      type: object
      properties:
        name:
          type: string
          description: Display name for the AI Check.
          example: No Yoda Speech
        qualityRequirements:
          type: string
          description: Natural language description of the quality requirements to check.
          maxLength: 2000
          example: The translation must not use Yoda-style inverted sentence structure.
        locales:
          type: array
          description: >-
            Locale codes this AI Check applies to. When absent, existing locale
            restrictions are preserved. When an empty array, locale restrictions
            are cleared and the check applies to all locales.
          uniqueItems: true
          items:
            $ref: '#/components/schemas/LocaleCode'
      required:
        - name
        - qualityRequirements
    AiCheckResponse:
      type: object
      properties:
        uid:
          type: string
          example: 6804a3f2e1b2c3d4e5f60789
        name:
          type: string
          example: No Yoda Speech
        qualityRequirements:
          type: string
          maxLength: 2000
          example: The translation must not use Yoda-style inverted sentence structure.
        locales:
          type: array
          description: >-
            Locale codes this AI Check applies to. Absent or empty means the
            check applies to all locales.
          uniqueItems: true
          items:
            $ref: '#/components/schemas/LocaleCode'
      required:
        - uid
        - name
        - qualityRequirements
    ProblemDetail:
      type: object
      description: Error response following RFC 9457.
      properties:
        type:
          type: string
          description: A URI reference identifying the problem type.
          example: urn:problem-type:unauthorized
        title:
          type: string
          description: A short, human-readable summary of the problem.
          example: Unauthorized
        status:
          type: integer
          description: The HTTP status code.
          example: 401
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence.
          example: Valid credentials were not supplied
        instance:
          type: string
          description: A URI reference identifying the specific occurrence.
    LocaleCode:
      type: string
      description: >-
        Locale code compatible with Phrase locale format. Case-insensitive,
        supports both underscore and hyphen separators (e.g., `en_us`, `en-US`,
        `de_de`, `fr_fr`).
      example: en_us
  responses:
    UnauthorizedResponse:
      description: Authentication failed or credentials not provided.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
          example:
            type: urn:problem-type:unauthorized
            title: Unauthorized
            status: 401
            detail: Valid credentials were not supplied
    ForbiddenResponse:
      description: >-
        Insufficient permissions. This operation requires the ADMIN or OWNER IDM
        role.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
          example:
            type: urn:problem-type:forbidden
            title: Forbidden
            status: 403
            detail: Insufficient permissions to perform this action
    ErrorResponse:
      description: An error occurred.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Use a Bearer token obtained from Phrase Platform authentication. See the
        Authentication guide for details on how to obtain a token.

````