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

# List links

> Returns links in the authenticated workspace, newest first. Optional `q` matches slug, title, destination, or tags.



## OpenAPI

````yaml /openapi.json get /api/v1/links
openapi: 3.1.0
info:
  title: TrimYourl API
  version: 1.0.0
  description: >-
    Create branded short links, update them, download QR codes, read analytics,
    and credit conversions. Authenticate with a workspace API key from Settings
    → API.
servers:
  - url: https://trimyourl.com
    description: Production
security: []
tags:
  - name: Links
    description: >-
      Create, list, update, and delete short links in the workspace that owns
      the API key.
  - name: Analytics
    description: >-
      Human clicks, bots, devices, geo, and referrers for a workspace or a
      single link.
  - name: Domains
    description: Active short-link hostnames in the workspace.
  - name: QR codes
    description: Download a PNG for an existing link using the workspace QR kit.
  - name: Conversions
    description: >-
      Credit a purchase or sign-up to the short-link click that brought the
      visitor.
paths:
  /api/v1/links:
    get:
      tags:
        - Links
      summary: List links
      description: >-
        Returns links in the authenticated workspace, newest first. Optional `q`
        matches slug, title, destination, or tags.
      operationId: listLinks
      parameters:
        - name: q
          in: query
          required: false
          schema:
            type: string
          description: Search slug, title, destination, or tags.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 30
          description: Page size. Default 30, max 100.
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        '200':
          description: Links in the workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkList'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - bearerAuth: []
components:
  schemas:
    LinkList:
      type: object
      properties:
        workspace:
          type: string
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
    Link:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
          nullable: true
        slug:
          type: string
        shortUrl:
          type: string
          format: uri
        destination:
          type: string
          format: uri
        domain:
          type: string
        folderId:
          type: string
          format: uuid
          nullable: true
        campaignId:
          type: string
          format: uuid
          nullable: true
        tags:
          type: array
          items:
            type: string
        note:
          type: string
          nullable: true
        humanClicks:
          type: integer
        clicks:
          type: integer
        health:
          type: string
        expiresAt:
          type: string
          format: date-time
          nullable: true
        passwordProtected:
          type: boolean
        iosUrl:
          type: string
          nullable: true
        androidUrl:
          type: string
          nullable: true
        fallbackUrl:
          type: string
          nullable: true
        redirectCode:
          type: integer
        utm:
          $ref: '#/components/schemas/Utm'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      example:
        id: 8f3c1a2b-4d5e-6789-abcd-ef0123456789
        title: Spring launch
        slug: spring-launch
        shortUrl: https://go.northwind.com/spring-launch
        destination: https://northwind.com/spring
        domain: go.northwind.com
        folderId: null
        campaignId: null
        tags:
          - launch
          - instagram
        note: null
        humanClicks: 42
        clicks: 50
        health: ok
        expiresAt: null
        passwordProtected: false
        iosUrl: null
        androidUrl: null
        fallbackUrl: null
        redirectCode: 302
        utm:
          source: instagram
          medium: social
          campaign: spring
          term: null
          content: null
          append: true
    Error:
      type: object
      properties:
        error:
          type: string
    Utm:
      type: object
      properties:
        source:
          type: string
          nullable: true
        medium:
          type: string
          nullable: true
        campaign:
          type: string
          nullable: true
        term:
          type: string
          nullable: true
        content:
          type: string
          nullable: true
        append:
          type: boolean
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Workspace API key from Settings → API. Starts with `tyl_`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.