> ## 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.

# Get All Links

> Returns a list of all short links for the authenticated user.



## OpenAPI

````yaml GET /v1/links
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:
    get:
      summary: Retrieve all links
      description: Returns a list of all short links for the authenticated user.
      responses:
        '200':
          description: List of links
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      links:
                        type: array
                        items:
                          $ref: '#/components/schemas/Link'
              example:
                success: true
                links:
                  - short_url: https://klipl.ink/your-link
                    destination_url: https://example.com/
                    clicks: 255
                    created_at: '2025-11-06T14:30:00.000Z'
                    title: Example Link
                  - short_url: https://link.your-domain.com/custom-link
                    destination_url: https://example.com/page
                    clicks: 128
                    created_at: '2025-11-05T10:15:00.000Z'
                    title: Custom Domain Link
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |
            curl -X GET "https://api.klipl.ink/v1/links" \
              -H "Authorization: Bearer YOUR_API_KEY"
        - lang: python
          label: Python
          source: |
            import requests

            response = requests.get(
                "https://api.klipl.ink/v1/links",
                headers={"Authorization": "Bearer YOUR_API_KEY"}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: |
            const response = await fetch("https://api.klipl.ink/v1/links", {
              headers: { "Authorization": "Bearer YOUR_API_KEY" }
            });
            const data = await response.json();
            console.log(data);
        - lang: php
          label: PHP
          source: >
            <?php

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

            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
    Link:
      type: object
      properties:
        short_url:
          type: string
          example: https://klipl.ink/your-link
        destination_url:
          type: string
          example: https://example.com/
        clicks:
          type: integer
          example: 255
        created_at:
          type: string
          format: date-time
          example: '2025-11-06T14:30:00.000Z'
        title:
          type: string
          example: Example Link
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````