Docs/API Reference

REST API Reference

Complete documentation for the Wee-Kit SDK API. Create deep links and handle attribution from your server.

Authentication

The Wee-Kit API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard under App Settings.

Important: Keep your API Secret secure. Never expose it in client-side code or public repositories.

Required Headers

HeaderDescription
X-API-KeyYour public API key (starts with dk_live_ or dk_test_)
X-API-SecretYour secret API key (starts with sk_live_ or sk_test_)
Content-Typeapplication/json for all POST requests
curl -X POST https://api.wee-kit.app/api/v1/sdk/links \
-H "X-API-Key: dk_live_your_api_key" \
-H "X-API-Secret: sk_live_your_api_secret" \
-H "Content-Type: application/json" \
-d '{"title": "My Link", "deepPath": "/products/123"}'

Base URL

All API requests should be made to:

https://api.wee-kit.app/api/v1

Errors

The API uses standard HTTP status codes to indicate success or failure.

StatusDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid API Key
403Forbidden - Invalid API Secret
409Conflict - Resource already exists (e.g., duplicate shortCode)
500Internal Server Error

Error Response Format

{
"statusCode": 400,
"error": "Bad Request",
"message": "Validation failed",
"details": [
{ "field": "deepPath", "message": "Deep path must start with /" }
]
}
POST

/sdk/attribution

Check for deferred deep link attribution. Call this when your app launches to get the link data for users who installed via a deep link.

Request Body

ParameterTypeRequiredDescription
bundleIdstringYesApp bundle identifier (max 255 chars)
sdkVersionstringYesSDK version string (max 20 chars)
fingerprintobjectYesDevice fingerprint for matching
fingerprint.ipHashstringYesHashed IP address
fingerprint.userAgentstringYesUser agent string (max 1000 chars)
fingerprint.languagestringYesDevice language code (max 20 chars)
fingerprint.screenWidthnumberNoScreen width in pixels
fingerprint.screenHeightnumberNoScreen height in pixels
fingerprint.timezonestringNoTimezone identifier (max 50 chars)
deviceIdstringNoUnique device identifier (max 100 chars)
debugbooleanNoReturn debug information (candidates, scores)

Example Request (all parameters)

curl -X POST https://api.wee-kit.app/api/v1/sdk/attribution \
-H "X-API-Key: dk_live_your_api_key" \
-H "X-API-Secret: sk_live_your_api_secret" \
-H "Content-Type: application/json" \
-d '{
"bundleId": "com.yourapp.ios",
"sdkVersion": "1.0.0",
"deviceId": "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE",
"debug": false,
"fingerprint": {
"ipHash": "a1b2c3d4e5f6g7h8i9j0",
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15",
"language": "en",
"screenWidth": 390,
"screenHeight": 844,
"timezone": "America/New_York"
}
}'

Response (Match Found)

200 OK
{
"matched": true,
"link": {
"deepPath": "/products/123",
"title": "Summer Sale",
"shortCode": "abc123",
"customData": {
"productId": "123",
"discount": "20%"
},
"utmParams": {
"source": "email",
"medium": "newsletter",
"campaign": "summer_sale"
}
},
"matchConfidence": 0.95,
"clickTimestamp": "2026-03-11T10:25:00.000Z",
"timeToAttribution": 300
}

Response (No Match)

200 OK
{
"matched": false
}
POST

/sdk/install

Track app installation. Call this on first app launch to register the device and get SDK configuration.

Request Body

ParameterTypeRequiredDescription
deviceIdstringYesUnique device identifier (max 255 chars)
platformstringYesios or android
bundleIdstringYesApp bundle identifier (max 255 chars)
sdkVersionstringYesSDK version string (max 20 chars)
osVersionstringNoOS version (max 50 chars)
deviceModelstringNoDevice model name (max 100 chars)
appVersionstringNoYour app version (max 50 chars)

Example Request (all parameters)

curl -X POST https://api.wee-kit.app/api/v1/sdk/install \
-H "X-API-Key: dk_live_your_api_key" \
-H "X-API-Secret: sk_live_your_api_secret" \
-H "Content-Type: application/json" \
-d '{
"deviceId": "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE",
"platform": "ios",
"bundleId": "com.yourapp.ios",
"sdkVersion": "1.0.0",
"osVersion": "17.0",
"deviceModel": "iPhone 15 Pro",
"appVersion": "2.1.0"
}'

Response

200 OK
{
"success": true,
"isNewInstall": true,
"config": {
"enabled": true,
"plan": "pro",
"features": {
"deepLinks": true,
"deferredDeepLinks": true,
"analytics": true
}
}
}