Developer API

REST API for Add2Coin. Base URL: https://add2coin.com/api

🔐 Most endpoints require the user to be authenticated via session cookie (akka_uid). For server-side integrations, use the v1 API with a Bearer token from /api/v1/auth/token.

Public Endpoints No auth required

GET /api/stats.php Platform-wide statistics

Returns live platform stats. Cached for 5 minutes. No authentication required.

Optional parameter: ?ref=REFCODE — returns stats for a specific embedder.

GET https://add2coin.com/api/stats.php Response: { "total_users": 1247, "total_impressions": 84321, "total_a2c_minted": 84321.00, "a2c_price_gbp": 0.000001, "generated_at": "2026-03-31T01:00:00Z" }
GET /api/stats.php?ref=REFCODE Per-embedder statistics

Used by the WordPress and PrestaShop plugins to show an embedder's dashboard stats.

ParameterTypeDescription
refstring requiredYour Add2Coin referral/embedder code

Authenticated Endpoints Session required

GET /api/balance.php User balance + price

Returns the logged-in user's A2C balance, pending earnings, and live price.

GET https://add2coin.com/api/balance.php Cookie: akka_uid=YOUR_SESSION_TOKEN Response: { "confirmed": 247.3891, "pending": 12.40, "total": 259.7891, "total_earned": 312.50, "a2c_price_gbp": 0.000001, "total_value_gbp": 0.0002598 }
GET /api/extension.php Chrome extension data (all-in-one)

Returns all data needed by the Add2Coin Chrome extension in a single request. Includes balance, stats, streak, price, and user info.

GET https://add2coin.com/api/extension.php Cookie: akka_uid=YOUR_SESSION_TOKEN Response: { "user": { "name": "Andrew Akka", "ref_code": "ANDREW1" }, "balance": { "confirmed": 247.39, "pending": 12.40 }, "stats": { "today_earned": 2.40, "streak": 7, "total_views": 143 }, "price": { "gbp": 0.000001 } }
POST /api/impression.php Record an ad impression

Called automatically by earn.js after 10 seconds of visible engagement. Do not call this manually.

ParameterTypeDescription
refstring requiredEmbedder ref code (from earn.js URL)
uidstring optionalWatcher session cookie value

Embedding earn.js

Add one line to any webpage to start earning A2C for you and your visitors:

<script src="https://add2coin.com/earn.js?ref=YOUR_REF_CODE" async defer></script>

Replace YOUR_REF_CODE with your referral code from your dashboard. A2C tokens are minted nightly to everyone who generated impressions that day.

Rate Limits

API calls are rate-limited per IP. Impression endpoints are limited to prevent fraud. If you hit a rate limit you will receive a 429 Too Many Requests response.

Support

For API support or integration questions: contact@add2coin.com