API DocsGetting Started

Getting Started

Everything you need to integrate this endpoint into your platform.

ReferDock provides a REST API to track referral conversions, manage affiliates, and process payouts. Integrate it into your SaaS in under 15 minutes.

๐Ÿ”‘

API Key

Authenticate with x-api-key header

๐Ÿ“ก

Send Conversions

One POST request per sale

๐Ÿ’ฐ

We Handle the Rest

Tracking, payouts, affiliates

Base URL

Base URL
https://referdock.com

Authentication

All API requests require an API key sent in the x-api-key header. Your API key is found in Dashboard โ†’ Projects โ†’ API Key.

API Key Format
rd_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6
โ”‚  โ”‚
โ”‚  โ””โ”€ 48 hex characters (random)
โ””โ”€ Prefix identifying ReferDock keys
โš ๏ธ
Never expose your API key in client-side code. It should only be used server-side in your backend code when calling ReferDock's API. If a key is compromised, delete the project and create a new one.

Quick Start

Quick Start
# 1. Test your API key (replace with your actual key)
curl -X POST https://referdock.com/api/v1/events/conversion \
  -H "x-api-key: rd_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "orderId": "test-order-001",
    "amount": 29.99,
    "currency": "EUR",
    "referralCode": "MAX10"
  }'

# Expected response:
# {
#   "success": true,
#   "message": "Conversion registered and commission calculated.",
#   "data": { "commissionEarned": 3.00, "status": "PENDING" }
# }
๐Ÿ’ก
Replace rd_your_api_key_here with your actual API key from Dashboard โ†’ Projects โ†’ API Key.