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

> Requires scopes: eval:write



## OpenAPI

````yaml /api-reference/openapi.json post /api/copilot/threads/{id}/actions
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/threads/{id}/actions:
    post:
      tags:
        - copilot
      summary: Create copilot actions
      description: 'Requires scopes: eval:write'
      operationId: post_copilot_threads_id_actions
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiCopilotThreadsIdActionsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiCopilotThreadsIdActionsResponse200ApplicationJson
        '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:
    PostApiCopilotThreadsIdActionsRequest:
      type: object
      properties:
        message:
          type: string
        modelPreference:
          type: string
      additionalProperties: false
      required:
        - message
    PostApiCopilotThreadsIdActionsResponse200ApplicationJson:
      type: object
      properties:
        message:
          type: object
          properties:
            id:
              type: string
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            contentHash:
              type: string
            role:
              type: string
            content:
              type: string
            redactionFindings:
              type: array
              items:
                type: string
            threadId:
              type: string
            redactionState:
              type: string
            modelCallId:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - createdBy
            - contentHash
            - role
            - content
            - redactionFindings
            - threadId
            - redactionState
            - modelCallId
        proposal:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                domain:
                  type: string
                status:
                  type: string
                rationale:
                  type: string
                summary:
                  type: string
                id:
                  type: string
                createdAt:
                  type: string
                  format: date-time
                updatedAt:
                  type: string
                  format: date-time
                organizationId:
                  $ref: '#/components/schemas/OrganizationId'
                createdBy:
                  type: string
                expiresAt:
                  type: string
                  format: date-time
                evidence:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      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
                      label:
                        type: string
                      detail:
                        type: string
                    additionalProperties: false
                    required:
                      - type
                      - resourceRef
                      - label
                      - detail
                reviewedBy:
                  oneOf:
                    - type: 'null'
                    - type: string
                reviewedAt:
                  oneOf:
                    - type: 'null'
                    - type: string
                      format: date-time
                redactionFindings:
                  type: array
                  items:
                    type: string
                warnings:
                  type: array
                  items:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      severity:
                        oneOf:
                          - type: string
                            enum:
                              - blocking
                          - type: string
                            enum:
                              - info
                          - type: string
                            enum:
                              - warning
                    additionalProperties: false
                    required:
                      - code
                      - message
                      - severity
                threadId:
                  type: string
                redactionState:
                  type: string
                requestHash:
                  type: string
                errorCode:
                  oneOf:
                    - type: 'null'
                    - type: string
                errorMessage:
                  oneOf:
                    - type: 'null'
                    - type: string
                modelCallId:
                  type: string
                sourceProposalId:
                  oneOf:
                    - type: 'null'
                    - type: string
                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
                expectedResourceHash:
                  type: string
                before:
                  $ref: '#/components/schemas/JsonValue'
                after:
                  $ref: '#/components/schemas/JsonValue'
                expectedCostUsd:
                  oneOf:
                    - type: 'null'
                    - 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
                applicationResult:
                  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:
                        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:
                - domain
                - status
                - rationale
                - summary
                - id
                - createdAt
                - updatedAt
                - organizationId
                - createdBy
                - expiresAt
                - evidence
                - reviewedBy
                - reviewedAt
                - redactionFindings
                - warnings
                - threadId
                - redactionState
                - requestHash
                - errorCode
                - errorMessage
                - modelCallId
                - sourceProposalId
                - resourceRef
                - expectedResourceHash
                - before
                - after
                - expectedCostUsd
                - authorizationSnapshot
                - applicationResult
        modelCall:
          type: object
          properties:
            id:
              type: string
            status:
              oneOf:
                - type: string
                  enum:
                    - failed
                - type: string
                  enum:
                    - success
                - type: string
                  enum:
                    - cancelled
                - type: string
                  enum:
                    - blocked
                - type: string
                  enum:
                    - timeout
                - type: string
                  enum:
                    - fallback
            model:
              oneOf:
                - type: 'null'
                - type: string
            provider:
              oneOf:
                - type: 'null'
                - type: string
            cost:
              type: object
              properties:
                amountUsd:
                  oneOf:
                    - type: 'null'
                    - type: string
                source:
                  oneOf:
                    - type: string
                      enum:
                        - unavailable
                    - type: string
                      enum:
                        - estimated
                    - type: string
                      enum:
                        - gateway_reported
                    - type: string
                      enum:
                        - evalgate_computed
                    - type: string
                      enum:
                        - unknown_model
              additionalProperties: false
              required:
                - amountUsd
                - source
            latencyMs:
              type: number
          additionalProperties: false
          required:
            - id
            - status
            - model
            - provider
            - cost
            - latencyMs
        contextDisclosure:
          type: object
          properties:
            resourceCount:
              type: number
            redactedResourceCount:
              type: number
            truncatedResourceCount:
              type: number
            redactionFindings:
              type: array
              items:
                type: string
            warnings:
              type: array
              items:
                type: string
          additionalProperties: false
          required:
            - resourceCount
            - redactedResourceCount
            - truncatedResourceCount
            - redactionFindings
            - warnings
      additionalProperties: false
      required:
        - message
        - proposal
        - modelCall
        - contextDisclosure
    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

````