Skip to main content

πŸ”Œ 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.

For littles

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​

  1. Type a name so you know which device it's for, for example "Bedroom sensor".
  2. Tick only what this device needs (see below).
  3. Tap ✨ Make a key.
  4. Copy the key right away with Copy. This is the only time it's shown.
  5. 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.

ChoiceWhat it allows
πŸ”” Device eventsA sensor or button can log a change, a drink, or a nap. You also get a Device link
✏️ Write logsAn app or shortcut can log changes, drinks, naps, and moods
πŸ‘€ Read todayA 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.

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.

eventWhat happens
wet, messy, both, dryLogs a diaper change
waterAdds a drink to today (8 oz unless you send amount)
napStarts a nap
bedtimeStarts a night's sleep
wakeEnds 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:

kinddetail examples
diaperwet, messy, both, dry
feedingbottle, or what was eaten
sleepnap or night (starts a sleep)
moodhappy, excited, content, fussy, anxious, sad
hydrationounces, 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?