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

> Returns a list of all custom domains associated with the authenticated user's account.



## OpenAPI

````yaml GET /v1/domains
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/domains:
    get:
      summary: Retrieve user domains
      description: >-
        Returns a list of all custom domains associated with the authenticated
        user's account.
      responses:
        '200':
          description: List of domains
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      domains:
                        type: array
                        items:
                          $ref: '#/components/schemas/Domain'
              example:
                success: true
                domains:
                  - domain: go.example.com
                    subdomain: go
                    root_domain: example.com
                    created_at: '2025-06-14T17:15:50.000Z'
                  - domain: link.your-website.com
                    subdomain: link
                    root_domain: your-website.com
                    created_at: '2025-05-10T09:30:00.000Z'
        '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/domains" \
              -H "Authorization: Bearer YOUR_API_KEY"
        - lang: python
          label: Python
          source: |
            import requests

            response = requests.get(
                "https://api.klipl.ink/v1/domains",
                headers={"Authorization": "Bearer YOUR_API_KEY"}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: |
            const response = await fetch("https://api.klipl.ink/v1/domains", {
              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/domains");

            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
    Domain:
      type: object
      properties:
        domain:
          type: string
          example: go.example.com
        subdomain:
          type: string
          example: go
        root_domain:
          type: string
          example: example.com
        created_at:
          type: string
          format: date-time
          example: '2025-06-14T17:15:50.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````