Loading...
Loading...
Learn how to authenticate your API requests with Notify'n.
Notify'n uses API keys to authenticate requests. You can create and manage API keys from your account settings.
Your API key is a secret and should never be exposed in client-side code or committed to version control.
Include your API key in the Authorization header as a Bearer token:
Authorization: Bearer ntfn_your_api_key_herecurl -X POST https://notifyn.net/api/v1/emails \
-H "Authorization: Bearer ntfn_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Hello World",
"html": "<p>Hello from Notifyn!</p>"
}'We recommend storing your API key in an environment variable:
NOTIFYN_API_KEY=ntfn_your_api_key_hereconst apiKey = process.env.NOTIFYN_API_KEY;fetch(`${API_URL}/api/v1/emails`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
from: 'hello@yourdomain.com',
to: 'user@example.com',
subject: 'Hello World',
html: '<p>Hello from Notifyn!</p>',
}),
});When creating an API key, you can configure specific permissions:
| Permission | Description |
|---|---|
sendEmails | Send emails via the API |
readContacts | Read contact information |
writeContacts | Create and update contacts |
readAnalytics | Access analytics and email stats |
API requests should always be made from your server, never from the browser.
Restrict your API key to specific IP addresses for additional security.
Create new API keys periodically and revoke old ones to limit exposure.
Only enable the permissions your application actually needs.