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

# Retrieve all Bitsy Links

> Retrieve all Bitsy Links



## OpenAPI

````yaml GET /links
openapi: 3.0.1
info:
  title: OpenAPI BitsyLink Store
  description: >-
    A sample API that uses a BitsyLink store as an example to demonstrate
    features in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bsy.sh/v1
security:
  - bearerAuth: []
paths:
  /links:
    get:
      description: Retrieve all Bitsy Links
      parameters:
        - name: title
          in: query
          required: false
          description: Title of the link, optional.
          schema:
            type: string
            maxLength: 150
        - name: tag
          in: query
          required: false
          description: Tag of the link, optional.
          schema:
            type: string
            maxLength: 150
        - name: is_clicked
          in: query
          required: false
          description: Indicates if the link has been clicked.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
        - name: has_password
          in: query
          required: false
          description: Indicates if a password is required to access the link.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
        - name: start_date
          in: query
          required: false
          description: Start date for filtering links. Must be in 'YYYY-MM-DD' format.
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: end_date
          in: query
          required: false
          description: End date for filtering links. Must be in 'YYYY-MM-DD' format.
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: offset
          in: query
          required: false
          description: Offset for pagination.
          schema:
            type: string
            pattern: ^\d+$
        - name: limit
          in: query
          required: false
          description: Limit for pagination.
          schema:
            type: string
            pattern: ^\d+$
      responses:
        '200':
          description: A list of Bitsy Links
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllBitsyLinkSuccess'
        '401':
          description: Authorization Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationError'
        '403':
          description: Permission Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionError'
        '422':
          description: Request Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultServerError'
