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

# Delete short link

> Permanently delete short link and all associated data.

**Deleted:** Short link, destination, routing rules, QR code, meta tags, analytics data
**Updated:** Folder/tag/domain counts decremented automatically
**Note:** This operation cannot be undone



## OpenAPI

````yaml https://api.h0p.co/doc delete /short-link/{id}
openapi: 3.0.0
info:
  version: 0.0.3
  title: h0p API
  description: >-
    # h0p URL Shortener API


    A modern, feature-rich URL shortener API with advanced analytics, custom
    domains, QR codes, and comprehensive link management capabilities.


    ## Features


    - 🔗 **Short Link Management**: Create, update, and delete short links with
    custom slugs

    - 🌐 **Custom Domains**: Use your own domains with DNS verification and deep
    linking support

    - 📊 **Analytics**: Detailed click tracking with geolocation, device, and
    referrer data

    - 🎨 **QR Codes**: Generate customizable QR codes with branding options

    - 🏷️ **Organization**: Folders and tags for better link organization

    - 🔐 **Security**: Password protection, expiration dates, and click limits

    - 🎯 **Smart Rules**: Geographic, language, and device-based routing

    - 🪝 **Webhooks**: Real-time notifications for link events

    - 🔑 **API Keys**: Programmatic access with granular permissions

    - ⚡ **Rate Limiting**: Built-in protection against abuse


    ## Authentication


    This API supports two authentication methods:


    1. **Session Authentication**: Cookie-based authentication for web
    applications

    2. **API Key Authentication**: Header-based authentication for programmatic
    access


    See the security schemes section below for implementation details.


    ## Rate Limits


    - Free plan: 10 short links, 1 custom domain, 3 tags

    - Premium plan: unlimited short links, 100 custom domains, 100 tags, 100
    folders, advanced features


    ## Support


    For questions, feature requests, or bug reports, please contact
    support@h0p.co
  termsOfService: https://h0p.co/terms
  contact:
    name: h0p Support
    email: contact@h0p.co
servers:
  - url: https://api.h0p.co
    description: Production API server
security: []
tags:
  - name: Domain
    description: >-
      Custom domain management with DNS verification, QR templates, and deep
      linking support
  - name: Short Link
    description: >-
      Create and manage short links with advanced features like smart routing,
      password protection, and custom QR codes
  - name: Folder
    description: >-
      Organize short links into folders for better management and statistics
      tracking
  - name: Tag
    description: Categorize and filter short links using customizable tags
  - name: Files
    description: Upload images for QR codes, meta tags, and organization branding
  - name: Statistics
    description: >-
      Access detailed analytics grouped by geographic, device, and traffic
      dimensions
paths:
  /short-link/{id}:
    delete:
      tags:
        - Short Link
      summary: Delete short link
      description: >-
        Permanently delete short link and all associated data.


        **Deleted:** Short link, destination, routing rules, QR code, meta tags,
        analytics data

        **Updated:** Folder/tag/domain counts decremented automatically

        **Note:** This operation cannot be undone
      parameters:
        - schema:
            type: string
            format: uuid
            example: 01933eb8-541f-7000-a9f4-e4eee80ff04e
            description: Unique identifier in UUID v7 format
          required: true
          description: Unique identifier in UUID v7 format
          name: id
          in: path
      responses:
        '200':
          description: Resource successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  rowCount:
                    type: number
                    nullable: true
                    example: 1
                    description: Number of rows affected by the delete operation
        '403':
          description: >-
            Forbidden - Missing required permission. Check your API key
            permissions or organization role.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - ACTION_NOT_ALLOWED
                    description: Error code for permission denied
                  message:
                    type: string
                    example: You do not have permission to delete domains
                    description: Detailed explanation of the permission issue
                  resource:
                    type: string
                    example: domains
                    description: The resource type that was accessed
                  action:
                    type: string
                    example: delete
                    description: The action that was attempted
                required:
                  - code
                  - message
              example:
                code: ACTION_NOT_ALLOWED
                message: You do not have permission to delete domains
                resource: domains
                action: delete
        '404':
          description: >-
            Resource not found - The requested resource does not exist or you do
            not have access to it
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - NOT_FOUND
                    description: Error code indicating the requested resource was not found
                required:
                  - code
              example:
                code: NOT_FOUND
      security:
        - ApiKey: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API Key authentication for programmatic access.


        **How to use:**

        1. Create an API key from your dashboard settings

        2. Include the key in the `x-api-key` header with each request

        3. API keys have granular permissions (domains, shortLinks, files,
        stats, apiKeys)


        **Example:**

        ```

        curl -H "x-api-key: your-api-key-here"
        https://api.h0p.co/short-link/list

        ```


        **Types of API keys:**

        - **User keys**: Linked to your user account (one per organization)

        - **Bot keys**: Autonomous machine users (one per organization)


        **Security notes:**

        - Keep your API keys secure and never commit them to version control

        - API keys cannot access authentication endpoints (/auth/*)

        - Keys can be revoked at any time from the dashboard

````