Skip to main content
GET
https://api.bit2connect.com
/
1.0
/
links
/
{code}
curl -X GET "https://api.bit2connect.com/1.0/links/summer-sale" \
  -H "X-API-KEY: b2co_your_api_key"
{
  "success": true,
  "data": {
    "id": "clp123abc456",
    "code": "summer-sale",
    "shortUrl": "https://b2co.link/summer-sale",
    "originalUrl": "https://yourapp.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": 1247,
    "payload": {
      "link": "https://yourapp.com/products/summer-sale",
      "android": {
        "package": "com.yourapp.android",
        "store_fallback": "https://play.google.com/store/apps/details?id=com.yourapp.android"
      },
      "ios": {
        "bundleId": "com.yourapp.ios",
        "app_store_fallback": "https://apps.apple.com/app/yourapp/id123456789"
      },
      "social": {
        "title": "Summer Sale - Up to 50% Off!",
        "description": "Don't miss our biggest sale of the year",
        "image": "https://yourapp.com/images/summer-sale.jpg"
      },
      "campaign": {
        "utm_source": "api",
        "utm_medium": "dynamic_link",
        "utm_campaign": "summer_sale_2024"
      }
    },
    "projectId": "proj_abc123",
    "createdBy": "user_xyz789",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
}

Request

X-API-KEY
string
required
Your project API key: b2co_your_api_key
code
string
required
The unique short code of the link to retrieve

Response

success
boolean
Indicates if the request was successful
data
object
The link object with detailed information
data.code
string
Unique short code for the link
data.name
string
Display name of the link
data.clickCount
number
Total number of clicks on this link
Complete short URL (e.g., https://b2co.link/abc123)
The original destination URL
data.name
string
Display name of the link
data.status
string
Link status: ACTIVE, PAUSED, EXPIRED, or DELETED
data.qrCode
string
QR code URL for the link
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.payload
object
Complete link configuration payload with platform-specific settings
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
curl -X GET "https://api.bit2connect.com/1.0/links/summer-sale" \
  -H "X-API-KEY: b2co_your_api_key"
{
  "success": true,
  "data": {
    "id": "clp123abc456",
    "code": "summer-sale",
    "shortUrl": "https://b2co.link/summer-sale",
    "originalUrl": "https://yourapp.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": 1247,
    "payload": {
      "link": "https://yourapp.com/products/summer-sale",
      "android": {
        "package": "com.yourapp.android",
        "store_fallback": "https://play.google.com/store/apps/details?id=com.yourapp.android"
      },
      "ios": {
        "bundleId": "com.yourapp.ios",
        "app_store_fallback": "https://apps.apple.com/app/yourapp/id123456789"
      },
      "social": {
        "title": "Summer Sale - Up to 50% Off!",
        "description": "Don't miss our biggest sale of the year",
        "image": "https://yourapp.com/images/summer-sale.jpg"
      },
      "campaign": {
        "utm_source": "api",
        "utm_medium": "dynamic_link",
        "utm_campaign": "summer_sale_2024"
      }
    },
    "projectId": "proj_abc123",
    "createdBy": "user_xyz789",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
}

Error Codes

Link with the specified code does not exist
INVALID_API_KEY
string
API key is missing or invalid
INSUFFICIENT_PERMISSIONS
string
API key does not have access to this link
RATE_LIMIT_EXCEEDED
string
Too many requests, please try again later