Quick Start
Get up and running with Notifs in under 5 minutes. This guide will walk you through setting up your first webhook and sending your first notification.
Step 1: Create an Account
Visit notifs.dev/app to create your free account. No credit card required for the free tier.
Step 2: Get Your API Key
Once logged in, navigate to Settings → API Keys and generate a new API key. Keep this key secure - you'll use it to authenticate API requests.
export NOTIFS_API_KEY="notifs_sk_..."
Step 3: Install the SDK
Install the Notifs SDK for your programming language:
TypeScript/JavaScript (Node.js)
npm install @notifs/sdk
# or
yarn add @notifs/sdk
Python
pip install notifs-sdk
Go
go get github.com/notifs/notifs-go
Step 4: Create a Webhook
In the Notifs dashboard, create a new webhook:
- Go to Webhooks → Create Webhook
- Give it a name (e.g., "Payment Success")
- Configure your channels (Email, Slack, SMS, etc.)
- Copy the webhook ID
Step 5: Send Your First Notification
Now you're ready to send your first notification:
import { Notifs } from '@notifs/sdk'
const notifs = new Notifs({
apiKey: process.env.NOTIFS_API_KEY
})
async function main() {
try {
const response = await notifs.webhooks.send('webhook_id', {
user: 'john@example.com',
event: 'payment_success',
amount: '$99.00',
invoiceUrl: 'https://yourapp.com/invoices/123'
})
console.log('Notification sent:', response)
} catch (error) {
console.error('Error:', error)
}
}
main()
Framework Examples
Next.js (App Router)
// app/api/notifications/route.ts
import { Notifs } from '@notifs/sdk'
import { NextResponse } from 'next/server'
const notifs = new Notifs({
apiKey: process.env.NOTIFS_API_KEY!
})
export async function POST(request: Request) {
const body = await request.json()
await notifs.webhooks.send('webhook_id', body)
return NextResponse.json({ success: true })
}
Express.js
import express from 'express'
import { Notifs } from '@notifs/sdk'
const app = express()
const notifs = new Notifs({
apiKey: process.env.NOTIFS_API_KEY!
})
app.post('/api/notifications', async (req, res) => {
try {
await notifs.webhooks.send('webhook_id', req.body)
res.json({ success: true })
} catch (error) {
res.status(500).json({ error: 'Failed to send notification' })
}
})
app.listen(3000)
FastAPI (Python)
from fastapi import FastAPI
from notifs import Notifs
app = FastAPI()
notifs = Notifs(api_key=os.environ["NOTIFS_API_KEY"])
@app.post("/api/notifications")
async def send_notification(data: dict):
result = await notifs.webhooks.send("webhook_id", data)
return {"success": True}
Next Steps
- Learn about Webhook Verification for secure communication
- Explore the full SDK Reference for all available methods
- Check out Security Best Practices to keep your integration secure
Need Help?
If you run into any issues, reach out to us:
- Email: hello@notifs.dev
- GitHub: github.com/notifs/notifs-sdk/issues