Build integrations with the EasyLink REST API
v1.0 · February 2026All requests require authentication via session cookie. Include credentials: "include" in fetch calls.
// Check current user fetch("/api/whoami.php", { credentials: "include" })
Response format: { "ok": true, ... } on success, { "ok": false, "error": "message" } on failure.
Create a new short link.
| Parameter | Type | Description |
|---|---|---|
url | string (required) | Destination URL |
alias | string | Custom short code (3–32 chars) |
expire_days | integer | Expiry in days (capped by plan) |
// Response { "ok": true, "short": "myAlias", "link_id": 42 }
List your links with pagination.
Update destination URL. Body: { "id": 42, "original_url": "https://new.com" }
Reactivate expired link with fresh expiry. Body: { "id": 42 }
Import multiple links from CSV. Body: { "action": "import", "csv_data": "url1\nurl2,alias,30" }
Returns: active_links, clicks_24h, clicks_7d, trend_score.
24-hour breakdown: OS, browser, device, country, referrer, hourly clicks.
All use POST/api/links/smart.php with action in JSON body.
| Action | Parameters | Description |
|---|---|---|
geo_rule_add | link_id, country_code, target_url | Country-specific redirect |
device_rule_add | link_id, device_type, target_url | Device-specific redirect |
set_password | link_id, password | Password-protect a link |
schedule_link | link_id, scheduled_at (unix) | Schedule future activation |
set_utm | link_id, utm_source/medium/campaign/term/content | Auto-append UTM params |
set_og | link_id, og_title/description/image_url | Custom social preview |
set_deep_links | link_id, ios_url, android_url, desktop_url | Platform routing |
set_qr_branding | link_id, logo_url, fg_color, bg_color | Custom QR style |
ab_create_group | name | Create A/B test group |
ab_add_variant | group_id, link_id, label, weight | Add test variant |
link_details | link_id | Get full link config |
Extra advanced features via POST/api/links/advanced_extra.php:
| Action | Parameters | Description |
|---|---|---|
set_click_limit | link_id, click_limit, click_limit_url | Auto-deactivate after N clicks |
set_cloaking | link_id, cloak_title | Load destination in iframe |
set_pixel | link_id, pixel_code | Fire tracking pixel on redirect |
set_expiry_alert | link_id, alert_email, alert_days | Email before link expires |
rotator_add | link_id, target_url, weight, label | Add URL to rotation pool |
POST/api/campaigns/manage.php
Actions: list, create, delete, assign_link, stats.
POST/api/bio/manage.php
Actions: list, create, add_link, delete. Pages available at c-t.cv/bio/{slug}.
Actions: check_all, check_link, unhealthy.
Actions: analyze_link (pass link_id), fraud_overview.
Initialize payment. Body: { "plan_id": 3, "interval": "monthly", "currency": "NGN" }
Returns { "authorization_url": "..." } — redirect user to complete payment.
POST/api/gdpr.php
Actions: my_data (instant JSON), request_export, request_delete, my_requests.
POST/api/settings/custom_domains.php
Actions: list, add (domain), verify (id), remove (id).
Set https://c-t.cv/api/paystack_webhook.php in Paystack Dashboard → Settings → Webhooks.
Events handled: charge.success, subscription.disable, refund.processed.
| Endpoint | Limit |
|---|---|
| Link creation | 20/minute |
| Health checks | 10/minute |
| Bulk scan | 1/minute |
| Contact form | 3/hour |
| Domain verify | 10/minute |
Rate-limited responses return HTTP 429 with an error message.