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

# Retrieve a link

> Retrieve a link's complete safe configuration and aggregate performance data.

Retrieve one short link from the workspace bound to your API key. Pass the
public `biq_lnk_...` ID returned when you created or listed the link.

## Authentication and permission

Send a workspace API key with **Links: Read** (`links.view`). That permission is
enough to read the link configuration and its aggregate click, lead, sales, and
revenue values. You do not need a separate analytics permission.

```http theme={null}
Authorization: Bearer biqli_your_workspace_api_key
Accept: application/json
```

You do not send a workspace ID. The API key determines the workspace, and the
endpoint never falls back to an internal numeric link ID.

## Request

```bash theme={null}
curl --request GET \
  --url https://biq.li/api/v1/link/biq_lnk_01M14D2M8VFKYQCE7Z3A6HRXWP \
  --header 'Authorization: Bearer biqli_your_workspace_api_key' \
  --header 'Accept: application/json'
```

| Path parameter | Type             | Description                                |
| -------------- | ---------------- | ------------------------------------------ |
| `link`         | string, required | Public link ID with the `biq_lnk_` prefix. |

## Response

The endpoint returns the same complete link resource used by create and update,
plus current aggregate performance values.

```json theme={null}
{
  "link": {
    "id": "biq_lnk_01M14D2M8VFKYQCE7Z3A6HRXWP",
    "external_id": "campaign-link-1842",
    "short_url": "https://go.example.com/summer-product",
    "long_url": "https://example.com/product",
    "name": "Summer campaign",
    "domain_id": "biq_dom_01M14C6KQ6SG2GKMCV7HQ9A1QT",
    "alias": "summer-product",
    "active": true,
    "has_password": true,
    "activates_at": null,
    "expires_at": null,
    "exp_clicks_rule": null,
    "utm": "source=newsletter&medium=email&campaign=summer",
    "geo_rules": [
      {"key": "us", "value": "https://example.com/us/product"}
    ],
    "device_rules": [],
    "platform_rules": [],
    "folder_ids": ["biq_fld_01M14C93RJD7W46PFJX9B1TVYH"],
    "pixel_ids": ["biq_pxl_01M14CBJNRXPW4Y22ZTA7F9W3J"],
    "tag_ids": ["biq_tag_01M14CC1TW7AQ6DWZG9TMRH0PQ"],
    "conversion_tracking_enabled": true,
    "allow_search_engine_indexing": false,
    "proxy": true,
    "title": "Summer sale",
    "description": "Explore the summer collection.",
    "image": "https://cdn.example.com/previews/summer.jpg",
    "qr_code": {
      "url": "https://biq.li/storage/workspaces/biq_ws_example/qr-codes/link.svg",
      "format": "svg",
      "logo": "app"
    },
    "clicks_count": 2841,
    "leads_count": 93,
    "sales_count": 27,
    "revenue": 4148.5,
    "revenue_currency": "USD",
    "clicked_at": "2026-08-29T10:42:11+00:00",
    "safety_status": "clear",
    "created_at": "2026-08-28T16:42:19+00:00",
    "updated_at": "2026-08-29T09:20:03+00:00"
  },
  "status": "success"
}
```

### Configuration fields

| Field                                           | Meaning                                                                                        |
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `id`, `external_id`                             | Biqli's public link ID and your optional workspace-unique ID.                                  |
| `short_url`, `long_url`                         | Redirect URL and primary destination.                                                          |
| `domain_id`, `alias`                            | Public custom-domain ID and short alias.                                                       |
| `active`, `safety_status`                       | Requested active state and current safety state. Pending or quarantined links do not redirect. |
| `has_password`                                  | Whether password protection is enabled. The password is never returned.                        |
| `activates_at`, `expires_at`, `exp_clicks_rule` | Time- and click-based availability controls.                                                   |
| `utm`                                           | Stored UTM query string.                                                                       |
| `geo_rules`, `device_rules`, `platform_rules`   | Dynamic destination overrides.                                                                 |
| `folder_ids`, `pixel_ids`, `tag_ids`            | Public IDs of attached workspace resources.                                                    |
| `conversion_tracking_enabled`                   | Whether Biqli appends a click ID for conversion attribution.                                   |
| `allow_search_engine_indexing`                  | Whether search engines may index the short-link page.                                          |
| `proxy`, `title`, `description`, `image`        | Custom social-preview configuration.                                                           |
| `qr_code`                                       | Attached QR URL, format, and logo mode, or `null`.                                             |

