Skip to main content
Welcome to the BaClique Developer API. This guide will help you integrate BaClique’s affiliate tracking into your application.

Prerequisites

  • A PRO plan subscription
  • Access to your BaClique dashboard

Quick Start (5 minutes)

1. Generate an API Key

  1. Go to your Developer Settings
  2. Click “Create API Key”
  3. Give it a name (e.g., “Production”)
  4. Copy the key immediately - you won’t see it again!
Your API key looks like: sk_live_example123456789

2. Make Your First Request

curl https://api.baclique.com/v1/campaigns \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
Response:
{
  "campaigns": [
    // Returns an empty array "[]" if you haven't created any campaigns yet
    {
      "id": "cmp_abc123",
      "name": "Summer Sale",
      "status": "active",
      "type": "CPA",
      "commission_type": "percentage",
      "commission_value": 10,
      "target_url": "https://example.com/summer",
      "created_at": "2024-01-15T10:30:00.000Z"
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1
  }
}

3. Track a Conversion

When a user completes an action (sale, signup, lead, etc.) in your system:
curl -X POST https://api.baclique.com/v1/conversions \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaign_id": "cmp_abc123",
    "affiliate_code": "summer-x7k2",
    "external_id": "ORDER-12345",
    "amount": 99.99,
    "currency": "EUR"
  }'
That’s it! You’re now tracking conversions via the API.

Base URL

All API requests should be made to:
https://api.baclique.com/v1

Authentication

Include your API key in every request:
Authorization: Bearer sk_live_YOUR_API_KEY

Rate Limits

  • 100 requests per minute per API key
  • Exceeding this returns 429 Too Many Requests

Response Format

All responses are JSON with this structure: Success:
{
  "campaigns": [...],
  "pagination": { "limit": 50, "offset": 0, "total": 120 }
}
Error:
{
  "error": "Campaign not found"
}

HTTP Status Codes

CodeMeaning
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - PRO plan required
404Not Found - Resource doesn’t exist
429Too Many Requests - Rate limit exceeded
500Server Error

Next Steps