CloakMe API Reference

Programmatic access to intelligent traffic routing

The CloakMe API allows developers to create, manage, and analyze redirect links with advanced bot detection and traffic filtering built in. Your links automatically block bots, email scanners, VPNs, and ad reviewers — routing real humans to your offer URL while sending filtered traffic to your white URL.

Base URL https://api.cloakme.ru/api/developer
Auth header X-API-Key: your_api_key_here
Content-Type application/json

Authentication

All API requests must include your API key in the X-API-Key header. You can find your API key in the dashboard under Settings → API Key.

# Using X-API-Key header (recommended) curl https://api.cloakme.ru/api/developer/me \ -H "X-API-Key: YOUR_API_KEY" # Using Authorization Bearer curl https://api.cloakme.ru/api/developer/me \ -H "Authorization: Bearer YOUR_API_KEY"
Security notice: Your API key grants full access to your account. Never expose it in client-side code or public repositories. Rotate it immediately if compromised.

Base URL

The API is available at:

https://api.cloakme.ru/api/developer

All responses are JSON. Timestamps are ISO 8601 UTC.

Rate Limits

Requests are rate-limited per API key. If you exceed a limit you will receive a 429 Too Many Requests response.

Endpoint Limit
All API endpoints 60 requests / minute per API key
POST /links 10 requests / minute
GET /links/{id}/stats 30 requests / minute

Rate limit response headers

Every API response includes the following headers:

X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1705312800

429 response body

{ "detail": "Rate limit exceeded. Retry after 12 seconds." }

Errors

CloakMe uses standard HTTP status codes. All error responses include a human-readable detail field.

{ "detail": "Human-readable error message" }
Status Meaning
200 OK Request succeeded
201 Created Resource created successfully
400 Bad Request Invalid parameters or malformed request body
401 Unauthorized Missing or invalid API key
403 Forbidden Insufficient permissions for this resource
404 Not Found Resource does not exist
422 Unprocessable Entity Request body failed validation
429 Too Many Requests Rate limit exceeded
500 Internal Server Error An unexpected error occurred on our end

Get Account

GET /api/developer/me

Returns your account information, API key, and current plan usage. Use this endpoint to check remaining click quota and campaign limits.

200 Response
{ "id": 42, "email": "you@example.com", "username": "yourname", "api_key": "9026dadd46d019...", "is_active": true, "created_at": "2024-01-01T00:00:00Z", "usage": { "plan": "starter", "plan_display": "Starter", "clicks_used": 8432, "clicks_limit": 25000, "clicks_remaining": 16568, "usage_pct": 33.7, "campaign_limit": 5 } }
curl https://api.cloakme.ru/api/developer/me \ -H "X-API-Key: YOUR_API_KEY"
import requests account = requests.get( "https://api.cloakme.ru/api/developer/me", headers={"X-API-Key": "YOUR_API_KEY"} ).json() usage = account["usage"] print(f"{usage['clicks_used']:,} / {usage['clicks_limit']:,} clicks used")
const account = await fetch("https://api.cloakme.ru/api/developer/me", { headers: { "X-API-Key": "YOUR_API_KEY" } }).then(r => r.json()); const { clicks_used, clicks_limit } = account.usage; console.log(`${clicks_used.toLocaleString()} / ${clicks_limit.toLocaleString()} clicks used`);

Direct Redirect

GET /go/{token}

Browser redirect endpoint. Use the redirect_url returned by the API as the link you share with end users — it points to this endpoint. No authentication is required.

How it works

  1. The visitor's IP, user-agent, and referrer are evaluated against your link's filters
  2. If they pass all checks (real human): 302 redirect to your offer_url via the JS challenge gate
  3. If they are filtered (bot, scanner, VPN, bad country, etc.): 302 redirect to your white_url

Example

https://cloakme.ru/go/E0DcgZAboh5K0cUz_o3a7

This URL is safe to embed in email campaigns, paid ads, SMS, or any channel where bots and ad reviewers may follow your links before real users do.

No authentication needed. This is the public-facing redirect URL. The token uniquely identifies which link to use — keep your offer_url private; only share the redirect_url.

Ready to start?

Get your API key and start building in minutes.

Get your API key →