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

# Delete Template

> Permanently delete an template. Only the owner of the template may perform this action. Associated share records and favorite entries are removed as part of the deletion.



## OpenAPI

````yaml api-reference/openapi/templates.json DELETE /api/agents/templates/{id}
openapi: 3.1.0
info:
  title: Recoup API - Templates
  description: >-
    API documentation for managing reusable templates on the Recoup platform.
    Templates capture a prompt, description, and tags that can be shared with
    other accounts or kept private.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security:
  - apiKeyAuth: []
  - bearerAuth: []
paths:
  /api/agents/templates/{id}:
    delete:
      summary: Delete a template
      description: >-
        Permanently delete an template. Only the owner of the template may
        perform this action. Associated share records and favorite entries are
        removed as part of the deletion.
      parameters:
        - name: id
          in: path
          description: The unique identifier (UUID) of the template to delete
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Template deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '401':
          description: Unauthorized - missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - the authenticated account does not own this template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    SuccessResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - success
          description: Status of the request
    ErrorResponse:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: string
          enum:
            - error
          description: Status of the request
        error:
          type: string
          description: Human-readable error message
        missing_fields:
          type: array
          items:
            type: string
          description: >-
            Names of required fields that were missing from the request, when
            applicable
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).
    bearerAuth:
      type: http
      scheme: bearer

````