Backend API
The backend API is used by your SaaS server to send messages and sync your users profiles.
In Notifuse, a notification is not a message, it defines which channels the messages will be sent to and contains templates for each language.
When you want to notify your users, you will actually send a message.
The backend API endpoint is: https://api.notifuse.com/
and the data is sent as JSON.
Wanna play with the API? Run this API collection in Postman
Authentication
All the following methods require to be authenticated with the Authorization
HTTP header and your project API Key like this: Authorization: Bearer YOUR_PROJECT_API_KEY
The project API Key is provided in your projects settings.
Send messages
When you send a message to a user, the required fields are notificationId
and userId
. If the user you are sending a message to, doesn't exist yet in Notifuse, it will be automatically created. The user profile fields (userEmail
, userTelephone
...) provided with your message, will update the user profile in Notifuse if missing.
The messages.send endpoint accepts a batch of 50 messages max. Messages will be processed in parallel, and emails/sms are sent synchronously.
If you don't provide a unique id
for your messages, Notifuse will generate one. If you provide an id
and you send it many times, an error "id/exists" will be returned for your message.
The endpoint returns the results for each message. If nothing bad happened on the Notifuse side, the ok
field will be true
.
If an error occurred within Notifuse, the ok
field will be false
and the error
field will be set.
If an error occurred with the email and/or SMS provider, the ok
field will still be true
but the emailError
and/or smsError
fields will be set.
POST https://api.notifuse.com/messages.send
Insert / Update users
It is important to import your contacts (= users) into Notifuse before sending notifications so you can avoid attaching the user profile fields (userEmail
, userLanguage
etc...) when you send messages (see Send Message).
This endpoint will create the user profiles if they don't exist yet or update them with missing fields.
This endpoint will create the user profiles if they don't exist yet or update them with missing fields. It accepts a batch of 100 users max.
POST https://api.notifuse.com/users.upsert
Last updated