Skip to content
howmuchusers.wtf
Sign in

Docs

One HTTP call. Two kinds of key, and the difference between them is the whole reason the numbers here mean anything.

Two keys, two permissions

hmu_pk_live_…

Public key — browser-safe. Page views, sessions and your own custom events. It cannot create users, by design.

hmu_sk_live_…

Secret key — server only. Creating and deleting users, imports, subscription events.

Sending events

One event, or up to 100 at a time. A bad event never takes down the batch: you get back what was accepted and exactly what was wrong with each rejection.

POST /v1/events
curl -X POST https://howmuchusers.wtf/api/v1/events \
  -H "Authorization: Bearer $HMU_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event":"user.created","user_id":"usr_123","created_at":"2026-08-08T20:00:00Z"}'
Node / Next.js
// HowMuchUsers — desde tu servidor (Node, Next.js, cualquier backend).
// La clave secreta vive en el entorno. NUNCA en el código del navegador.
async function hmuUserCreated(user) {
  await fetch("https://howmuchusers.wtf/api/v1/events", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${process.env.HMU_SECRET_KEY}`,
    },
    body: JSON.stringify({
      event: "user.created",
      user_id: user.id,          // un id estable. No mandes emails ni nombres.
      created_at: user.createdAt, // ISO 8601
    }),
  });
}

Importing your history

Users you had before installing us. They're marked as imported forever: they count toward your total, they're disclosed on your public profile, and they don't count toward growth rankings.

POST /v1/users/import
# Los usuarios que ya tenías. Quedan marcados como importados: suman a tu
# total, pero no a los rankings de crecimiento. Hasta 1.000 por pedido.
curl -X POST https://howmuchusers.wtf/api/v1/users/import \
  -H "Authorization: Bearer $HMU_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"users":[
        {"user_id":"usr_1","created_at":"2025-11-03"},
        {"user_id":"usr_2","created_at":"2025-11-04"}
      ]}'

Checking it works

Same header, no body. Returns live: true once your first event has arrived.

GET /v1/status
curl https://howmuchusers.wtf/api/v1/status \
  -H "Authorization: Bearer $HMU_SECRET_KEY"

Badges and counters

No key needed — they only draw what you chose to publish. The embed code, with the attribution link, is in your project's Developers tab.

SVG
<img src="https://howmuchusers.wtf/api/badge/tu-startup.svg?theme=dark&lang=en" alt="" height="44" />