← Back to Docs

Notification Streams

Pub/sub notification channels with shareable codes

How it works

  1. 1. Create a stream via the API — you get a short code like DEPLOY-XK3
  2. 2. Share the code with anyone — clients, team members, users
  3. 3. They enter the code in the notfs app to subscribe
  4. 4. Send a notification to the stream — all subscribers receive it instantly

Create a Stream

POST /api/streams

curl -X POST https://api.notfs.dev/api/streams \
  -H "X-API-Key: ntfs_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Deploy Alerts",
    "description": "Production deployment notifications"
  }'

Response (201)

{
  "id": "clx...",
  "name": "Deploy Alerts",
  "code": "DEPLOY-XK3",
  "description": "Production deployment notifications",
  "iconUrl": null,
  "subscribers": 0,
  "createdAt": "2026-02-20T03:00:00.000Z"
}

Send to Stream

POST /api/streams/:id/send

curl -X POST https://api.notfs.dev/api/streams/STREAM_ID/send \
  -H "X-API-Key: ntfs_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "v2.4.1 deployed",
    "body": "Production is live",
    "priority": "high"
  }'

Response

{
  "notificationId": "clx...",
  "sent": 12,
  "subscribers": 12,
  "stream": {
    "name": "Deploy Alerts",
    "code": "DEPLOY-XK3"
  }
}

All Endpoints

MethodEndpointDescriptionAuth
POST/api/streamsCreate a new streamAPI Key (notifications:write)
GET/api/streamsList your streamsAPI Key or JWT
DELETE/api/streams/:idDelete a streamAPI Key or JWT
POST/api/streams/:id/sendSend to all subscribersAPI Key (notifications:write)
POST/api/streams/subscribeSubscribe by codeJWT
GET/api/streams/subscriptionsList subscriptionsJWT
DELETE/api/streams/subscriptions/:idUnsubscribeJWT
GET/api/streams/lookup/:codeLookup stream by codeJWT

Create Parameters

FieldTypeRequiredDescription
namestringyesStream name (1-50 chars)
descriptionstringnoShort description (max 200 chars)
iconUrlstringnoIcon URL for the stream

Send Parameters

FieldTypeRequiredDescription
titlestringyesNotification title
bodystringnoNotification body
soundenumnodefault, soft, critical
priorityenumnolow, normal, high, critical
senderNamestringnoOverride stream name as sender
senderIconstringnoOverride stream icon

Limits

  • Free plan: 3 streams
  • Pro plan: Unlimited streams
  • • Stream codes are auto-generated and unique
  • • Creators cannot subscribe to their own streams