EasyLink

API Documentation

Build integrations with the EasyLink REST API

v1.0 · February 2026

Table of Contents

Authentication

All 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.

POST/api/create_link.php

Create a new short link.

ParameterTypeDescription
urlstring (required)Destination URL
aliasstringCustom short code (3–32 chars)
expire_daysintegerExpiry in days (capped by plan)
// Response
{ "ok": true, "short": "myAlias", "link_id": 42 }

GET/api/list_links.php?limit=10&page=1

List your links with pagination.

POST/api/links/update_url.php

Update destination URL. Body: { "id": 42, "original_url": "https://new.com" }

POST/api/links/reactivate.php

Reactivate expired link with fresh expiry. Body: { "id": 42 }

POST/api/links/bulk.php

Import multiple links from CSV. Body: { "action": "import", "csv_data": "url1\nurl2,alias,30" }

Analytics

GET/api/dashboard_stats.php

Returns: active_links, clicks_24h, clicks_7d, trend_score.

GET/api/analytics/overview.php

24-hour breakdown: OS, browser, device, country, referrer, hourly clicks.

Advanced Features

All use POST/api/links/smart.php with action in JSON body.

ActionParametersDescription
geo_rule_addlink_id, country_code, target_urlCountry-specific redirect
device_rule_addlink_id, device_type, target_urlDevice-specific redirect
set_passwordlink_id, passwordPassword-protect a link
schedule_linklink_id, scheduled_at (unix)Schedule future activation
set_utmlink_id, utm_source/medium/campaign/term/contentAuto-append UTM params
set_oglink_id, og_title/description/image_urlCustom social preview
set_deep_linkslink_id, ios_url, android_url, desktop_urlPlatform routing
set_qr_brandinglink_id, logo_url, fg_color, bg_colorCustom QR style
ab_create_groupnameCreate A/B test group
ab_add_variantgroup_id, link_id, label, weightAdd test variant
link_detailslink_idGet full link config

Extra advanced features via POST/api/links/advanced_extra.php:

ActionParametersDescription
set_click_limitlink_id, click_limit, click_limit_urlAuto-deactivate after N clicks
set_cloakinglink_id, cloak_titleLoad destination in iframe
set_pixellink_id, pixel_codeFire tracking pixel on redirect
set_expiry_alertlink_id, alert_email, alert_daysEmail before link expires
rotator_addlink_id, target_url, weight, labelAdd URL to rotation pool

Campaigns

POST/api/campaigns/manage.php

Actions: list, create, delete, assign_link, stats.

Link-in-Bio

POST/api/bio/manage.php

Actions: list, create, add_link, delete. Pages available at c-t.cv/bio/{slug}.

Health & Fraud

POST/api/health.php

Actions: check_all, check_link, unhealthy.

POST/api/fraud.php

Actions: analyze_link (pass link_id), fraud_overview.

Billing

POST/api/paystack_init.php

Initialize payment. Body: { "plan_id": 3, "interval": "monthly", "currency": "NGN" }

Returns { "authorization_url": "..." } — redirect user to complete payment.

Privacy & GDPR

POST/api/gdpr.php

Actions: my_data (instant JSON), request_export, request_delete, my_requests.

Custom Domains

POST/api/settings/custom_domains.php

Actions: list, add (domain), verify (id), remove (id).

Webhooks

Set https://c-t.cv/api/paystack_webhook.php in Paystack Dashboard → Settings → Webhooks.

Events handled: charge.success, subscription.disable, refund.processed.

Rate Limits

EndpointLimit
Link creation20/minute
Health checks10/minute
Bulk scan1/minute
Contact form3/hour
Domain verify10/minute

Rate-limited responses return HTTP 429 with an error message.