Skip to main content
Dynamic links in Bit2Connect use unique codes within each project to ensure reliable routing and prevent conflicts.

Code Requirements

Format Rules:
  • Length: 3-50 characters
  • Allowed: letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_)
  • Case sensitive: MyCode and mycode are different codes
  • Must be unique within your project

Code Validation Workflow

Before creating a link with a custom code, follow this recommended workflow:
1

Check Code Availability

Use the Check Code Availability endpoint to verify if your desired code is available.
GET /1.0/links/check/my-custom-code
2

Handle Availability Response

  • If available: true → Proceed with link creation
  • If available: false → Choose a different code or let the system generate one
3

Create Link

Use the validated code in your Create Link request.
{
  "code": "my-custom-code",
  "payload": { ... }
}

Auto-Generated Codes

If you don’t specify a custom code, Bit2Connect automatically generates a unique code:
  • Format: Random alphanumeric string (8-12 characters)
  • Uniqueness: Guaranteed unique across the entire platform
  • Examples: abc12345, xyz789mn, def456gh
Dynamic links have different status states that affect their behavior:

Status Types

ACTIVE

Link is live and routing traffic normally

PAUSED

Link is temporarily disabled, returns 404 to users

EXPIRED

Link has passed its expiration date, automatically paused

DELETED

Link is soft-deleted, not returned by API calls

Status Transitions

Expired Links: You cannot reactivate a link that has passed its expiresAt date. The system automatically sets expired links to EXPIRED status.
The payload defines how your dynamic link behaves across different platforms:

Required Fields

{
  "payload": {
    "link": "https://example.com/destination"  // Required: Primary destination
  }
}

Platform-Specific Routing

"android": {
  "package": "com.example.app",
  "store_fallback": "https://play.google.com/store/apps/details?id=com.example.app",
  "min_version": "1.2.0"
}
  • With App: Opens directly in your Android app
  • Without App: Redirects to Play Store
  • Version Check: Ensures minimum app version compatibility

Analytics & Tracking

UTM Parameters

Add campaign tracking to measure marketing performance:
"campaign": {
  "utm_source": "newsletter",
  "utm_medium": "email",
  "utm_campaign": "summer_sale_2024",
  "utm_term": "mobile_app",
  "utm_content": "cta_button"
}

Click Analytics

Every dynamic link automatically tracks:
  • Click Count: Total number of clicks
  • Platform Distribution: iOS vs Android vs Desktop
  • Geographic Data: Country-level click distribution
  • Referrer Information: Traffic source analysis
Performance Monitoring: Use the Get Link endpoint to retrieve detailed analytics for any link.

Best Practices

Code Naming Conventions

Campaign Links

summer-sale-2024, black-friday-email, social-promo-q1

Product Links

product-123, category-electronics, featured-item-abc

Content Links

blog-post-seo, tutorial-video-1, whitepaper-download

Event Links

webinar-signup, conference-2024, workshop-registration

Security Considerations

  • API Key Protection: Never expose API keys in client-side code
  • Code Predictability: Avoid sequential or predictable code patterns
  • Expiration Dates: Set appropriate expiration for time-sensitive campaigns
  • Regular Audits: Periodically review and clean up unused links

Performance Optimization

  • Batch Operations: Use pagination when retrieving large link lists
  • Caching: Cache link data on your side to reduce API calls
  • Rate Limiting: Respect the 1000 requests/hour limit
  • Error Handling: Implement proper retry logic for failed requests
Production Deployment: Always test your dynamic links across different devices and platforms before launching campaigns.