IPTrace Console API Keys

IPTrace Console — API documentation

All endpoints accept JSON. Session tokens are short-lived and returned when you sign in; API keys are long-lived and recommended for scripts.

Authentication

Endpoints

MethodPathAuthPurpose
POST/console/verifyproof-of-work challengeSign in with username/password or a token; returns a session token.
GET/console/mesession tokenCurrent account, verification status, and usage stats.
GET/console/confirm?token=tokenRedeem a verification link and mark the account verified.
POST/console/confirmsession token + challengeGenerate a fresh verification link.
GET/POST/console/keyssession tokenList or create API keys (verified accounts only).
DELETE/console/keys/:idsession tokenRevoke an API key.
GET/console/api/v1/infosession or API keyAccount info plus link/click totals.
GET/console/api/v1/linkssession or API keyYour links with redirect targets and click counts.

Verification

Signups on the application receive a verification link. Open it in this console to confirm your account, or generate a fresh one from the dashboard when logged in. Verified accounts are the ones allowed to create API keys.

Security and anti-abuse

Examples

// create an API key
const res = await fetch('https://console-iptracker.pages.dev/console/keys', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer ' + sessionToken,
  },
  body: JSON.stringify({ name: 'my script' }),
})
const { data } = await res.json()
console.log(data.token) // ipt_... (shown once)
// call the API with that key
const r = await fetch('https://console-iptracker.pages.dev/console/api/v1/links', {
  headers: { 'X-API-Key': 'ipt_...' },
})
const { data } = await r.json()