components:
  schemas:
    GetAllBitsyLinkSuccess:
      required:
        - status
        - data
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        data:
          type: object
          properties:
            links:
              type: array
              items:
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The ID of the Bitsy Link.
                  long_url:
                    type: string
                    format: uri
                    description: The long URL that the shortened link will redirect to.
                  title:
                    type: string
                    maxLength: 150
                    description: Title of the link, up to 150 characters.
                  favicon:
                    type: string
                    description: URL of the favicon for the link.
                  custom_link:
                    type: string
                    minLength: 3
                    maxLength: 50
                    description: Custom slug for the link, between 3 and 50 characters.
                  tags:
                    type: array
                    items:
                      type: string
                      minLength: 1
                    description: Array of tags associated with the link.
                  has_utm:
                    type: boolean
                    description: Indicates if UTM parameters are used.
                  has_opengraph:
                    type: boolean
                    description: Indicates if OpenGraph metadata is included.
                  has_android_targeting:
                    type: boolean
                    description: Indicates if there is a target URL for Android.
                  android_target_url:
                    type: string
                    description: Target URL for Android devices.
                  has_ios_targeting:
                    type: boolean
                    description: Indicates if there is a target URL for iOS.
                  ios_target_url:
                    type: string
                    description: Target URL for iOS devices.
                  has_windows_targeting:
                    type: boolean
                    description: Indicates if there is a target URL for Windows.
                  windows_target_url:
                    type: string
                    description: Target URL for Windows devices.
                  has_linux_targeting:
                    type: boolean
                    description: Indicates if there is a target URL for Linux.
                  linux_target_url:
                    type: string
                    description: Target URL for Linux devices.
                  has_geo_targeting:
                    type: boolean
                    description: Indicates if geo-targeting is used.
                  has_cloaking:
                    type: boolean
                    description: Indicates if cloaking is enabled.
                  has_password:
                    type: boolean
                    description: Indicates if a password is required to access the link.
                  password_logo:
                    type: string
                    description: URL of the logo to display on the password prompt.
                  has_expiration:
                    type: boolean
                    description: >-
                      Indicates if the link has an expiration date or expiration
                      clicks.
                  expiration:
                    type: string
                    format: date-time
                    description: Expiration date for the link in ISO 8601 format.
                  expiration_clicks:
                    type: string
                    description: Maximum number of clicks before the link expires.
                  is_expired:
                    type: boolean
                    description: >-
                      Indicates whether the shortened URL has expired and is no
                      longer valid.
                  is_clicked:
                    type: boolean
                    description: >-
                      Indicates whether the shortened URL has been clicked at
                      least once.
                  last_clicked:
                    type: string
                    format: date-time
                    description: >-
                      The timestamp of the last time the shortened URL was
                      clicked.
                  created_at:
                    type: string
                    format: date-time
                    description: The timestamp indicating when the Bitsy Link was created.
                  bitsy_url:
                    type: string
                    format: uri
                    description: The shortened URL generated for the Bitsy Link.
                  custom_url:
                    type: string
                    format: uri
                    description: >-
                      The custom URL provided for the shortened link, if
                      applicable.
                  utm:
                    type: object
                    properties:
                      utm_source:
                        type: string
                        maxLength: 200
                        description: UTM source for tracking.
                      utm_medium:
                        type: string
                        maxLength: 200
                        description: UTM medium for tracking.
                      utm_campaign:
                        type: string
                        maxLength: 200
                        description: UTM campaign for tracking.
                      utm_term:
                        type: string
                        maxLength: 200
                        description: UTM term for paid search.
                      utm_content:
                        type: string
                        maxLength: 200
                        description: UTM content for differentiating ads.
                  opengraph:
                    type: object
                    properties:
                      meta_title:
                        type: string
                        maxLength: 150
                        description: Meta title for the link, up to 150 characters.
                      meta_description:
                        type: string
                        maxLength: 250
                        description: Meta description for the link, up to 250 characters.
                      meta_image:
                        type: string
                        description: URL of the image to use for the link's metadata.
                  geo_targets:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: The ID of the geo target.
                        target_url:
                          type: string
                          format: uri
                          description: Target URL for the specified country.
                        country:
                          type: object
                          properties:
                            iso2:
                              type: string
                              description: Two-letter country code (ISO 3166-1 alpha-2).
                            name:
                              type: string
                              description: Name of country with flag emoji.
                    description: Array of geo-targeting rules.
                  shareable_analytics:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: The ID of the shareable analytics.
                        start_date:
                          type: string
                          format: date
                          description: The date indicating the start of the analytics.
                        end_date:
                          type: string
                          format: date
                          description: The date indicating the end of the analytics.
                        created_at:
                          type: string
                          format: date-time
                          description: >-
                            The timestamp indicating when the shareable link was
                            created.
                        share_url:
                          type: string
                          format: uri
                          description: >-
                            A URL that can be shared to allow others to access
                            the Bitsy analytics.
                        has_password:
                          type: boolean
                          description: >-
                            Indicates if a password is required to access the
                            link.
    AuthorizationError:
      required:
        - status
        - message
      type: object
      properties:
        status:
          type: string
          enum:
            - failure
          description: Indicates the status of the authorization.
        message:
          type: string
          description: >-
            A message providing additional details about the authorization
            error.
    PermissionError:
      required:
        - status
        - message
      type: object
      properties:
        status:
          type: string
          enum:
            - failure
          description: Indicates the status of the authorization.
        message:
          type: string
          description: >-
            A message providing additional details about the authorization
            error.
    ValidationError:
      required:
        - status
        - message
        - errors
      type: object
      properties:
        status:
          type: string
          enum:
            - failure
          description: Indicates the status of the validation.
        message:
          type: string
          description: A message providing additional details about the validation error.
        errors:
          type: object
          properties:
            formErrors:
              type: array
              items:
                type: string
              description: List of form-level errors.
            fieldErrors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
              description: >-
                Object containing field-specific errors, where keys are field
                names and values are arrays of error messages.
          description: Detailed error information regarding validation failures.
    DefaultServerError:
      required:
        - status
        - message
      type: object
      properties:
        status:
          type: string
          enum:
            - error
          description: Indicates the status of the error.
        message:
          type: string
          description: A message providing additional details about the default error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````