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

# Delete a Link

> Permanently deletes a short link. This action cannot be undone.



## OpenAPI

````yaml DELETE /v1/links/{short_url}
openapi: 3.0.3
info:
  title: KlipLink API
  description: A RESTful API for managing short links and QR codes.
  version: 1.0.0
servers:
  - url: https://api.klipl.ink
security:
  - bearerAuth: []
paths:
  /v1/links/{short_url}:
    delete:
      summary: Delete a link
      description: Permanently deletes a short link. This action cannot be undone.
      parameters:
        - name: short_url
          in: path
          required: true
          description: >-
            The short URL identifier of the link to delete (e.g.
            `klipl.ink/your-link`).
          schema:
            type: string
          example: klipl.ink/your-link
      responses:
        '200':
          description: Link deleted successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      message:
                        type: string
                        example: Link deleted successfully.
              example:
                success: true
                message: Link deleted successfully.
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl -X DELETE "https://api.klipl.ink/v1/links/klipl.ink/your-link"
            \
              -H "Authorization: Bearer YOUR_API_KEY"
        - lang: python
          label: Python
          source: |
            import requests

            short_url = "klipl.ink/your-link"
            response = requests.delete(
                f"https://api.klipl.ink/v1/links/{short_url}",
                headers={"Authorization": "Bearer YOUR_API_KEY"}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >
            const shortUrl = "klipl.ink/your-link";

            const response = await
            fetch(`https://api.klipl.ink/v1/links/${shortUrl}`, {
              method: "DELETE",
              headers: { "Authorization": "Bearer YOUR_API_KEY" }
            });

            const data = await response.json();

            console.log(data);
        - lang: php
          label: PHP
          source: >
            <?php

            $shortUrl = "klipl.ink/your-link";

            $ch = curl_init("https://api.klipl.ink/v1/links/{$shortUrl}");

            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");

            curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer
            YOUR_API_KEY"]);

            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

            $response = json_decode(curl_exec($ch), true);

            print_r($response);
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````