### Performance fields

| Field              | Meaning                                                            |
| ------------------ | ------------------------------------------------------------------ |
| `clicks_count`     | Total recorded link clicks.                                        |
| `leads_count`      | Total lead conversion events attributed to the link.               |
| `sales_count`      | Total sale conversion events attributed to the link.               |
| `revenue`          | Sum of attributed sales normalized to USD.                         |
| `revenue_currency` | Always `USD` for the normalized `revenue` value.                   |
| `clicked_at`       | Most recent recorded click time, or `null` before the first click. |

All date-time values use ISO 8601. Nullable settings are returned as `null`,
and unattached resource lists are returned as empty arrays.

## Errors

| HTTP status | Error code              | Meaning                                                                   |
| ----------- | ----------------------- | ------------------------------------------------------------------------- |
| `401`       | `invalid_token`         | The API key is missing, invalid, malformed, or revoked.                   |
| `403`       | `insufficient_scope`    | The key lacks `links.view` or its user lost workspace access.             |
| `404`       | `resource_not_found`    | The public link ID is invalid, deleted, or unavailable in this workspace. |
| `429`       | `rate_limit_exceeded`   | The workspace exceeded its API request limit.                             |
| `500`       | `internal_server_error` | An unexpected server error occurred.                                      |

Errors include an `error` object and a traceable `request_id`. The same request
ID is returned in the `X-Biq-Request-Id` response header.

## Shared API behavior

Authentication is workspace-scoped; see [Authentication](/docs/api-reference/authentication). Errors use the standard envelope and request IDs described in [Errors](/docs/api-reference/errors), and requests are subject to [Rate limits](/docs/api-reference/rate-limits).


## OpenAPI

````yaml GET /v1/link/{link}
openapi: 3.1.0
info:
  title: Biqli API
  version: 1.0.0
  description: Workspace-scoped REST API for Biqli.
servers:
  - url: https://biq.li/api
security:
  - bearerAuth: []
