π Devices & API keys
The Devices tab lets you make personal keys. A key lets a sensor, a smart button, a phone shortcut, or your own little app log into your tracker without signing in.
Find it under Account β π Devices. The same key maker also appears on the Smart Nursery page.
A key is like a secret password for a gadget. It lets your sensor or phone tell your tracker "I'm wet!" or "I drank water!" all by itself. Keep it secret, just like a password. ποΈ
Make a keyβ
- Type a name so you know which device it's for, for example "Bedroom sensor".
- Tick only what this device needs (see below).
- Tap β¨ Make a key.
- Copy the key right away with Copy. This is the only time it's shown.
- Tap I've saved it π when you're done.
Make one key per device. That way, if one gadget is lost or stops behaving, you can switch off just that one.
| Choice | What it allows |
|---|---|
| π Device events | A sensor or button can log a change, a drink, or a nap. You also get a Device link |
| βοΈ Write logs | An app or shortcut can log changes, drinks, naps, and moods |
| π Read today | A display can show today's changes and drinks |
You can have up to 10 keys at once. A key you make here logs into your own account.
Keys a caregiver made for youβ
A linked caregiver can make a key for you on the Smart Nursery page, for example for a sensor in your room. That key logs into your tracker, and each entry is marked as logged by your caregiver.
- It shows in π Your keys with π§βπΌ Made for you by and their name.
- You can Revoke it any time, the same as your own keys. Your caregiver can revoke it too.
- It stops working straight away if you and that caregiver are ever unlinked. The link is checked every time it's used.
- It counts toward your 10 keys. A caregiver's key can do device events, write logs and read today, but not the Little Tab.
Your keysβ
π Your keys lists each key with its name, the first few characters, what it's allowed to do, and when it was last used.
To switch one off, tap Revoke and confirm. Anything using that key stops working straight away. You can't turn a revoked key back on, so make a new one if you need it again.
The device link (webhook)β
When a key has π Device events ticked, you get a Device link like this:
https://caregiverbabyhub.com/api/hooks/cbh_pat_β¦
Gadgets that can't add special headers (an ESP32 sensor, a smart button, an iPhone Shortcut, Sleep as Android) can POST to that link. Send JSON or a simple web form with an event, and optionally amount (ounces of water) and note.
event | What happens |
|---|---|
wet, messy, both, dry | Logs a diaper change |
water | Adds a drink to today (8 oz unless you send amount) |
nap | Starts a nap |
bedtime | Starts a night's sleep |
wake | Ends the open sleep (one started in the last 18 hours) |
curl -X POST "https://caregiverbabyhub.com/api/hooks/YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"event":"wet"}'
These events can also start Automations through the Devices trigger.
For your own appsβ
Keys with βοΈ Write logs or π Read today work with two simple addresses. Send the key as Authorization: Bearer YOUR_KEY.
Log something (POST /api/v1/log, needs Write logs). Send a kind and a detail, plus optional notes:
kind | detail examples |
|---|---|
diaper | wet, messy, both, dry |
feeding | bottle, or what was eaten |
sleep | nap or night (starts a sleep) |
mood | happy, excited, content, fussy, anxious, sad |
hydration | ounces, like 8 |
curl -X POST "https://caregiverbabyhub.com/api/v1/log" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"diaper","detail":"wet"}'
Read today (GET /api/v1/today, needs Read today). You get today's date and timezone, how many changes so far (dry checks don't count), the time and type of the last change, and today's drinks in ounces. "Today" uses your profile's timezone.
curl "https://caregiverbabyhub.com/api/v1/today" \
-H "Authorization: Bearer YOUR_KEY"
Anything logged with a key is tagged with π and the key's name, so you can spot it in the tracker. Each key can make up to 60 calls a minute.
Keep your keys safeβ
- Treat a key like a password. Anyone who has it can log into your tracker (and, with Read today, see today's summary).
- The device link has the key inside it, so keep the link private too. Don't post it in screenshots or chats.
- Only tick what a device actually needs.
- If you think a key has leaked, Revoke it and make a new one.
- CBH only keeps a scrambled copy of each key, so nobody (not even us) can show it to you again.
π€ Discordβ
The bottom of the Devices tab has a Discord card for linking your Discord account, so you can get your roles and log from Discord. See Discord.
Checked on
Was this helpful?