How it works
NFME gets a notification onto the phone of one of your users, and a tap on it opens a page on your own website. Your users install one app, NFME. Your system talks to our API. There is no SDK to install and you never handle device tokens.
- Link. Your system asks the API for a link code for one of your users, and your site shows it to that user as a button or QR code. They open it with the NFME app. From then on NFME knows which phone belongs to your user id.
- Send. Your system posts a notification for that user id: a title, an optional line of text, and a link to your site. It goes to every phone the user has linked.
- Open. The user taps the notification and your page opens in the phone’s browser.
| Basics | |
|---|---|
Base URL | https://api.nfme.app |
Format | JSON in and out, UTF-8. Field names are camelCase. |
Times | ISO 8601 in UTC, for example 2026-12-01T10:15:00Z. |
User ids | externalUserId is your own id for the user, as a string of up to 200 characters. NFME never learns a name, e-mail address or phone number. |
Quick start
From nothing to a notification on your own phone:
- Add and verify your domain. A notification can only link to a domain you have proven to be yours.
- Create an API key and keep it on your server.
- Install the NFME app on your phone and link it: create a code under Recipients and scan the QR code with the app.
- Send a notification with the request below, or without code from Test notification.
curl -X POST https://api.nfme.app/v1/notifications \
-H "Authorization: Bearer nm_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalUserId": "user-4821",
"type": "message",
"title": "New message",
"body": "You have a new message",
"url": "https://yourdomain.com/inbox"
}'Authentication
Every request carries an API key in the Authorization header. Keys start with nm_. You create and revoke them under API keys; a key is shown once, when you create it.
Authorization: Bearer nm_YOUR_KEY
Call the API from your server only. A key in a web page or a mobile app can be read by anyone who has that page or app. Use one key per environment, so you can revoke one without stopping the other. A missing or revoked key gives 401 unauthorized.
Link a user
A user links their phone once. Your system asks for a link code for the user who is signed in on your site, and your site shows it to them. The code works one time and expires after 15 minutes, so ask for it when the user opens your “enable notifications” page, not in advance.
POST/v1/link-codes
| Request | Type | Meaning |
|---|---|---|
externalUserIdrequired | string | Your id for the signed-in user. You send notifications to this same id later. |
curl -X POST https://api.nfme.app/v1/link-codes \
-H "Authorization: Bearer nm_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalUserId": "user-4821"
}'{
"code": "K7MX2QRP",
"url": "nfme://link/K7MX2QRP",
"expiresAt": "2026-12-01T10:15:00Z"
}| Response | Type | Meaning |
|---|---|---|
code | string | Eight letters and digits. The user can type it into the app under Link. |
url | string | The same code as a link that opens the NFME app. |
expiresAt | time | After this moment the code no longer works. |
Showing the code to your user
Show all three, and let the situation pick:
- On a phone: a button with
urlas its address. A tap opens the NFME app, which links straight away. - On a computer: a QR code of
url. The user scans it in the NFME app with “Scan QR code”. - As a fallback: the
codein text, to type into the app.
<a href="nfme://link/K7MX2QRP">Open in NFME</a> <img src="/qr?text=nfme%3A%2F%2Flink%2FK7MX2QRP" alt="QR code to link NFME"> <p>Or enter this code in the NFME app: <strong>K7MX2QRP</strong></p>
A user who has not installed NFME yet needs the app first; tell them so next to the button. A user can link more than one device, for example a phone and a tablet: each needs its own code, and a notification then goes to all of them.
Check or end a link
To show “notifications are on” in your own interface, or to find out that a user has just linked, ask how many devices a user has.
GET/v1/subscribers/{externalUserId}
curl -X GET https://api.nfme.app/v1/subscribers/user-4821 \ -H "Authorization: Bearer nm_YOUR_KEY"
{
"externalUserId": "user-4821",
"devices": 2,
"mutedDevices": 0
}| Response | Type | Meaning |
|---|---|---|
devices | number | Devices linked to this user. 0 means the user has not linked, or has unlinked. |
mutedDevices | number | How many of those have muted you in the app. A muted device keeps your notifications in its list, without a sound or banner. |
After showing a link code, poll this every few seconds until devices goes up, and then show your user that it worked.
When a user closes their account with you, or switches notifications off on your site, end the link. The app then tells them the link is no longer active, and nothing more is sent.
DELETE/v1/subscribers/{externalUserId}
curl -X DELETE https://api.nfme.app/v1/subscribers/user-4821 \ -H "Authorization: Bearer nm_YOUR_KEY"
The answer is 204 No Content, also when the user had no link. A user can end a link from the app as well; you see that as devices going down.
Send a notification
POST/v1/notifications
| Request | Type | Meaning |
|---|---|---|
externalUserIdrequired | string | Who it is for: the id you linked. |
titlerequired | string | Up to 60 characters. Shown in bold under your company name. |
urlrequired | string | What a tap opens: an https:// address on one of your verified domains. |
body | string | One optional line of text, up to 180 characters. |
type | string | "message" (the default) or "time_sensitive". |
expiresInSeconds | number | Only with "time_sensitive": how long it is worth delivering, 10 to 86400. Default 45. |
idempotencyKey | string | Up to 100 characters, of your choosing. A second request with the same key does not send again. |
curl -X POST https://api.nfme.app/v1/notifications \
-H "Authorization: Bearer nm_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalUserId": "user-4821",
"type": "message",
"title": "New message",
"body": "You have a new message",
"url": "https://yourdomain.com/inbox"
}'{
"id": "0c1d6c1e-6f0b-4b9e-9a57-2f4f5f0f7a11",
"externalUserId": "user-4821",
"type": "message",
"createdAt": "2026-12-01T10:00:00Z",
"sent": 2,
"failed": 0,
"muted": 0,
"expiresAt": null
}| Response | Type | Meaning |
|---|---|---|
id | string | The notification’s id, to look it up later. |
sent | number | Devices it was delivered to. This is what counts towards your usage. |
failed | number | Devices it could not be delivered to, for example because notifications are switched off for the app or the app was removed. |
muted | number | Devices where the user has muted you. Not delivered as a push and not counted. |
expiresAt | time | For a time-sensitive message, when it stops being delivered. Otherwise null. |
The answer tells you straight away what happened; there is nothing to wait for. A request for a user without linked devices is accepted too, with sent, failed and muted all 0: nothing was delivered and nothing is counted. Use the subscriber check if you want to know beforehand.
Look a notification up
GET/v1/notifications/{id}
Returns the same fields as above. Every notification is also listed in the portal under Notifications, with whether it was opened, and per user under Recipients.
Time-sensitive messages
Some messages can wait and some cannot: someone is waiting in a room, a slot is about to close. Send those with "type": "time_sensitive". They arrive with their own sound, at the level Apple calls Time Sensitive, which a phone can show even when a Focus is on.
A time-sensitive message has an expiry. Set expiresInSeconds to how long your invitation is good for, between 10 seconds and 24 hours; without it the message expires after 45 seconds. A phone that was unreachable until then no longer gets it, and the app marks it as expired. A notification that is already on the screen stays there.
curl -X POST https://api.nfme.app/v1/notifications \
-H "Authorization: Bearer nm_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalUserId": "user-4821",
"type": "time_sensitive",
"expiresInSeconds": 120,
"title": "Someone is waiting",
"body": "Join within 2 minutes",
"url": "https://yourdomain.com/room/8841",
"idempotencyKey": "room-8841-invite-1"
}'Use it sparingly. A phone lets its owner switch time-sensitive notifications off per app.
Retrying safely
If a request times out, you do not know whether it arrived. Send an idempotencyKey with every notification, built from something that identifies the event on your side, such as message-99812. A repeated request with the same key does not send a second time: it returns the first result, with 200 OK instead of 201 Created.
- Retry on a timeout, a network error or a
5xxanswer, with a short pause that grows each time. - Do not retry on
4xx: the request itself has to change first. - A key belongs to your account; other accounts can use the same value.
Rules for text and links
Many senders share the NFME app, and every recipient has to be able to trust what it shows. The API checks these rules on every request and refuses what does not fit, with a 422 and a code that says which rule.
| Rule | Detail |
|---|---|
| Length | Title up to 60 characters, text up to 180, link up to 2000. |
| No links in the text | Title and text may not contain http://, https:// or www. The link goes in url. |
| Neutral wording | Explicit words are refused. The notification gets your user to your site; the content itself lives there. “New message” works for every kind of site. |
| Your own domain | url starts with https:// and is on a domain you verified under Domains. Subdomains are included: with yourdomain.com verified, app.yourdomain.com works too. |
| No personal data needed | Keep names and other personal details out of the text; show them on your page after the tap. |
The app applies the domain rule a second time: it only opens a link that is on one of your verified domains.
Errors
An error has an HTTP status and a JSON body with a stable code and a sentence for the developer. Build on the code; the sentence may change.
{
"error": {
"code": "url_domain_not_allowed",
"message": "url host 'example.org' is not one of this account's allowed domains."
}
}| Status | Code | What it means |
|---|---|---|
| 401 | unauthorized | The API key is missing, malformed, unknown or revoked. |
| 402 | subscription_required | The account has no active plan. Choose one under Subscription. |
| 402 | trial_limit_reached | The notifications of the free trial are used up. Start the plan under Subscription to keep sending. |
| 402 | credit_exhausted | This month’s included notifications are used up and there is no credit left. |
| 404 | not_found | There is no notification with this id in your account. |
| 422 | external_user_id_invalid | externalUserId is missing or longer than 200 characters. |
| 422 | type_invalid | type is not "message" or "time_sensitive". |
| 422 | expires_in_invalid | expiresInSeconds is outside 10 to 86400, or was sent with type "message". |
| 422 | idempotency_key_invalid | idempotencyKey is longer than 100 characters. |
| 422 | title_required | title is missing or empty. |
| 422 | title_too_long | title is longer than 60 characters. |
| 422 | body_too_long | body is longer than 180 characters. |
| 422 | text_contains_link | title or body contains a link. Put the link in url. |
| 422 | text_not_neutral | title or body contains a word that is not allowed. |
| 422 | url_required | url is missing. |
| 422 | url_too_long | url is longer than 2000 characters. |
| 422 | url_invalid | url is not a full https:// address, or it contains a user name or password. |
| 422 | url_domain_not_allowed | url is not on one of your verified domains. |
Plan and credit
Only delivered notifications count: the sent number in each answer, per device. Failed and muted ones cost nothing, and a regular and a time-sensitive message cost the same. Your plan includes a number per month; above that, each one comes off your credit at the rate of your plan.
When the included number is used up and there is no credit, the API answers 402 credit_exhausted and sends nothing. Nothing is charged afterwards. To keep sending without interruption, switch on automatic top-up under Subscription, where you also see this month’s usage and your invoices.
A first plan starts with 14 free days, in which you can deliver up to 100 notifications. After that the API answers 402 trial_limit_reached until the trial ends or you start the plan yourself under Subscription. Credit is not used during the trial.
Before you go live
- Your domain is verified, and every link you send is on it.
- The API key is on your server only, and production has its own key.
- Your “enable notifications” page asks for a fresh link code each time it is opened.
- Every notification carries an idempotencyKey, and you retry only on timeouts and 5xx.
- Your code handles 402 and 422 without retrying, and logs the error code.
- You end the link when a user closes their account or switches notifications off.
- You sent yourself a regular and a time-sensitive message, and tapped both.