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

# Delete run template

> Delete a run template.

Templates with active scheduled runs cannot be deleted.
Disable or delete associated scheduled runs first.




## OpenAPI

````yaml /api-reference/v1/run-templates-v1.yaml delete /run-templates/{run_template_id}
openapi: 3.0.3
info:
  title: Coval Run Templates API
  version: 1.0.0
  description: >
    Create and manage reusable run configurations for automated evaluations.


    Run templates define what to run (agent, persona, test set, metrics) and how
    to run it

    (iterations, concurrency, sampling). Use templates with Scheduled Runs to
    automate recurring evaluations.
  contact:
    name: Coval API Support
    email: support@coval.dev
    url: https://docs.coval.ai
  license:
    name: Proprietary
    url: https://coval.dev/terms
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Run Templates
    description: CRUD operations for reusable run configurations
paths:
  /run-templates/{run_template_id}:
    delete:
      tags:
        - Run Templates
      summary: Delete run template
      description: |
        Delete a run template.

        Templates with active scheduled runs cannot be deleted.
        Disable or delete associated scheduled runs first.
      operationId: deleteRunTemplate
      parameters:
        - name: run_template_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9]{22}$
          description: Run template resource ID
          example: abc123def456ghi789jklm
      responses:
        '204':
          description: Run template deleted successfully
        '400':
          description: Missing run_template_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Run template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  $ref: '#/components/examples/RunTemplateNotFoundError'
        '409':
          description: Template has active scheduled runs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                conflict:
                  $ref: '#/components/examples/TemplateHasSchedulesError'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
              enum:
                - INVALID_ARGUMENT
                - UNAUTHENTICATED
                - NOT_FOUND
                - CONFLICT
                - INTERNAL
              example: INVALID_ARGUMENT
            message:
              type: string
              description: Human-readable error message
              example: Invalid request parameter
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    nullable: true
                    description: Field that caused the error
                    example: agent_id
                  description:
                    type: string
                    description: Detailed error description
                    example: Agent not found or not accessible
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: X-API-Key
                  description: Invalid or missing API key
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
              details:
                - description: An unexpected error occurred
  examples:
    RunTemplateNotFoundError:
      summary: Run template not found
      value:
        error:
          code: NOT_FOUND
          message: Template not found
          details:
            - field: run_template_id
              description: Run template not found or not accessible by your organization
    TemplateHasSchedulesError:
      summary: Cannot delete - template has active schedules
      value:
        error:
          code: CONFLICT
          message: Cannot delete template
          details:
            - description: >-
                Template has 2 active scheduled runs. Disable or delete them
                first.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````