Skip to main content
GET
https://api.bit2connect.com
/
1.0
/
links
curl -X GET "https://api.bit2connect.com/1.0/links?page=1&pageSize=20" \
  -H "X-API-KEY: b2co_your_api_key"
{
  "success": true,
  "data": [
    {
      "id": "clp123abc456",
      "code": "summer-sale",
      "shortUrl": "https://b2co.link/summer-sale",
      "name": "Summer Sale Campaign",
      "status": "ACTIVE",
      "qrCode": "https://b2co.link/summer-sale/qr",
      "payload": {
        "link": "https://example.com/summer-sale",
        "android": {
          "package": "com.example.app",
          "store_fallback": "https://play.google.com/store/apps/details?id=com.example.app"
        },
        "ios": {
          "bundleId": "com.example.app",
          "app_store_fallback": "https://apps.apple.com/app/example-app/id123456789"
        },
        "social": {
          "title": "Summer Sale - Up to 50% Off!",
          "description": "Don't miss our biggest sale of the year",
          "image": "https://example.com/images/summer-sale.jpg"
        },
        "campaign": {
          "utm_source": "api",
          "utm_medium": "dynamic_link",
          "utm_campaign": "summer_sale_2024"
        }
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "expiresAt": "2024-12-31T23:59:59Z",
      "clickCount": 1247,
      "qrCode": "https://b2co.link/summer-sale/qr",
      "projectId": "proj_abc123",
      "createdBy": "user_xyz789",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 20,
    "total": 45,
    "totalPages": 3
  }
}

Request

X-API-KEY
string
required
Your project API key: b2co_your_api_key
page
number
default:"1"
Page number for pagination (starts from 1)
pageSize
number
default:"50"
Number of links per page (maximum 100)

Response

success
boolean
Indicates if the request was successful
data
array
Array of link objects with complete payload structure
data[].id
string
Unique identifier for the link
data[].code
string
Unique short code for the link
data[].shortUrl
string
Complete short URL (e.g., https://b2co.link/abc123)
data[].name
string
Display name of the link
data[].status
string
Link status: ACTIVE, PAUSED, or EXPIRED
data[].payload
object
Complete link configuration payload
Primary destination URL
data[].payload.android
object
Android-specific configuration (optional)
data[].payload.ios
object
iOS-specific configuration (optional)
data[].payload.social
object
Social media preview configuration (optional)
data[].id
string
Unique identifier for the link
data[].code
string
Unique short code for the link
data[].shortUrl
string
Complete short URL (e.g., https://b2co.link/abc123)
data[].name
string
Display name of the link
data[].status
string
Link status: ACTIVE, PAUSED, or EXPIRED
data[].qrCode
string
QR code URL for the link
data[].payload
object
Complete link configuration payload
Primary destination URL
data[].payload.android
object
Android-specific configuration (optional)
data[].payload.ios
object
iOS-specific configuration (optional)
data[].payload.social
object
Social media preview configuration (optional)
data[].payload.campaign
object
UTM campaign parameters (optional)
data[].createdAt
string
ISO 8601 timestamp when created
data[].expiresAt
string
ISO 8601 timestamp when expires (if set)
data[].clickCount
number
Total number of clicks on this link
data[].projectId
string
ID of the project this link belongs to
data[].createdBy
string
ID of the user who created the link
data[].updatedAt
string
ISO 8601 timestamp when last updated
pagination
object
Pagination metadata
pagination.page
number
Current page number
pagination.pageSize
number
Number of items per page
pagination.total
number
Total number of links
pagination.totalPages
number
Total number of pages
curl -X GET "https://api.bit2connect.com/1.0/links?page=1&pageSize=20" \
  -H "X-API-KEY: b2co_your_api_key"
{
  "success": true,
  "data": [
    {
      "id": "clp123abc456",
      "code": "summer-sale",
      "shortUrl": "https://b2co.link/summer-sale",
      "name": "Summer Sale Campaign",
      "status": "ACTIVE",
      "qrCode": "https://b2co.link/summer-sale/qr",
      "payload": {
        "link": "https://example.com/summer-sale",
        "android": {
          "package": "com.example.app",
          "store_fallback": "https://play.google.com/store/apps/details?id=com.example.app"
        },
        "ios": {
          "bundleId": "com.example.app",
          "app_store_fallback": "https://apps.apple.com/app/example-app/id123456789"
        },
        "social": {
          "title": "Summer Sale - Up to 50% Off!",
          "description": "Don't miss our biggest sale of the year",
          "image": "https://example.com/images/summer-sale.jpg"
        },
        "campaign": {
          "utm_source": "api",
          "utm_medium": "dynamic_link",
          "utm_campaign": "summer_sale_2024"
        }
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "expiresAt": "2024-12-31T23:59:59Z",
      "clickCount": 1247,
      "qrCode": "https://b2co.link/summer-sale/qr",
      "projectId": "proj_abc123",
      "createdBy": "user_xyz789",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 20,
    "total": 45,
    "totalPages": 3
  }
}

Error Codes

INVALID_PARAMETERS
string
Invalid query parameters provided
INVALID_API_KEY
string
API key is missing or invalid
RATE_LIMIT_EXCEEDED
string
Too many requests, please try again later