paths:
  /v1/link/{link}:
    get:
      tags:
        - Links
      summary: Retrieve a link
      description: >-
        Returns the complete safe link configuration and aggregate click, lead,
        sales, and USD revenue data. Requires links.view.
      operationId: link.show
      parameters:
        - name: link
          in: path
          required: true
          description: Public link ID.
          schema:
            type: string
            pattern: ^biq_lnk_[0-9A-HJKMNP-TV-Z]{26}$
      responses:
        '200':
          description: Link returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    LinkResponse:
      type: object
      required:
        - link
        - status
      properties:
        link:
          $ref: '#/components/schemas/CreatedLink'
        status:
          type: string
          const: success
    CreatedLink:
      type: object
      required:
        - id
        - external_id
        - short_url
        - long_url
        - name
        - domain_id
        - alias
        - active
        - has_password
        - activates_at
        - expires_at
        - exp_clicks_rule
        - utm
        - folder_ids
        - pixel_ids
        - tag_ids
        - conversion_tracking_enabled
        - allow_search_engine_indexing
        - proxy
        - title
        - description
        - image
        - qr_code
        - geo_rules
        - device_rules
        - platform_rules
        - clicks_count
        - leads_count
        - sales_count
        - revenue
        - revenue_currency
        - clicked_at
        - safety_status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Public link ID. Internal numeric IDs are never returned.
          pattern: ^biq_lnk_[0-9A-HJKMNP-TV-Z]{26}$
        external_id:
          type:
            - string
            - 'null'
          description: Caller-controlled identifier, unique within the workspace.
        short_url:
          type: string
          format: uri
        long_url:
          type: string
        name:
          type:
            - string
            - 'null'
        domain_id:
          type:
            - string
            - 'null'
          pattern: ^biq_dom_[0-9A-HJKMNP-TV-Z]{26}$
        alias:
          type:
            - string
            - 'null'
        active:
          type: boolean
        has_password:
          type: boolean
        activates_at:
          type:
            - string
            - 'null'
          format: date-time
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
        exp_clicks_rule:
          oneOf:
            - $ref: '#/components/schemas/ClickExpirationRule'
            - type: 'null'
        utm:
          type:
            - string
            - 'null'
        geo_rules:
          type: array
          items:
            $ref: '#/components/schemas/TargetingRule'
        device_rules:
          type: array
          items:
            $ref: '#/components/schemas/TargetingRule'
        platform_rules:
          type: array
          items:
            $ref: '#/components/schemas/TargetingRule'
        folder_ids:
          type: array
          items:
            type: string
        pixel_ids:
          type: array
          items:
            type: string
        tag_ids:
          type: array
          items:
            type: string
        conversion_tracking_enabled:
          type: boolean
        allow_search_engine_indexing:
          type: boolean
        proxy:
          type: boolean
        title:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        image:
          type:
            - string
            - 'null'
        qr_code:
          oneOf:
            - $ref: '#/components/schemas/AttachedQrCode'
            - type: 'null'
        clicks_count:
          type: integer
          minimum: 0
          description: Total recorded clicks.
        leads_count:
          type: integer
          minimum: 0
          description: Total attributed lead events.
        sales_count:
          type: integer
          minimum: 0
          description: Total attributed sale events.
        revenue:
          type: number
          minimum: 0
          description: Attributed sales amount normalized to USD.
        revenue_currency:
          type: string
          const: USD
        clicked_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Time of the most recent recorded click.
        safety_status:
          type: string
          enum:
            - clear
            - pending
            - quarantined
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ApiError:
      type: object
      required:
        - error
        - request_id
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - invalid_token
                - insufficient_scope
                - upgrade_required
                - quota_exceeded
                - resource_not_found
                - domain_taken
                - alias_taken
                - external_id_taken
                - folder_name_taken
                - tag_name_taken
                - pixel_name_taken
                - biolink_name_taken
                - method_not_allowed
                - url_blocked
                - dns_verification_failed
                - validation_error
                - rate_limit_exceeded
                - internal_server_error
            message:
              type: string
            details:
              type: object
              additionalProperties: true
        request_id:
          type: string
          description: Request identifier to include when contacting support.
    ClickExpirationRule:
      type: object
      additionalProperties: false
      required:
        - key
      properties:
        key:
          type: integer
          minimum: 1
          description: Number of clicks after which the link expires.
        value:
          type:
            - string
            - 'null'
          description: Optional URL to use after the click threshold is reached.
          maxLength: 1000
    TargetingRule:
      type: object
      additionalProperties: false
      required:
        - key
        - value
      properties:
        key:
          type: string
          description: Match value, such as a country code, device, or platform.
          maxLength: 250
        value:
          type: string
          description: Destination URL used when the rule matches.
          maxLength: 1000
    AttachedQrCode:
      type: object
      required:
        - url
        - format
        - logo
      properties:
        url:
          type: string
          format: uri
        format:
          type: string
          const: svg
        logo:
          type: string
          enum:
            - app
            - none
  responses:
    Unauthorized:
      $ref: '#/components/responses/ApiErrorResponse'
      description: The workspace API key is missing, invalid, or revoked.
    Forbidden:
      $ref: '#/components/responses/ApiErrorResponse'
      description: >-
        The key lacks a required scope, the workspace must upgrade, or its quota
        is exhausted.
    NotFound:
      $ref: '#/components/responses/ApiErrorResponse'
      description: >-
        The requested resource or referenced public ID is unavailable in the
        key's workspace.
    RateLimited:
      description: The workspace exceeded its plan's API rate limit.
      headers:
        RateLimit-Policy:
          description: Current IETF HTTPAPI quota policy as a structured field.
          schema:
            type: string
            example: '"workspace-api";q=1000;w=60'
        RateLimit:
          description: Current IETF HTTPAPI service limit as a structured field.
          schema:
            type: string
            example: '"workspace-api";r=0;t=17'
        Retry-After:
          description: Seconds to wait before retrying the request.
          schema:
            type: integer
            minimum: 0
            example: 17
        X-RateLimit-Limit:
          description: Legacy maximum request count for the current window.
          schema:
            type: integer
            minimum: 1
            example: 1000
        X-RateLimit-Remaining:
          description: Legacy remaining request count.
          schema:
            type: integer
            minimum: 0
            example: 0
        X-RateLimit-Reset:
          description: Legacy reset time as a UTC Unix timestamp.
          schema:
            type: integer
            format: int64
            example: 1788126519
        X-Biq-Request-Id:
          description: Request identifier for support and tracing.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      $ref: '#/components/responses/ApiErrorResponse'
      description: The request failed unexpectedly.
    ApiErrorResponse:
      description: API error.
      headers:
        X-Biq-Request-Id:
          description: Request identifier for support and tracing.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Workspace API key
      description: A workspace API key beginning with biqli_.

````