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

# Delete Prompt

> Delete a prompt and all its versions

<Warning>
  This action is irreversible. All versions of the prompt will be permanently deleted.
</Warning>

## Request

<ParamField header="Authorization" type="string" required>
  Bearer token with your API key: `Bearer tr_your_api_key`
</ParamField>

<ParamField path="slug" type="string" required>
  The prompt slug to delete
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  `true` if the prompt was successfully deleted
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://app.tracia.io/api/v1/prompts/welcome-email \
    -H "Authorization: Bearer tr_your_api_key"
  ```

  ```typescript SDK theme={null}
  await tracia.prompts.delete('welcome-email');
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true
  }
  ```

  ```json 404 theme={null}
  {
    "code": "NOT_FOUND",
    "message": "Prompt not found: welcome-email"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml DELETE /prompts/{slug}
openapi: 3.1.0
info:
  title: Tracia API
  description: REST API for managing and running AI prompts with tracing
  version: 1.0.0
servers:
  - url: https://app.tracia.io/api/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /prompts/{slug}:
    delete:
      tags:
        - Prompts
      summary: Delete Prompt
      description: Delete a prompt and all its versions
      operationId: deletePrompt
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
          description: The prompt slug to delete
      responses:
        '200':
          description: Prompt deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '404':
          description: Prompt not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code
            message:
              type: string
              description: Error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key starting with `tr_`

````