Get a notification when someone signs up for your app

By Bohdan StefaniukUpdated 8 min read

Tested 2 December 2026 with Express 5 on Node 24, Next.js 16 and Django 6.1 on Python 3.13, sending to the live Ahem API.

To get notified when someone signs up, send one HTTP request to Ahem, an event inbox for developers, from the code that creates the account, after it’s saved: an event with the type user.registered and the new user attached. Your phone buzzes with “New sign-up: Ana Lee”, that person gets a timeline in Ahem, and sign-ups at night arrive silent, waiting for the morning. Send it after the response, with a timeout, so a slow notification never slows a sign-up.

What you need

  • A backend where sign-ups happen. The examples are Express, a Next.js route handler and Django; any language works, since it’s one HTTP request.
  • An Ahem account (the free plan is enough), a project for your app, and an API key for it.
  • The Ahem app on your phone, or browser notifications turned on.

Step by step: a notification for every new user sign-up

  1. Create a project and a key. In Ahem, create a project for your app and an API key for it. Note the project’s address: addresses are unique across Ahem, so yours may be my-app-48213 rather than my-app. The app shows it in the example request next to the key. Put both in your server’s environment:

    AHEM_KEY=ak_live_…
    AHEM_PROJECT=my-app-48213   # your project's address
  2. Add a small helper (Node 18 or later; for Django, skip to the next step):

    // ahem.js: tells Ahem about a new sign-up. An ES module (in a CommonJS project, name it ahem.mjs).
    const TIME_ZONE = 'America/Toronto' // yours: sign-ups between 22:00 and 07:00 here arrive silent
    
    function isNight() {
      const hour = Number(new Intl.DateTimeFormat('en-US', { hour: 'numeric', hourCycle: 'h23', timeZone: TIME_ZONE }).format(new Date()))
      return hour >= 22 || hour < 7
    }
    
    /** Never throws and never takes more than 5 seconds: a notification must not break a sign-up. */
    export async function notifySignup(user) {
      try {
        const response = await fetch(`https://api.useahem.com/v1/channels/${process.env.AHEM_PROJECT}/signups`, {
          method: 'POST',
          headers: {
            Authorization: `Bearer ${process.env.AHEM_KEY}`,
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({
            title: `New sign-up: ${user.name || user.email || user.id}`,
            type: 'user.registered',
            level: 'success',
            user: { id: String(user.id), email: user.email, name: user.name },
            notify: isNight() ? 'silent' : 'default',
          }),
          signal: AbortSignal.timeout(5000),
        })
        if (!response.ok) console.error(`Ahem refused the sign-up event: ${response.status} ${await response.text()}`)
      } catch (error) {
        console.error(`Could not reach Ahem: ${error.message}`)
      }
    }

    The new user goes in user, which files the event under that person in Ahem. It gives up after 5 seconds and never throws, and notify is silent at night in your time zone.

  3. Call it once the user is saved. Not before: a sign-up that fails halfway must not buzz your phone.

    import express from 'express'
    import { notifySignup } from './ahem.js'
    
    const app = express()
    app.use(express.json())
    
    app.post('/signup', async (req, res) => {
      const user = await createUser(req.body) // your code: validate and save the user
      res.status(201).json({ id: user.id })
      notifySignup(user) // after the answer is sent, so the sign-up never waits for it
    })
    
    app.listen(3000)

    In Express the request goes out after res.json(), so the user doesn’t wait for it. In Next.js, after() (stable since Next.js 15.1) does the same, and keeps a serverless function running until the request is done. In Django, a post_savesignal catches every new user, however it was created, and transaction.on_commit waits until the sign-up is saved for good.

  4. Sign up once yourself. Your phone shows “New sign-up: …”, and the person appears under People in Ahem.

Make it quieter: silent at night, loud when it matters

  • Silent at night. The helper sends "notify": "silent" between 22:00 and 07:00 in TIME_ZONE. A silent event is stored like any other and never buzzes. Quiet hours set in the app, which still let errors through, are coming Soon.
  • Loud for the ones that matter. "loud" buzzes even on a channel set to errors only (never on one you switched off), so a big customer gets through while ordinary sign-ups stay quiet:
    notify: user.plan === 'business' ? 'loud' : isNight() ? 'silent' : 'default',
  • Or no buzz at all. Set #signups to Off in the app and add a counter of user.registered for today and this week to the project overview instead.
  • A burst of sign-ups as one notification (“9 new sign-ups” instead of 9 pushes) is coming Soon.

Follow each new user from here

Because the event carries user.id, everything else you send about that person, such as an upgrade, a failed payment or their feedback, lands on the same user timeline. Where they came from fits in properties_once, which fills a detail only the first time (see People in the API reference):

user: {
  id: String(user.id),
  email: user.email,
  name: user.name,
  properties_once: { signed_up_with: 'google', referrer: 'producthunt' },
},

Person details are kept on Maker; on Free they’re accepted and not stored, and the timeline works on every plan.

Troubleshooting

  • Sign-ups got slower. The request is awaited before the answer. Send it after the response, as above. Django’s on_commit still runs inside the request; on a busy site, hand notify_signup to your task queue (Celery, RQ) instead.
  • Nothing arrives from a serverless function. On Vercel or Lambda, a request started without await is cut off when the function returns. Use after() in Next.js, or waitUntil where your platform has it.
  • A notification for a sign-up that failed. The event was sent before the user was saved, or inside a transaction that rolled back. Send it after the insert, and in Django keep on_commit.
  • The log says Ahem refused the sign-up event: 404 … AHEM_PROJECT must be your project’s exact address, and the key must belong to that project. A 401 is a wrong or missing key.
  • Bots signing up all night. Each one is an event. Send the event when the email address is confirmed instead of at sign-up, and the bots stay out of your inbox.

A note on privacy: the title shows on your lock screen, and the email address you send is your user’s personal data, kept in Ahem. Say so in your privacy policy, or send only the id. You can erase a person and all their events in Ahem at any time.

Other ways to do it

  • Email yourself from the sign-up code. Free, and it works until the sign-up emails get lost among the rest.
  • A Slack incoming webhook into a #signups channel. Free and good for a team; a busy channel ends up muted.
  • Your auth service’s webhook. If sign-ups happen in a service such as Clerk or Auth0, use its webhook or post-sign-up hook for new users, and send the same request from there.
  • Product analytics counts sign-ups on a chart, but doesn’t tell you about each one as it happens.
  • A Telegram bot. Free and on your phone, with every app in one chat. See Ahem vs a Telegram bot.

What Ahem adds: sign-ups in their own channel next to payments and errors, silent or loud per event, a counter for the week, and a timeline for every person. For payments, failed jobs and anything else, it’s the same request from any script.

FAQ

Questions

Will it slow down sign-ups?
No. The Express and Next.js examples send the event after the new user has their answer. Django’s on_commit runs at the end of the request, so there a slow answer from Ahem can add about 5 seconds, more if DNS is slow; a task queue avoids that. None of them can make a sign-up fail.
What about sign-ups in the middle of the night?
The examples send them silent between 22:00 and 07:00 in your time zone: they are in the inbox in the morning, and your phone stays quiet.
Can I see what a new user did after signing up?
Yes. Every event you send with the same user.id goes on that person’s timeline in Ahem: sign-up, upgrade, errors, feedback, in order.
Do I have to send the user’s email?
No. Only an id is needed; name and email are optional, and the person’s timeline works with the id alone. Put the name in the title if you don’t send it.
Is it free?
The free plan includes 3,000 events a month: 3,000 sign-ups, if that is all you send.

Hear about the next one.

Create a free project, paste the helper, and your phone buzzes for your next sign-up.