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

# Retrieve short link details

> Retrieves details of a shortened link using its alias.



## OpenAPI

````yaml GET /links/{alias}
openapi: 3.0.1
info:
  title: iShortn API
  description: >-
    This is the API documentation for the iShortn API. This API is used to
    shorten URLs.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://ishortn.ink/api/v1
    description: Production server
security: []
paths:
  /links/{alias}:
    get:
      summary: Retrieve link details
      description: Retrieves details of a shortened link using its alias.
      operationId: getLinkDetails
      parameters:
        - $ref: '#/components/parameters/AliasPath'
        - $ref: '#/components/parameters/DomainQuery'
      responses:
        '200':
          description: Link details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkDetails'
              example:
                shortLink: https://ishortn.ink/customAlias
                url: https://example.com
                alias: customAlias
                expiresAt: '2024-12-31T23:59:59Z'
                expiresAfter: 1000
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - apiKeyAuth: []
components:
  parameters:
    AliasPath:
      name: alias
      in: path
      required: true
      schema:
        type: string
      description: The alias of the shortened link.
    DomainQuery:
      name: domain
      in: query
      required: false
      schema:
        type: string
      description: >-
        The domain of the shortened link. If not provided, the default domain
        will be used.
  schemas:
    LinkDetails:
      type: object
      properties:
        shortLink:
          type: string
          description: The shortened link.
        url:
          type: string
          description: The original URL.
        alias:
          type: string
          description: The alias of the shortened link.
        expiresAt:
          type: string
          format: date-time
          nullable: true
          description: The expiration date and time of the link.
        expiresAfter:
          type: integer
          nullable: true
          description: The number of clicks after which the link expires.
        isProtected:
          type: boolean
          description: >-
            Indicates if the link is password protected (relevant for creation
            response).
  responses:
    BadRequest:
      description: Bad Request (e.g., invalid input, missing parameter, alias collision)
      content:
        application/json:
          schema:
            type: string
    Unauthorized:
      description: Unauthorized (e.g., invalid or missing API key)
      content:
        application/json:
          schema:
            type: string
          example: Invalid or missing API key
    NotFound:
      description: Not Found (e.g., link with the given alias/domain does not exist)
      content:
        application/json:
          schema:
            type: string
          example: Link not found
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````