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

# Replace evaluations evaluations

> Requires scopes: eval:write



## OpenAPI

````yaml /api-reference/openapi.json put /api/evaluations
openapi: 3.1.0
info:
  title: EvalGate API
  version: 3.7.6
  description: EvalGate API. See docs/api-contract.md for stability commitments.
servers:
  - url: https://evalgate.com
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
paths:
  /api/evaluations:
    put:
      tags:
        - evaluations
      summary: Replace evaluations evaluations
      description: 'Requires scopes: eval:write'
      operationId: put_evaluations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutApiEvaluationsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PutApiEvaluationsResponse200ApplicationJson
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth:
            - eval:write
components:
  schemas:
    PutApiEvaluationsRequest:
      type: object
      properties:
        status:
          oneOf:
            - type: string
              enum:
                - draft
            - type: string
              enum:
                - active
            - type: string
              enum:
                - archived
        name:
          type: string
        description:
          type: string
      additionalProperties: false
    PutApiEvaluationsResponse200ApplicationJson:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
        description:
          oneOf:
            - type: 'null'
            - type: string
        type:
          type: string
        status:
          type: string
        organizationId:
          $ref: '#/components/schemas/OrganizationId'
        createdBy:
          type: string
        executionSettings:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                maxRetries:
                  type: number
                timeout:
                  type: number
                parallel:
                  oneOf:
                    - type: boolean
                      enum:
                        - false
                    - type: boolean
                      enum:
                        - true
                batchSize:
                  type: number
                measurementPolicy:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    evaluatorReleaseId:
                      type: string
                    validationType:
                      oneOf:
                        - type: string
                          enum:
                            - full
                        - type: string
                          enum:
                            - coverage
                        - type: string
                          enum:
                            - calibration
                        - type: string
                          enum:
                            - post_run
                        - type: string
                          enum:
                            - human_alignment
                        - type: string
                          enum:
                            - pairwise_bias
                        - type: string
                          enum:
                            - repeatability
                        - type: string
                          enum:
                            - predictive_validity
                    requestedMetrics:
                      type: array
                      items:
                        type: string
                    requiredEnvironments:
                      type: array
                      items:
                        oneOf:
                          - type: string
                            enum:
                              - dev
                          - type: string
                            enum:
                              - staging
                          - type: string
                            enum:
                              - prod
                    gate:
                      type: object
                      properties:
                        mode:
                          oneOf:
                            - type: string
                              enum:
                                - block
                            - type: string
                              enum:
                                - warn
                            - type: string
                              enum:
                                - observe
                        allowedMeasurementStatuses:
                          type: array
                          items:
                            type: string
                        requireConclusiveInterval:
                          oneOf:
                            - type: boolean
                              enum:
                                - false
                            - type: boolean
                              enum:
                                - true
                        minimumSampleSize:
                          type: number
                        maximumEce:
                          type: number
                        minimumAgreement:
                          type: number
                        maximumPositionFlipRate:
                          type: number
                        requireCoverage:
                          oneOf:
                            - type: boolean
                              enum:
                                - false
                            - type: boolean
                              enum:
                                - true
                      additionalProperties: false
                      required:
                        - mode
                  additionalProperties: false
                  required:
                    - enabled
                    - evaluatorReleaseId
              additionalProperties: false
        modelSettings:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                model:
                  type: string
                systemPrompt:
                  type: string
                temperature:
                  type: number
                maxTokens:
                  type: number
                topP:
                  type: number
                provider:
                  type: string
                calibrationThreshold:
                  type: number
                judgeStrictness:
                  type: number
                customMetrics:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      formula:
                        type: string
                      weight:
                        type: number
                      threshold:
                        type: number
                    additionalProperties: false
                    required:
                      - name
                calibrationMeta:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
              additionalProperties: false
        customMetrics:
          oneOf:
            - type: 'null'
            - type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  formula:
                    type: string
                  weight:
                    type: number
                  threshold:
                    type: number
                additionalProperties: false
                required:
                  - name
        executorType:
          oneOf:
            - type: 'null'
            - type: string
        executorConfig:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                type:
                  type: string
                endpoint:
                  type: string
                headers:
                  type: object
                  additionalProperties:
                    type: string
              additionalProperties: false
        publishedRunId:
          oneOf:
            - type: 'null'
            - type: number
        publishedVersion:
          oneOf:
            - type: 'null'
            - type: number
        projectKey:
          oneOf:
            - type: 'null'
            - type: string
        lockedBySessionId:
          oneOf:
            - type: 'null'
            - type: string
        lockAcquiredAt:
          oneOf:
            - type: 'null'
            - type: string
              format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: false
      required:
        - id
        - name
        - description
        - type
        - status
        - organizationId
        - createdBy
        - executionSettings
        - modelSettings
        - customMetrics
        - executorType
        - executorConfig
        - publishedRunId
        - publishedVersion
        - projectKey
        - lockedBySessionId
        - lockAcquiredAt
        - createdAt
        - updatedAt
    OrganizationId:
      type: string
      format: uuid
    JsonValue:
      oneOf:
        - type: 'null'
        - type: boolean
        - type: number
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - NO_ORG_MEMBERSHIP
                - CROSS_ORG_REFERENCE
                - INCOMPLETE
                - MALFORMED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
          required:
            - code
            - message
      required:
        - error
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Session Token

````