Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yournotify Next.js

Helpers for calling the current Yournotify API from Next.js route handlers and server actions.

Install

npm install yournotify-nextjs

Server Action Example

'use server';

import { createYournotifyClient } from 'yournotify-nextjs';

const yournotify = createYournotifyClient({ apiKey: process.env.YOURNOTIFY_API_KEY });

export async function sendWelcomeEmail(email) {
	return yournotify.sendEmail(
		'Welcome',
		'Welcome',
		'<p>Hello</p>',
		'Hello',
		'draft',
		'noreply@smtp.yournotify.net',
		[email]
	);
}

Helpers

  • validateAuth() / getProfile()
  • createCampaign(data), sendEmail(...), sendSMS(...), sendWhatsApp(data), sendPush(data), sendInApp(data), testCampaign(data)
  • addContact(...), getContacts(params), addList(...), getCampaigns(channel, params)
  • getRewards(params), createReward(data), sendReward(data)
  • identify(data), track(data)
  • verifyYournotifyWebhook(headers, expectedToken)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages