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

# Regrade a simulation

> Grade a completed simulation again with its original grader selection and recorded evidence. Later grader settings do not apply. Send no body, then follow gradingState with Get a simulation.



## OpenAPI

````yaml openapi.json POST /v1/simulations/{simulationId}/regrade
openapi: 3.1.0
info:
  title: Egma Platform API
  version: 1.0.0
  description: >-
    The customer-facing HTTP interface used by Egma's web app, CLI, and outside
    clients.
servers:
  - url: https://app.egma.ai
security: []
paths:
  /v1/simulations/{simulationId}/regrade:
    post:
      tags:
        - Simulations
      summary: Regrade a simulation
      description: >-
        Grade a completed simulation again with its original grader selection
        and recorded evidence. Later grader settings do not apply. Send no body,
        then follow gradingState with Get a simulation.
      operationId: regradeSimulation
      parameters:
        - name: simulationId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            description: Simulation ID returned by List simulations in a run.
            examples:
              - sim_01M0E4J0BBE1FVDVTZ1BSS5C97
        - name: projectId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: >-
            The grading request was accepted. The response does not wait for new
            grades.
          content:
            application/json:
              schema:
                type: object
                properties:
                  simulationId:
                    type: string
                    minLength: 1
                    description: The simulation whose existing trace will be graded.
                  reopened:
                    type: integer
                    description: >-
                      1 if an existing finished grading job was reopened; 0
                      otherwise. A newly created job can also return 0.
                  alreadyWaiting:
                    type: integer
                    description: >-
                      1 if grading was already pending or claimed, so no
                      duplicate job was created; 0 otherwise.
                required:
                  - simulationId
                  - reopened
                  - alreadyWaiting
                additionalProperties: false
                examples:
                  - simulationId: sim_01M0E4J0BBE1FVDVTZ1BSS5C97
                    reopened: 1
                    alreadyWaiting: 0
        '400':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '401':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '403':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '404':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '409':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '422':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '429':
          description: The request rate limit was reached.
          headers:
            Retry-After:
              description: Seconds to wait before trying again.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
      security:
        - bearerAuth: []
        - sessionCookie: []
components:
  schemas:
    Refusal:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
      required:
        - error
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Egma API key.
    sessionCookie:
      type: apiKey
      in: cookie
      name: egma.session_token
      description: >-
        The browser session cookie issued by Egma. HTTPS deployments add the
        standard __Secure- prefix.

````