Skip to main content

Overview

Retrieve a paginated list of all dynamic links in your project. This endpoint supports filtering by status, searching by name or code, and sorting options to help you manage large collections of links efficiently.

Endpoint

GET https://api.bit2connect.com/1.0/links

Query Parameters

For detailed information about all query parameters and filtering options, see the List Links API Reference.

Example Request

curl -X GET "https://api.bit2connect.com/1.0/links?page=1&limit=10&status=active&search=campaign" \
  -H "X-API-KEY: b2co_your_api_key_here"

Response

Success Response

{
  "success": true,
  "data": [
    {
      "id": "clp123abc456",
      "code": "summer-sale",
      "shortUrl": "https://b2co.link/summer-sale",
      "originalUrl": "https://example.com/products/summer-sale",
      "name": "Summer Sale Campaign",
      "status": "ACTIVE",
      "qrCode": "https://b2co.link/summer-sale/qr",
      "createdAt": "2024-01-15T10:30:00Z",
      "expiresAt": "2024-12-31T23:59:59Z",
      "clickCount": 127
    },
    {
      "id": "clp789def012",
      "code": "winter-promo",
      "shortUrl": "https://b2co.link/winter-promo",
      "originalUrl": "https://example.com/products/winter-promo",
      "name": "Winter Promotion",
      "status": "ACTIVE",
      "qrCode": "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://b2co.link/winter-promo",
      "createdAt": "2024-01-10T14:20:00Z",
      "expiresAt": null,
      "clickCount": 89
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 25,
    "totalPages": 3
  },
  "timestamp": "2024-01-15T10:30:00Z"
}

Error Response

{
  "success": false,
  "error": {
    "code": "INVALID_PARAMETERS",
    "message": "Invalid page number or limit"
  }
}
For detailed response fields, error codes, and filtering examples, see the List Links API Reference.

Next Steps