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

# Delete Link

> Update tags or delete a link for the authenticated workspace.



## OpenAPI

````yaml patch /link
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.cme.sh
security:
  - bearerAuth: []
paths:
  /link:
    patch:
      description: Update tags or delete a link for the authenticated workspace.
      requestBody:
        description: Update tags or delete a link for the authenticated workspace.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLinkTags'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Link'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateLinkTags:
      allOf:
        - required:
            - workspaceId
            - linkId
          type: object
          properties:
            workspaceId:
              type: string
              nullable: false
              description: Id of the Workspace
            linkId:
              description: Id of the Link
              type: string
              nullable: false
            tags:
              description: Tags to be updated to a link
              type: array
              items:
                type: string
              nullable: false
              default: []
            deleteLink:
              type: boolean
              nullable: false
              default: false
              description: Delete a link if set to `true`
    Link:
      type: object
      properties:
        _id:
          type: string
          description: >-
            The unique identifier of the link in ObjectId format, similar to
            MongoDB's ObjectId
          pattern: ^[0-9a-fA-F]{24}$
        workspaceId:
          type: string
          description: The ID of the workspace associated with the link
        shortUrl:
          type: string
          description: The shortened URL of the link
        longUrl:
          type: string
          description: The original (long) URL of the link
        linkActive:
          type: boolean
          description: Indicates if the link is active or not
        tags:
          type: array
          items:
            type: string
          description: Tags associated with the link
        totalClicks:
          type: integer
          description: The total number of clicks on the link
        destinationUrlMetaData:
          type: object
          properties:
            author:
              type: string
              description: The author of the destination URL
            description:
              type: string
              description: The description of the destination URL
            image:
              type: string
              description: The image associated with the destination URL
            logo:
              type: string
              description: The logo associated with the destination URL
            publisher:
              type: string
              description: The publisher of the destination URL
            title:
              type: string
              description: The title of the destination URL
            url:
              type: string
              description: The URL of the destination
            metaTags:
              type: string
              description: Meta tags associated with the destination URL
            date:
              type: string
              format: date-time
              description: The date of the destination URL
        createdBy:
          type: string
          description: The ID of the user who created the link
        modifiedBy:
          type: string
          description: The ID of the user who last modified the link
        createdDate:
          type: string
          format: date-time
          description: The date when the link was created
    Error:
      type: object
      properties:
        status:
          type: boolean
          description: Indicates the status of the error response
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code
              errorMessage:
                type: string
                description: Error message
            required:
              - code
              - errorMessage
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````