Skip to content

An API for sending push notifications: rent the last mile or build it

Your monitor already knows the condition. What it lacks is a phone at the other end.

3 min read

An API for sending push notifications is the shortest path from a script you already trust to the phone in your pocket. If a monitor or a cron job already knows when something breaks, one HTTPS POST closes the gap. AyePing exists for that last step, and the fair question is whether you should build it yourself.

What your monitor already has

Most monitors, from a shell script to a hosted page watcher, can call a URL when a condition matches. What they lack is delivery: a receiving app, a stored device credential and a service that pushes a message to it. That last mile is worth renting before you write it. The AyePing documentation shows the whole contract in one page.

The whole integration, in three steps

  1. Open the Tokens page in the AyePing app and create one token per script.
  2. Save it as AYEPING_TOKEN in the environment or a CI secret.
  3. POST to https://ayeping.com/@username with the token in an Authorization header.
curl https://ayeping.com/@you \
  -H "Authorization: Bearer $AYEPING_TOKEN" \
  -d "Price page changed: 3 lines differ"

The receiving app already exists for iPhone and Android. Plain text becomes the title; JSON adds a message of up to 2,000 characters and a colored label.

Build versus buy, plainly

Route What you maintain Who receives it
Your own app with APNs and FCM The app, store listings, keys, device tokens, retries Your users
Web push in a browser A service worker, a permission prompt, subscription storage Visitors who allow it
A ping API such as AyePing One POST and a token You, or whoever owns the token
Email to yourself An SMTP path and an inbox you read You, eventually

The first two rows are products in their own right. They make sense when the notification belongs to an audience you serve, and they are a poor use of a Tuesday when the only person who needs the alert wrote the script.

When building wins

Build it if recipients need their own settings, if a notification should carry buttons that call back into your system, or if you must report delivery data to someone. None of those features appear in the AyePing docs. A tool that messages its owner is not a notification platform for your customers.

When renting wins

Rent it when the alert is for you and the script has to work today. AyePing also keeps the sender small: a token can send pings to its owner and do nothing else, so a leak in one repository exposes nothing beyond that inbox.

Avoid the double ping

Send an Idempotency-Key header when a job might retry. The same key and token return the first ping's id instead of delivering and charging a second one. A value such as deploy-2026-11-19-api is enough.

Watch the hourly ceiling too. Each token allows 1 to 3,600 requests an hour, 60 by default. A check that runs every minute is exactly 60, so a busy script should raise its limit or send only on failure. When the allowance runs out the API answers 402 quota_exhausted and sends one push a day about it.

What it costs

As of November 2026, Free gives you 5 pings to try with 3 tokens and no card. Hobby is $8 a month, or $49 a year, shown as $4.08 a month, with 120,000 pings. Pro is $20 a month, or $120 a year, shown as $10 a month, with 1,200,000 pings. Unused pings do not carry over.

FAQ

Can a token notify a teammate?

No. A token sends pings to its owner. A teammate needs an account and a token of their own, which also keeps one person's alerts off another person's phone.

What if the network drops mid-request?

Retry with the same Idempotency-Key. If the first request arrived, the retry returns its id and is not delivered again. If it never arrived, the retry sends the ping.

Do I need a server?

No. Anything that can make an HTTPS request works, including a laptop or the machine that already runs your cron job.

FAQ

Can a token notify a teammate?

No. An AyePing token sends pings to its owner. A teammate needs an account and a token of their own, which also keeps one person's alerts off another person's phone.

What if the network drops mid-request?

Retry with the same Idempotency-Key. If the first request arrived, the retry returns its id and is not delivered again.

Do I need a server?

No. Anything that can make an HTTPS request works, including the machine that already runs your cron job.

Originally published on claudegpt.si