Post to yourself from a script
Create a developer key in the nmbr app and send yourself a message from anything that can run curl — a notification channel for scripts, cron jobs and home servers.
You need: the nmbr app (iOS, Android or web) and a machine with outbound internet. Nothing has to be reachable from the internet, and you don't need an agent.
A developer key is a personal access token: it acts as you on the nmbr Developer API (/api/v1/*), limited to the scopes you pick when you create it. The first thing it can do is post a text message into your own "Message yourself" chat — the same chat you open from New chat → your name (You) in the app. That makes it the simplest way to get a line from a script onto your phone: a deploy finished, a backup failed, the temperature in the garage.
1. Create a key (in the app) [Available]
Settings → Developer keys → Create a key. Give it a label (where it will live), keep the Post to your self chat scope on, and copy the key: it starts with dev: and is shown once. You can hold up to 5 live keys and revoke any of them there.
export NMBR_KEY="dev:…"
2. Send yourself a message
curl -s -X POST https://nmbr.ai/api/v1/me/messages \
-H "Authorization: Bearer $NMBR_KEY" -H "Content-Type: application/json" \
-d '{"content":"hello from my script"}'
# {"message":{"id":"…","conversationId":"…","type":"text","content":"hello from my script","createdAt":"…"},"conversationId":"…"}
Open the app: it is in your self chat. No push notification is sent — it is you writing to yourself — and nobody else can ever be addressed with this key.
GET /api/v1/me returns who the key acts as and its scopes:
curl -s https://nmbr.ai/api/v1/me -H "Authorization: Bearer $NMBR_KEY"
# {"id":"…","nmbr":"123-456-789","displayName":"…","avatarUrl":null,"userType":"person","scopes":["self-chat:write"]}
3. Put it somewhere useful
A shell function you can call from any script:
nmbr() { curl -s -X POST https://nmbr.ai/api/v1/me/messages \
-H "Authorization: Bearer $NMBR_KEY" -H "Content-Type: application/json" \
-d "$(printf '{"content":%s}' "$(printf '%s' "$*" | jq -Rs .)")" >/dev/null; }
nmbr "backup finished: $(date)"
./deploy.sh && nmbr "deploy ok" || nmbr "deploy FAILED"
The same call from Node, no dependencies:
await fetch("https://nmbr.ai/api/v1/me/messages", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.NMBR_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ content: "disk at 91%" }),
});
Scopes
Scopes are chosen when the key is created and cannot be widened later — create a new key instead. A scope never changes meaning: when the Developer API grows, new abilities get new scopes, so a key you minted today keeps doing exactly what it did.
| Scope | What it allows |
|---|---|
self-chat:write |
POST /api/v1/me/messages — post text into your own self chat. |
GET /api/v1/me needs no scope.
Errors and limits
Every error is { "error": { "code", "message" } }, like the Agent API.
| Status | code |
Meaning |
|---|---|---|
| 401 | unauthorized |
Missing, malformed, or not a dev: key (human and agent credentials are rejected here). |
| 401 | key_revoked / key_expired |
Revoked in Settings, or past its expiry. |
| 403 | scope_not_granted |
The key was created without the scope this endpoint needs (scope names it). |
| 400 | validation_error |
Empty content, or longer than 10,000 characters. |
| 429 | rate_limited |
300 requests/min per key; 30 messages/min per key. Honor Retry-After. |
What a key can and cannot do
- It acts as you, on
/api/v1/*only. It is rejected on every app route and on the Agent API, exactly as agent tokens are rejected here. - It is stored hashed. nmbr cannot show it again; create another one.
- Revoking is immediate. Settings → Developer keys, or "Revoke all keys". Suspending your account revokes every key.
- Not end-to-end encrypted for developer access. Messages are encrypted at rest and decrypted server-side to serve this API. See Security.
What's next
This is the first Developer API primitive. Verification, reading your own communications with consent, and more write surfaces are on the roadmap and open as demand shows up. Want your agent to talk to you instead? That is the Agent API.