Tell Nurdge
when a service is done.
For hotels, restaurants, shops and software teams: how your system sends Nurdge an event when a guest checks out or a bill is paid.
How it works
- In the dashboard, open Collect → API and webhooks and create a key for your system. It is shown once.
- When a visit finishes (check-out, bill paid, appointment done), your system sends one request to Nurdge.
- Nurdge checks the customer opted in, isn’t on the STOP list and wasn’t asked recently, then sends the review request on WhatsApp.
Nurdge never reads your system. Your system pushes events to us, so it works with anything that can make a web request, including Zapier and Make.
Consent comes first
WhatsApp review requests may only go to people who agreed to receive WhatsApp messages from your business. consent: true means you confirm that. A check-out or a purchase is not consent by itself. Collect it at booking or check-in (a tick box, a QR code or the opt-in form), and record it in your own system. The terms put this responsibility on the business, and the wording is still to be reviewed by a lawyer.
The request
POST https://YOUR_NURDGE_ADDRESS/api/v1/events with the header Authorization: Bearer ndg_…. Your own address is shown in the dashboard next to your keys.
curl -X POST https://YOUR_NURDGE_ADDRESS/api/v1/events \
-H "Authorization: Bearer ndg_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "service.completed",
"phone": "+2348012345678",
"name": "Ada Obi",
"reference": "folio-88231",
"consent": true,
"branch": "Lekki"
}'| Field | What it is |
|---|---|
type | service.completed or customer.created (required) |
phone | WhatsApp number with country code, like +2348012345678. Send this, an email, or both (at least one). |
email | Customer’s email address, like ada@example.com. Review requests go by email when there is no phone number, or when you choose email first. |
name | The customer’s name (optional) |
reference | Your own id for this event, such as a folio or booking number. The same reference is processed once, so retries are safe. Recommended. |
consent | true if the customer agreed to receive WhatsApp messages from you. Needed to add a new customer. |
branch | The name of one of your branches (optional) |
- customer.created adds the customer up front (needs
consent: true). - service.completed marks the visit done. It also creates the customer if you send
consent: true.
Sending several at once
Up to 100 events in one request. The answer lists a status for each.
{
"events": [
{ "type": "service.completed", "phone": "+2348012345678", "reference": "folio-1", "consent": true },
{ "type": "service.completed", "phone": "+2348098765432", "reference": "folio-2", "consent": true }
]
}The answer
A 200 with a status per event, for example { "results": [ { "reference": "folio-88231", "status": "served" } ] }.
created | A new customer was added. |
served | The visit was marked as done. The review request follows. |
updated / already_served | Nothing new to do: the customer already existed or was already done. |
duplicate | You already sent this reference, so it was ignored. Retrying is safe. |
consent_required | To add a new customer you must send consent: true. |
unknown_contact | service.completed for someone we don’t know, without consent: true. |
bad_phone | Not a valid international number (or no phone or email was sent). |
bad_email | That email address isn’t valid. |
opted_out | That person replied STOP, so they can’t be added. |
cooldown | They were asked for a review recently. |
bad_type | type must be customer.created or service.completed. |
| HTTP code | Meaning |
|---|---|
401 | Missing or invalid key (or the key was revoked). |
400 | The body isn’t valid JSON, or has no events or more than 100. |
413 | The request is too large. |
429 | Too many requests. The limit is 600 a minute per key. Wait and retry. |
503 | Temporarily unavailable. Retry with the same reference. |
More examples
// Node 18+ or any modern runtime
const res = await fetch("https://YOUR_NURDGE_ADDRESS/api/v1/events", {
method: "POST",
headers: { Authorization: "Bearer ndg_YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
type: "service.completed",
phone: "+2348012345678",
reference: "folio-88231",
consent: true,
}),
});
console.log(res.status, await res.json()); // 200 { results: [{ reference: "folio-88231", status: "served" }] }import requests
r = requests.post(
"https://YOUR_NURDGE_ADDRESS/api/v1/events",
headers={"Authorization": "Bearer ndg_YOUR_KEY"},
json={"type": "service.completed", "phone": "+2348012345678", "reference": "folio-88231", "consent": True},
timeout=15,
)
print(r.status_code, r.json())Zapier or Make, no code
- Trigger: your system’s “guest checked out”, “invoice paid” or “appointment completed” event (or a new row in a spreadsheet).
- Action: Webhooks → POST (Zapier) or HTTP → Make a request (Make). URL: your events address. Header
Authorization: Bearer ndg_…. Body type JSON. - Map the phone number and a unique id (as
reference) from the trigger, and settypetoservice.completedandconsenttotrueonly if that guest opted in. - Send a test, then check Recent activity in the dashboard.
Hotels and restaurants
Typical set-up: your property system (or its integration partner) calls this endpoint when a reservation is checked out or a table’s bill is closed, with the folio or check number as reference. We don’t have direct connectors to Opera, Simphony or similar systems yet, so today this needs your IT team or an integration partner. Tell us which system you use in the dashboard (Collect → API and webhooks → Which system do you use?) and we’ll build the most-requested ones first.
Good to know
- Keep the key secret and server-side. Never put it in a web page or mobile app. Revoke a key in the dashboard if it leaks.
- Make one key per system so you can switch one off on its own.
- This page is a first version. Message sending itself starts once your WhatsApp number is connected.