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

# Delete a link

> Delete a link. It stops redirecting immediately but keeps its short code and click history.



## OpenAPI

````yaml DELETE /links/{id}
openapi: 3.0.3
info:
  title: linkutm API
  version: 1.0.0
  description: >-
    REST API for linkutm — short links, UTM tagging, custom domains, folders,
    tags and click analytics.


    Every endpoint documented here is served under
    `https://api.linkutm.com/api/v1`.
servers:
  - url: https://api.linkutm.com/api/v1
    description: Local development
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Links
    description: Create, read, update and delete short links, individually or in bulk.
  - name: Domains
    description: Register and verify the custom domains short links are served from.
  - name: Folders
    description: Group links into folders.
  - name: Tags
    description: Label links and manage which links carry which tag.
  - name: Analytics
    description: Click analytics for the workspace and for individual links.
  - name: Imports
    description: Migrate links in from Short.io, Bitly and Rebrandly.
paths:
  /links/{id}:
    delete:
      tags:
        - Links
      summary: Delete a link
      description: >-
        Delete a link. It stops redirecting immediately but keeps its short code
        and click history.
      operationId: deleteLink
      parameters:
        - name: id
          in: path
          required: true
          description: Link ID.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The deleted link, as it was just before deletion.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Link'
        '400':
          description: The link ID in the path is missing, blank, or is not a valid UUID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 400
                message: Link ID must be a valid UUID
                error: Bad Request
        '401':
          description: Missing, malformed, expired or revoked credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 401
                message: Invalid or expired API key
                error: Unauthorized
        '403':
          description: >-
            Authenticated, but the role, plan or workspace membership does not
            allow this call.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 403
                message: Please upgrade your plan to create more links.
                error: Forbidden
        '404':
          description: The resource does not exist, or belongs to another workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 404
                message: Link not found
                error: Not Found
        '500':
          description: Unexpected server error. Safe to retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 500
                message: Internal server error
components:
  schemas:
    Link:
      type: object
      description: >-
        Full link record as returned by `GET /links/{id}`, `PATCH /links/{id}`,
        `DELETE /links/{id}` and `POST /links/upsert`.


        The stored `password` is a bcrypt hash and is **never** serialised — the
        boolean `hasPassword` is returned in its place.
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
          description: Destination URL.
          example: https://acme.com/pricing
        shortCode:
          type: string
          description: Path segment of the short link.
          example: spring-sale
        title:
          type: string
          nullable: true
          example: Spring campaign
        description:
          type: string
          nullable: true
        utmSource:
          type: string
          nullable: true
          example: newsletter
        utmMedium:
          type: string
          nullable: true
          example: email
        utmCampaign:
          type: string
          nullable: true
          example: spring-2026
        utmTerm:
          type: string
          nullable: true
        utmContent:
          type: string
          nullable: true
        customUtmParams:
          type: object
          nullable: true
          description: Workspace-defined UTM parameters, keyed by parameter code.
          additionalProperties:
            type: string
        hasPassword:
          type: boolean
          description: '`true` when a password gate is set on the link.'
        expiresAt:
          type: string
          description: After this instant the link stops redirecting.
          format: date-time
          nullable: true
        scheduledAt:
          type: string
          description: Before this instant the link does not redirect yet.
          format: date-time
          nullable: true
        schedulingTimezone:
          type: string
          nullable: true
          example: Asia/Kolkata
        fallbackUrl:
          type: string
          description: Used when the link is expired, not yet live, or click-limited.
          nullable: true
        clickLimit:
          type: integer
          nullable: true
          example: 1000
        clicks:
          type: integer
          example: 42
        lastClickAt:
          type: string
          format: date-time
          nullable: true
        iosUrl:
          type: string
          description: Deep link opened for iOS visitors.
          nullable: true
        androidUrl:
          type: string
          description: Deep link opened for Android visitors.
          nullable: true
        geoTargets:
          type: object
          nullable: true
          description: ISO 3166-1 alpha-2 country code to destination URL.
          additionalProperties:
            type: string
          example:
            US: https://acme.com/us
            IN: https://acme.com/in
        geoTargetingEnabled:
          type: boolean
        ogTitle:
          type: string
          nullable: true
        ogDescription:
          type: string
          nullable: true
        ogImage:
          type: string
          description: S3 key or absolute URL of the preview image.
          nullable: true
        favicon:
          type: string
          nullable: true
        comments:
          type: string
          description: Internal note. Never shown to visitors.
          nullable: true
        qrCodeEnabled:
          type: boolean
        qrFgColor:
          type: string
          nullable: true
          example: '#000000'
        qrBgColor:
          type: string
          nullable: true
          example: '#ffffff'
        qrSize:
          type: integer
          nullable: true
          example: 512
        qrDesign:
          type: object
          nullable: true
          additionalProperties: true
        cloakingEnabled:
          type: boolean
          description: Serve the destination inside a frame instead of redirecting.
        archived:
          type: boolean
        isActive:
          type: boolean
        deletedAt:
          type: string
          description: >-
            Set by `DELETE /links/{id}`. Deleted links are never returned by
            list endpoints.
          format: date-time
          nullable: true
        safetyStatus:
          type: string
          description: Result of the destination safety scan.
          example: safe
        safetyCheckedAt:
          type: string
          format: date-time
          nullable: true
        safetyReason:
          type: string
          nullable: true
        folderId:
          type: string
          format: uuid
          nullable: true
        domainId:
          type: string
          format: uuid
          nullable: true
        templateId:
          type: string
          format: uuid
          nullable: true
        workspaceId:
          type: string
          format: uuid
        createdById:
          type: string
          format: uuid
          nullable: true
        updatedById:
          type: string
          format: uuid
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: object
            description: Join row between a link and a tag.
            properties:
              id:
                type: string
                description: ID of the join row, not of the tag.
              tag:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                    example: paid-social
                  color:
                    type: string
                    example: '#f97316'
        pixels:
          type: array
          items:
            type: object
            properties:
              pixelId:
                type: string
        domain:
          type: object
          nullable: true
          properties:
            id:
              type: string
            domain:
              type: string
              example: go.acme.com
            verified:
              type: boolean
    Error:
      type: object
      description: >-
        Standard NestJS error envelope. `message` is a string for exceptions
        thrown by a service, and an array of strings when the global
        ValidationPipe rejects the body.
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          description: Human-readable reason, or a list of field-level validation errors.
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: Link not found
        error:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Workspace API key, sent as `Authorization: Bearer lk_live_…`.'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Dashboard session token from `POST /auth/login`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.