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

# Create copilot apply

> Requires scopes: eval:write



## OpenAPI

````yaml /api-reference/openapi.json post /api/copilot/proposals/{id}/apply
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/copilot/proposals/{id}/apply:
    post:
      tags:
        - copilot
      summary: Create copilot apply
      description: 'Requires scopes: eval:write'
      operationId: post_copilot_proposals_id_apply
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiCopilotProposalsIdApplyRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiCopilotProposalsIdApplyResponse200ApplicationJson
        '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:
    PostApiCopilotProposalsIdApplyRequest:
      type: object
      properties:
        rationale:
          type: string
        idempotencyKey:
          type: string
        maxExpectedCostUsd:
          oneOf:
            - type: 'null'
            - type: string
      additionalProperties: false
      required:
        - rationale
        - idempotencyKey
    PostApiCopilotProposalsIdApplyResponse200ApplicationJson:
      oneOf:
        - type: object
          properties:
            idempotent:
              type: boolean
            decision:
              type: object
              properties:
                id:
                  type: string
                organizationId:
                  $ref: '#/components/schemas/OrganizationId'
                proposalId:
                  type: string
                decision:
                  type: string
                rationale:
                  type: string
                actorId:
                  type: string
                authorizationSnapshot:
                  type: object
                  properties:
                    actorId:
                      type: string
                    role:
                      oneOf:
                        - type: string
                          enum:
                            - owner
                        - type: string
                          enum:
                            - viewer
                        - type: string
                          enum:
                            - member
                        - type: string
                          enum:
                            - admin
                    scopes:
                      type: array
                      items:
                        type: string
                    requiredScope:
                      type: string
                      enum:
                        - eval:write
                    requiredRole:
                      type: string
                      enum:
                        - member
                    checkedAt:
                      type: string
                  additionalProperties: false
                  required:
                    - actorId
                    - role
                    - scopes
                    - requiredScope
                    - requiredRole
                    - checkedAt
                idempotencyKey:
                  type: string
                result:
                  oneOf:
                    - type: 'null'
                    - type: object
                      properties:
                        domain:
                          oneOf:
                            - type: string
                              enum:
                                - prompt
                            - type: string
                              enum:
                                - scorer
                            - type: string
                              enum:
                                - dataset
                            - type: string
                              enum:
                                - deployment
                            - type: string
                              enum:
                                - evals_as_code
                            - type: string
                              enum:
                                - monitor
                            - type: string
                              enum:
                                - dashboard
                        resourceRef:
                          type: object
                          properties:
                            type:
                              oneOf:
                                - type: string
                                  enum:
                                    - prompt
                                - type: string
                                  enum:
                                    - scorer
                                - type: string
                                  enum:
                                    - dataset
                                - type: string
                                  enum:
                                    - deployment
                                - type: string
                                  enum:
                                    - evals_as_code
                                - type: string
                                  enum:
                                    - monitor
                                - type: string
                                  enum:
                                    - dashboard
                            id:
                              type: string
                            version:
                              type: string
                          additionalProperties: false
                          required:
                            - type
                            - id
                        createdDraftRef:
                          type: object
                          properties:
                            type:
                              oneOf:
                                - type: string
                                  enum:
                                    - prompt
                                - type: string
                                  enum:
                                    - scorer
                                - type: string
                                  enum:
                                    - dataset
                                - type: string
                                  enum:
                                    - deployment
                                - type: string
                                  enum:
                                    - evals_as_code
                                - type: string
                                  enum:
                                    - monitor
                                - type: string
                                  enum:
                                    - dashboard
                            id:
                              type: string
                            version:
                              type: string
                          additionalProperties: false
                          required:
                            - type
                            - id
                        rollbackRef:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                type:
                                  oneOf:
                                    - type: string
                                      enum:
                                        - prompt
                                    - type: string
                                      enum:
                                        - scorer
                                    - type: string
                                      enum:
                                        - dataset
                                    - type: string
                                      enum:
                                        - deployment
                                    - type: string
                                      enum:
                                        - evals_as_code
                                    - type: string
                                      enum:
                                        - monitor
                                    - type: string
                                      enum:
                                        - dashboard
                                id:
                                  type: string
                                version:
                                  type: string
                              additionalProperties: false
                              required:
                                - type
                                - id
                        detail:
                          type: object
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                      additionalProperties: false
                      required:
                        - domain
                        - resourceRef
                        - createdDraftRef
                        - rollbackRef
                        - detail
                    - type: object
                      properties:
                        errorCode:
                          type: string
                        errorMessage:
                          type: string
                        partialResult:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                acceptedRowIds:
                                  type: array
                                  items:
                                    type: string
                                cause:
                                  type: string
                                failures:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      code:
                                        type: string
                                      line:
                                        type: number
                                      message:
                                        type: string
                                    additionalProperties: false
                                    required:
                                      - code
                                      - line
                                      - message
                              additionalProperties: false
                              required:
                                - acceptedRowIds
                      additionalProperties: false
                      required:
                        - errorCode
                        - errorMessage
                        - partialResult
                    - type: object
                      properties:
                        status:
                          type: string
                          enum:
                            - rejected
                      additionalProperties: false
                      required:
                        - status
                createdAt:
                  type: string
                  format: date-time
              additionalProperties: false
              required:
                - id
                - organizationId
                - proposalId
                - decision
                - rationale
                - actorId
                - authorizationSnapshot
                - idempotencyKey
                - result
                - createdAt
            result:
              type: 'null'
          additionalProperties: false
          required:
            - idempotent
            - decision
        - type: object
          properties:
            idempotent:
              type: boolean
            decision:
              type: object
              properties:
                decision:
                  type: string
                rationale:
                  type: string
                id:
                  type: string
                createdAt:
                  type: string
                  format: date-time
                organizationId:
                  $ref: '#/components/schemas/OrganizationId'
                actorId:
                  type: string
                idempotencyKey:
                  type: string
                result:
                  oneOf:
                    - type: 'null'
                    - type: object
                      properties:
                        domain:
                          oneOf:
                            - type: string
                              enum:
                                - prompt
                            - type: string
                              enum:
                                - scorer
                            - type: string
                              enum:
                                - dataset
                            - type: string
                              enum:
                                - deployment
                            - type: string
                              enum:
                                - evals_as_code
                            - type: string
                              enum:
                                - monitor
                            - type: string
                              enum:
                                - dashboard
                        resourceRef:
                          type: object
                          properties:
                            type:
                              oneOf:
                                - type: string
                                  enum:
                                    - prompt
                                - type: string
                                  enum:
                                    - scorer
                                - type: string
                                  enum:
                                    - dataset
                                - type: string
                                  enum:
                                    - deployment
                                - type: string
                                  enum:
                                    - evals_as_code
                                - type: string
                                  enum:
                                    - monitor
                                - type: string
                                  enum:
                                    - dashboard
                            id:
                              type: string
                            version:
                              type: string
                          additionalProperties: false
                          required:
                            - type
                            - id
                        createdDraftRef:
                          type: object
                          properties:
                            type:
                              oneOf:
                                - type: string
                                  enum:
                                    - prompt
                                - type: string
                                  enum:
                                    - scorer
                                - type: string
                                  enum:
                                    - dataset
                                - type: string
                                  enum:
                                    - deployment
                                - type: string
                                  enum:
                                    - evals_as_code
                                - type: string
                                  enum:
                                    - monitor
                                - type: string
                                  enum:
                                    - dashboard
                            id:
                              type: string
                            version:
                              type: string
                          additionalProperties: false
                          required:
                            - type
                            - id
                        rollbackRef:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                type:
                                  oneOf:
                                    - type: string
                                      enum:
                                        - prompt
                                    - type: string
                                      enum:
                                        - scorer
                                    - type: string
                                      enum:
                                        - dataset
                                    - type: string
                                      enum:
                                        - deployment
                                    - type: string
                                      enum:
                                        - evals_as_code
                                    - type: string
                                      enum:
                                        - monitor
                                    - type: string
                                      enum:
                                        - dashboard
                                id:
                                  type: string
                                version:
                                  type: string
                              additionalProperties: false
                              required:
                                - type
                                - id
                        detail:
                          type: object
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                      additionalProperties: false
                      required:
                        - domain
                        - resourceRef
                        - createdDraftRef
                        - rollbackRef
                        - detail
                    - type: object
                      properties:
                        errorCode:
                          type: string
                        errorMessage:
                          type: string
                        partialResult:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                acceptedRowIds:
                                  type: array
                                  items:
                                    type: string
                                cause:
                                  type: string
                                failures:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      code:
                                        type: string
                                      line:
                                        type: number
                                      message:
                                        type: string
                                    additionalProperties: false
                                    required:
                                      - code
                                      - line
                                      - message
                              additionalProperties: false
                              required:
                                - acceptedRowIds
                      additionalProperties: false
                      required:
                        - errorCode
                        - errorMessage
                        - partialResult
                    - type: object
                      properties:
                        status:
                          type: string
                          enum:
                            - rejected
                      additionalProperties: false
                      required:
                        - status
                authorizationSnapshot:
                  type: object
                  properties:
                    actorId:
                      type: string
                    role:
                      oneOf:
                        - type: string
                          enum:
                            - owner
                        - type: string
                          enum:
                            - viewer
                        - type: string
                          enum:
                            - member
                        - type: string
                          enum:
                            - admin
                    scopes:
                      type: array
                      items:
                        type: string
                    requiredScope:
                      type: string
                      enum:
                        - eval:write
                    requiredRole:
                      type: string
                      enum:
                        - member
                    checkedAt:
                      type: string
                  additionalProperties: false
                  required:
                    - actorId
                    - role
                    - scopes
                    - requiredScope
                    - requiredRole
                    - checkedAt
                proposalId:
                  type: string
              additionalProperties: false
              required:
                - decision
                - rationale
                - id
                - createdAt
                - organizationId
                - actorId
                - idempotencyKey
                - result
                - authorizationSnapshot
                - proposalId
            result:
              type: object
              properties:
                domain:
                  oneOf:
                    - type: string
                      enum:
                        - prompt
                    - type: string
                      enum:
                        - scorer
                    - type: string
                      enum:
                        - dataset
                    - type: string
                      enum:
                        - deployment
                    - type: string
                      enum:
                        - evals_as_code
                    - type: string
                      enum:
                        - monitor
                    - type: string
                      enum:
                        - dashboard
                resourceRef:
                  type: object
                  properties:
                    type:
                      oneOf:
                        - type: string
                          enum:
                            - prompt
                        - type: string
                          enum:
                            - scorer
                        - type: string
                          enum:
                            - dataset
                        - type: string
                          enum:
                            - deployment
                        - type: string
                          enum:
                            - evals_as_code
                        - type: string
                          enum:
                            - monitor
                        - type: string
                          enum:
                            - dashboard
                    id:
                      type: string
                    version:
                      type: string
                  additionalProperties: false
                  required:
                    - type
                    - id
                createdDraftRef:
                  type: object
                  properties:
                    type:
                      oneOf:
                        - type: string
                          enum:
                            - prompt
                        - type: string
                          enum:
                            - scorer
                        - type: string
                          enum:
                            - dataset
                        - type: string
                          enum:
                            - deployment
                        - type: string
                          enum:
                            - evals_as_code
                        - type: string
                          enum:
                            - monitor
                        - type: string
                          enum:
                            - dashboard
                    id:
                      type: string
                    version:
                      type: string
                  additionalProperties: false
                  required:
                    - type
                    - id
                rollbackRef:
                  oneOf:
                    - type: 'null'
                    - type: object
                      properties:
                        type:
                          oneOf:
                            - type: string
                              enum:
                                - prompt
                            - type: string
                              enum:
                                - scorer
                            - type: string
                              enum:
                                - dataset
                            - type: string
                              enum:
                                - deployment
                            - type: string
                              enum:
                                - evals_as_code
                            - type: string
                              enum:
                                - monitor
                            - type: string
                              enum:
                                - dashboard
                        id:
                          type: string
                        version:
                          type: string
                      additionalProperties: false
                      required:
                        - type
                        - id
                detail:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
              additionalProperties: false
              required:
                - domain
                - resourceRef
                - createdDraftRef
                - rollbackRef
                - detail
          additionalProperties: false
          required:
            - idempotent
            - decision
            - result
    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

````