Introduction
Channels
Templates
Contacts
Messages
API

Getting started

Setting up your project

When you signed up, we asked you to create a new organization and a new project. An organization can have multiple projects, give access to multiple users and subscribe to a bigger plan to get more quotas.

Quotas are shared between projects in the same organization.

We recommend you to create a second project for your dev/test environment. This second project will have its own API key and you will be able to play with it without corrupting your production data.

Invite your collaborators

If you work with other developers/marketers on your project, it's always a good thing to invite them collaborate with you. They will all have access to the projects of your organization.

To invite your team, open the left menu and go to "Collaborators".

Connect a notification channel

After creating your new project, the first step is to connect your notification channels.

Notifuse integrates with all the main notification providers (email, SMS, push...). If your favorite channel is missing feel free to contact us!

Please keep in mind Notifuse is not a notification channel, but a middleware between your project and your channels.

To connect a channel, go to your project, open the left menu and click on "Channels". Connect your channel and provide its API key. For the purpose of this tutorial we ask you to connect an email channel

Because every channel has some specific features we created a complementary documentation.

Create your first notification and template

A notification can contain as many templates as you want, and each template is configured for a specific channel.

Example: your app has a web and mobile version. You want to notify your mobile users via push and your web users via email. So you will create a notification with 2 templates: one template for the push message and one template for the email message.

You cannot create a template if you did not connect a channel to your project before.

You can customize the subject/content of your templates with the templating engine Nunjucks (=Twig, Jinja2...) to inject variables, create loops, conditions etc...

For this tutorial, create a notification "test" and a template with the key "v1" and this simple content: "Hello {{ firstName }}, what's up?"

If you connected an "email" channel, just use this content for the "subject" and "text" fields.

This template will replace {{ firstName }} with the firstName of your contact when you will send the message.

Add a contact

Every message is sent to a contact, if your contact does not exist, it will automatically be added to your project.

Because it's important to test your notifications before using them in production, we will create a "test" contact.

Each contact has a complete profile where you can store data (JSON). This data is then available to your templates to customize your templates.

In your project, open the left menu and click on "Contacts", then button.

Create a new contact with a unique ID "test", give him a name and put your email address under the "channel data" section of the form.

As you can see on this new contact form, there are few reserved fields (country, timeZone, language, latitude, longitude...), we invite you to learn how to use them later.

Sending your first message

Ok, now we have a project with a connected channel, a notification "test" with a template "v1", and a "test" contact. It's time to send our first message!

We have 2 ways to send a message: in the interface or with the API.

In the interface, you just have to go on the profile of your contact, click the button, and fill in the optionnal fields.

But what is more useful is to integrate the Notifuse API within your app to send messages automatically!

If your programming language is different from Node, Python, Ruby, PHP or Java, you can still integrate the API using the REST HTTPS endpoints.

For the simplicity of this tutorial, we will send our first message by typing the following curl command in the terminal.

    
    curl -X POST \
         -H 'Authorization: Bearer ${API_KEY}' \
         -H 'Content-Type: application/json' \
         -d '{
                "messages": [{
                  "notification": "test", 
                  "channel": "${CHANNEL_ID}",
                  "template": "v1",
                  "contact": "test"
               }]
             }' \
         https://api.notifuse.com/v2/messages.send
    
    
Don't forget to replace ${API_KEY} with your project API key (Settings tab in your project menu) and ${CHANNEL_ID} with the channel id you connected at the previous step.

Next: Choose your best channels ยป