cURL NodeJS PHP

Introduction

Base URL

https://api.notify.eu

In this API documentation we will try to guide you through the different layers of the Notify API. If you simply want to test our API, then you can use our quickstart guide. We will pilot you through every stage of using the API. During the final stage of the quickstart guide we will lead you through a succesful API call.

Already know how to use APIs and just want to integrate Notify in your new and/or existing projects? You can go straight to the developer documentation and get started right away!

Do you have any feedback? Please, do let us know via api@notify.eu.

What is an API?

API is the abbreviation for 'Application Programming Interface'. In this case the API is used to programmatically interact with Notify. Notify will provide all of the building blocks needed to integrate the messaging system for your project.

Be sure to check out our developer documentation if you want to use the Notify API in your own projects. Want to get to know the API a bit better? Check out the quickstart guide and get started with Notify right away!

What does Notify do?

Notify is a messaging API which connects different services to make it easier than ever to send messages to clients and/or companies.

General principles

Endpoint

The REST software architectural style is used for the Notify API endpoints. The Notify API consists of endpoints like this: notification/send.

Request

At the moment we only support one POST request which will send a message to your users/customers by email, text message or push notification. You cannot use a GET request to get Notify data just yet.

An example of this POST request endpoint would be an URL like this.

https://api.notify.eu/notification/send

Response

The response you will get will always be returned as a JSON object. Here's an example of a successful API call.

{ "success": true, "identifier": "015da530-e867-11e8-9580-3b2b4d2b2a6b" }

The unique identifier can be used to find your message in our logs feature.

Error

Errors are always returned in a JSON object. Here is an example of an error when the customer has no been defined.

{ "success": false, "message": "customer not found" }

Quickstart

Notify is incredibly easy to set up. We will guide you through the setup process so you can perform your very first Notify call.

Registration

Start by creating your own Notify Account. You can do this by going to the Notify website. Complete in the required fields and verify your account using the email you receive after completing the registration process.

Credentials

To find your ClientId and SecretKey you have to login to your Notify account. You can find your credentials at the bottom of the settings page. Looking for more info how to generate new keys? Go to the Authentication part of the guide.

Setting up a channel

What is a channel?

A channel contains credentials Notify needs to be able to send messages on your behalf to your client base or users. A message can be an email, text message or a push notification. Each channel is linked to a service of your choice (e.g. Mandrill, Twilio, ...).

Setup

Now that you have set up your ClientID and your SecretKey, you can add your first channel. Go to the Customer Info page and press the create button.

Give your channel a unique name and select the channel type you'd like to use. Every channel requires a key which you'll need to create on a specific service's website. You can get the key by following the steps in the channels part of the guide. Press the save button to finish the channel creation.

alt text

Now you can view and edit your saved channel as necessary.

alt text

Create template

Now it's time to create your first message template. Navigate to the Templates page and press the 'create' button.

Template fields

Field Explanation
Title A unique name for your Template
Customer Select one of your created customers here.
Transport type How do you want your customers to receive your notification? You can use text message, email and push notification.
Headers & footers Here you can select a Header & Footer for your messaging template.
Criteria If you want to single out a specific type of people and/or users, you can use the criteria field.

alt text

Press the 'add content' button.

Create headers & footers

Want to add your company logo or some recurring information to the top or bottom of your messages? You can create custom and reusable headers and footers.

alt text

HTML

This field is used for messaging clients that accept HTML as a programming language for displaying your messages.

To check the limitations of how you can style your email content you can check caniuse.

Text

The Text field is used when HTML can't be processed on the receiving end. The receiver of your message will get to see pure text instead of a styled message.

Example API call

Call endpoint

https://api.notify.eu/notification/send

Example Notify call

{
  "message": {
      "notificationType": "Template title",
      "language": "Template language",
      "params": {},
      "customer": {
          "clientId": "Customer clientID",
          "secretKey": "Customer SecretKey"
      },
      "transport": [
      {
        "type": "email",
        "recipients": {
          "to": [
            {
              "name": "Receiver name",
              "recipient": "Receiver email"
            }
          ],
          "cc": [],
          "bcc": []
        }
      }
    ]    
  }
}

Now that everything is setup you will be able to send your first API call using Notify. A program we recommend to test your API calls is Postman.

The fields you need to replace are as follows.

Field Explanation
notificationType The unique title you gave your message template.
language The language your template content has to be in. This has been selected using the 'create template content' process.
clientId You can find the clientID on the customers page under the credentials tab.
secretKey You can find the secretKey on the customers page under the credentials tab.
type What kind of notification are you sending? (in this test case we're using email)
name Who are you sending your notification to?
recipient What's the receivers email?

If there are any problems with getting this notification to work, please don't hesitate to contact us via api@notify.eu!

Guides

Channels

A channel contains credentials Notify needs to be able to send messages on your behalf to your client base or users. A message can be an email, text message or a push notification. Each channel is linked to a service of your choice (e.g. Mandrill, Twilio, ...). To be able to connect Notify with an external service account, we need to setup a channel which includes the service configuration, which is further explained below:

Create channel

  1. Go to Settings > Channel details and click Create Channel.
  2. Choose the type of channel and click Continue.
  3. In the Key field type a unique name that will identify your channel. In case you're creating a Slack channel, a popup will show up first where you need to login to Slack and grant permissions (Step 5 can be ignored).
  4. Click "Save".
  5. A new popup is shown with some settings fields. Follow one of the steps below depending on which service you've chosen.

Configure channel type

Mandrill

  1. Channel identifier is an unique name that will identify your channel.
  2. From name is your own name. This will identify yourself to the receiver.
  3. From email is your own email address. The receiver will be able to reply to this email address.
  4. Secret Key is your API key from Mandrill. To get your key, open a new window and login to Mailchimp.
  5. Access your Profile area.
  6. Access the Transactional area and launch Mandrill.
  7. Access the Mandrill Settings menu item and click SMTP & API Info. Create your API Key.
  8. Copy the API key.
  9. Return to Notify and paste the API key into the Secret Key field.
  10. Click "Save".

Twilio

  1. Channel identifier is an unique name that will identify your channel.
  2. From phone number will be the number the message originates from.
  3. Account SID & AuthToken are your Twilio credentials. To get your credentials, open a new window and login to your Twilio Console.
  4. Select your project.
  5. Go to Settings > General.
  6. Copy the Account SID/AuthToken.
  7. Return to Notify and paste the Account SID/AuthToken into the specified fields.
  8. Click "Save".

Firebase

  1. Channel identifier is an unique name that will identify your channel.
  2. The endpoint field must contain this URL: https://fcm.googleapis.com/fcm/send.
  3. The Authentication field will be your Firebase Server Key. To get your key, open a new window and login to the Firebase Console.
  4. Select your Project.
  5. Click on "Settings" and select "Project Settings".
  6. Select the "Cloud Messaging" tab.
  7. Copy the "Server Key".
  8. Return to Notify and paste the key into the "Authentication" field.
  9. click "Save".

CM Telecom

  1. Channel identifier is an unique name that will identify your channel.
  2. From phone number will be the number the message originates from.
  3. The endpoint field must contain this URL: https://gw.cmtelecom.com/v1.0/message.
  4. The Authentication field will be your Project token from CM Telecom. This key was emailed to you after your registration on CM Telecom. You can also get your key by signing in to https://gateway.cmtelecom.com if you signed up for the CM Platform.
  5. Copy and paste your key into "Authentication" field.
  6. Click "Save".

RingRing

  1. Channel identifier is an unique name that will identify your channel.
  2. Key must contain your API key from RingRing. To get your key, open a new window and login in to the RingRing portal.
  3. Go to Settings > Applications.
  4. The Application Key is the API key.

Slack

  1. Channel identifier is an unique name that will identify your channel.
  2. Team (read only) is the name of your Slack workspace.
  3. Access token (read only) is the token that will be used for sending messages.
  4. Click "Save".

SMTP

  1. Channel identifier is an unique name that will identify your channel.
  2. From name is your own name. This will identify yourself to the receiver.
  3. From email is your own email address. The receiver will be able to reply to this email address.
  4. "Server" is your outgoing servername e.g. smtp.office365.com:587
  5. Fill in the username and password of your email account.
  6. Click "Save".

SendGrid

  1. Channel identifier is an unique name that will identify your channel.
  2. From email will be the email the message originates from.
  3. From name is your own name. This will identify yourself to the receiver.
  4. Key must contain your Sendgrid API key. To get your key, open a new window and login in to the SendGrid app.
  5. Go to Settings > API Keys.
  6. Use a previously created key, or create a new one.
  7. Click "Save".

Templates

Templates are needed to give your message body. You can use HTML and inline CSS for clients that support it. As a backup plan for people or clients that don't support HTML and CSS you can just use normal text.

The advantage of being able to use HTML and CSS in your Notify template is that, with some technical knowledge and within what is possible in most email clients, you can build whatever template your heart desires.

To check the limitation on how you can style your email content you can check caniuse.

Headers & footers

Headers and footers are made to be reusable in your content templates. When you have content at the top (header) or at the bottom (footer) of your content template that returns in every template, you should use the header and footer functionality.

Content you can include in your headers and footers can consist of but are not limited to:

Criteria

The criteria field is an optional field used when you need to send emails to a certain person, or a certain group of people. A good example of this is when you want personalize an email for a certain VIP client. You can use an identifier of your choice (phone number, name, nickname, ...) and change some of the content in the email.

Linking channels

The channels field is a mandatory field in which you define the channels the notifications is going to use.

More information about channels can be found here.

Developers

Authentication

Notify uses a ClientID & SecretKey to identify your API calls. When Notify receives your request, it checks both keys to see if it is valid and matches an instance of Notify. If it does, your request is successful.

Getting your credentials

To get your personal credentials for your Notify account:

  1. Login to your Notify account at https://app.notify.eu/
  2. Go to Settings.
  3. Scroll to "Credentials".
  4. Click on one of your credentials.
  5. Copy & paste your clientID and secretKey

Creating new credentials

To create new credentials for your Notify account:

  1. Login to your Notify account at https://app.notify.eu/
  2. Go to Settings.
  3. Scroll to "Credentials".
  4. Click "Create Credential" on the right side.
  5. Click "Generate" next to "secretKey".
  6. Click "Save.

Protecting your credentials

Your clientId and secretKey can be used to send messages on your behalf, so you need to make sure that you protect it. Simple ways to avoid your credentials being accessed by anyone else are:

Regenerating your credentials

If your clientId or secretKey are accidentally made public or put in a place where it could be accessed by an untrusted source, you can regenerate it. To do so:

  1. Login to your Notify account at https://app.notify.eu/.
  2. Go to the Settings page.
  3. Scroll to "Credentials"
  4. Click on one your credentials.
  5. Click "Generate" next to "clientId" or "secretKey".
  6. Copy & paste clientID and secretKey

Using your credentials

The Notify API requires you to pass your clientId and secretKey in the POST body inside a customer object. If your credentials are invalid you will receive the following error message:

{ "success": false, "message": "customer not found" }

API

Notifications

Send notification

This call sends a notification to a receiving party.

API endpoint

https://api.notify.eu/notification/send

Fields

Fields are dependable on the type of notification you want to send, e.g. email, sms or push notification.

Email
const request = require('request');

request({
    url: "https://api.notify.eu/notification/send",
    method: "POST",
    json: true,
    body: {
      "message": {
        "notificationType": "marketing_email",
        "language": "en",
        "params": {
          "firstname": "James",
          "age": "25"
        },
        "transport": [
          {
            "type": "email_mandrill",
            "from": {"name": "Jim Doe", "email": "jim@example.com"},
            "recipients": {
              "to": [
                {
                  "name": "John Doe",
                  "recipient": "john@example.com"
                }
              ],
              "cc": [
                {
                  "name": "Jane Doe",
                  "recipient": "jane@example.com"
                }
              ],
              "bcc": [
                {
                  "name": "Joe Doe",
                  "recipient": "joe@example.com"
                }
              ],
              "Reply-To": "reply@example.com"
            }
          }
        ],
        "attachments": [
          {
            "filename": "test.txt",
            "content": "Base64 encoded string"
          }
        ],
        "customer": {
          "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "secretKey": "xxxxxxxxxxxxxxxxxxxxxxxx"
        }
      }
    }
}, function (error, response, body){
    console.log(response);
});
<?php

$postBody = array(
  "message" => array(
    "notificationType" => "marketing_email",
    "language" => "en",
    "params" => array("firstname" => "James", "age" => "25"),
    "transport" => array(
      array("type" => "email_mandrill"),
      array("from" => array("name" => "Jim Doe", "email" => "jim@example.com")),
      array("recipients" => array(
        "to" => array(array("name" => "John Doe", "recipient" => "john@example.com"))
        "cc" => array(array("name" => "Jane Doe", "recipient" => "jane@example.com")),
        "bcc" => array(array("name" => "Joe Doe", "recipient" => "joe@example.com")),
        "Reply-To" => "reply@example.com"
      ))
    ),
    "customer" => array(
       "clientId" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
       "secretKey" => "xxxxxxxxxxxxxxxxxxxxxxxx"
    ),
    "attachments" => array(
      array(
        "filename" => "test.txt",
        "content" => "Base64 encoded string"
      )
    )
  )
);

$ch = curl_init("https://api.notify.eu/notification/send");
curl_setopt_array($ch, array(
    CURLOPT_POST => TRUE,
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
    CURLOPT_POSTFIELDS => json_encode($postBody)
));

$response = curl_exec($ch);

if ($response === FALSE){
    die(curl_error($ch));
}

$responseData = json_decode($response, TRUE);
?>
curl -i -H "Content-type: application/json" -X POST https://api.notify.eu/notification/send -d '
  {
    "message": {
      "notificationType": "marketing_email",
      "language": "en",
      "params": {
        "firstname": "James",
        "age": "25"
      },
      "transport": [
        {
          "type": "email_mandrill",
          "from": {"name": "Jim Doe", "email": "jim@example.com"},
          "recipients": {
            "to": [
              {
                "name": "John Doe",
                "recipient": "john@example.com"
              }
            ],
            "cc": [
              {
                "name": "Jane Doe",
                "recipient": "jane@example.com"
              }
            ],
            "bcc": [
              {
                "name": "Joe Doe",
                "recipient": "joe@example.com"
              }
            ],
            "attachments": [
              {
                "filename": "test.txt",
                "content": "Base64 encoded string"
              }
            ],
            "Reply-To": "reply@example.com"
          }
        }
      ],
      "customer": {
        "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "secretKey": "xxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
  '
Field Name Type Required Notes
message Object Yes Contains all data for sending an email.
message.notificationType  String Yes NotificationType is the title of the template you like to use.
message.language String No ISO 639 format.
message.params Object No Params is an object where keys are the name of the placeholders you use in the content of your template and where we map values to.
message.transport Object Yes
message.transport.type  String Yes This field is the name of the channel you created and like to use.
message.from  Object No This field is the "from" address when sending emails, e.g. {"name": "Jim Doe", "email": "jim@example.com"}.
message.recipients Object Yes Recipients contains data about who will receive the email.
message.recipients.to Array Yes Person(s) you're sending the email to, e.g. [{"name": "Joe Doe", "recipient": "joe@example.com"}]
message.recipients.cc Array No e.g. [{"name": "Joe Cc", "recipient": "cc@example.com"}]
message.recipients.bcc Array No e.g. [{"name": "Joe Bcc", "recipient": "bcc@example.com"}]
message.recipients.Reply-To String No This is the email address the receiver will reply to
message.attachments Array No Contains an array of attachments which will be send together with your email. (The size will depend on the transport.)
message.attachments[0] Object No Contains the attachment data
message.attachments[0].filename String No The original name and extension of the file. This is needed for decoding the file.
message.attachments[0].content String No The file encoded as a base64 string.
Sms
const request = require('request');

request({
    url: "https://api.notify.eu/notification/send",
    method: "POST",
    json: true,
    body: {
      "message": {
        "notificationType": "marketing_sms",
        "language": "en",
        "params": {
          "firstname": "James",
          "age": "25"
        },
        "transport": [
          {
            "type": "sms_ringring",
            "recipients": {
              "to": [
                {
                  "name": "John Doe",
                  "recipient": "0032485123456"
                }
              ]
            }
          }
        ],
        "customer": {
          "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "secretKey": "xxxxxxxxxxxxxxxxxxxxxxxx"
        }
      }
    }
}, function (error, response, body){
    console.log(response);
});
<?php

$postBody = array(
  "message" => array(
    "notificationType" => "marketing_sms",
    "language" => "en",
    "params" => array("firstname" => "James", "age" => "25"),
    "transport" => array(
      array("type" => "sms_ringring"),
      array("recipients" => array(
        "to" => array(array("name" => "John Doe", "recipient" => "0032486123456"))
      ))
    ),
    "customer" => array(
      "clientId" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "secretKey" => "xxxxxxxxxxxxxxxxxxxxxxxx"
    )
  )
);

$ch = curl_init("https://api.notify.eu/notification/send");
curl_setopt_array($ch, array(
    CURLOPT_POST => TRUE,
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
    CURLOPT_POSTFIELDS => json_encode($postBody)
));

$response = curl_exec($ch);

if ($response === FALSE){
    die(curl_error($ch));
}

$responseData = json_decode($response, TRUE);
?>
curl -i -H "Content-type: application/json" -X POST https://api.notify.eu/notification/send -d '
  {
    "message": {
      "notificationType": "marketing_sms",
      "language": "en",
      "params": {
        "firstname": "James",
        "age": "25"
      },
      "transport": [
        {
          "type": "sms_ringring",
          "recipients": {
            "to": [
              {
                "name": "John Doe",
                "recipient": "0032486123456"
              }
            ],
          }
        }
      ],
      "customer": {
        "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "secretKey": "xxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
  '
Field Name Type Required Notes
message Object Yes Contains all data for sending a sms.
message.notificationType  String Yes NotificationType is the title of the template you like to use.
message.language String No ISO 639 format.
message.params Object No Params is an object where keys are the name of the placeholders you use in the content of your template and where we map values to.
message.transport Object Yes
message.transport.type  String Yes This field is the name of the channel you created and like to use.
message.recipients Object Yes Recipients contains data about who will receive the notification.
message.recipients.to Array Yes Person(s) you're sending the sms to, e.g. [{"name": "Joe Doe", "recipient": "joe@example.com"}]
Push notification
const request = require('request');

request({
    url: "https://api.notify.eu/notification/send",
    method: "POST",
    json: true,
    body: {
      "message": {
        "notificationType": "marketing_push",
        "language": "en",
        "params": {
          "firstname": "James",
          "age": "25"
        },
        "transport": [
          {
            "type": "push_firebase",
            "recipients": {
              "to": [{"recipient": "news"}, {"recipient": "politics"}]
            }
          }
        ],
        "customer": {
          "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "secretKey": "xxxxxxxxxxxxxxxxxxxxxxxx"
        }
      }
    }
}, function (error, response, body){
    console.log(response);
});
<?php

$postBody = array(
  "message" => array(
    "notificationType" => "marketing_push",
    "language" => "en",
    "params" => array("firstname" => "James", "age" => "25"),
    "transport" => array(
      array("type" => "push_firebase"),
      array("recipients" => array(
        "to" => array(array("recipient" => "news"), array("recipient" => "politics"))
      ))
    ),
    "customer" => array(
      "clientId" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "secretKey" => "xxxxxxxxxxxxxxxxxxxxxxxx"
    )
  )
);

$ch = curl_init("https://api.notify.eu/notification/send");
curl_setopt_array($ch, array(
    CURLOPT_POST => TRUE,
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
    CURLOPT_POSTFIELDS => json_encode($postBody)
));

$response = curl_exec($ch);

if ($response === FALSE){
    die(curl_error($ch));
}

$responseData = json_decode($response, TRUE);
?>
curl -i -H "Content-type: application/json" -X POST https://api.notify.eu/notification/send -d '
  {
    "message": {
      "notificationType": "marketing_push",
      "language": "en",
      "params": {
        "firstname": "James",
        "age": "25"
      },
      "transport": [
        {
          "type": "push_firebase",
          "recipients": {
            "to": [{"recipient": "news"}, {"recipient": "politics"}],
          }
        }
      ],
      "customer": {
        "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "secretKey": "xxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
  '
Field Name Type Required Notes
message Object Yes Contains all data for sending a push notification.
message.notificationType  String Yes NotificationType is the title of the template you like to use.
message.language String No ISO 639 format.
message.params Object No Params is an object where keys are the name of the placeholders you use in the content of your template and where we map values to.
message.transport Object Yes
message.transport.type  String Yes This field is the name of the channel you created and like to use.
message.recipients Object Yes Recipients contains data about who will receive the notification.
message.recipients.to Array Yes Person(s) you're sending push notification to. This is the topic(s) the user is subscribed to, e.g. [{"recipient": "news"}, {"recipient", "politics"}]
Slack
const request = require('request');

request({
    url: "https://api.notify.eu/notification/send",
    method: "POST",
    json: true,
    body: {
      "message": {
        "notificationType": "marketing_slack",
        "language": "en",
        "params": {
          "content": "Hello world!"
        },
        "transport": [
          {
            "type": "notify_slack",
            "recipients": {
              "to": [{"recipient": "general"}, {"recipient": "XXXXXX"}]
            }
          }
        ],
        "customer": {
          "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "secretKey": "xxxxxxxxxxxxxxxxxxxxxxxx"
        }
      }
    }
}, function (error, response, body){
    console.log(response);
});
<?php

$postBody = array(
  "message" => array(
    "notificationType" => "marketing_slack",
    "language" => "en",
    "params" => array("content" => "Hello world!"),
    "transport" => array(
      array("type" => "notify_slack"),
      array("recipients" => array(
        "to" => array(array("recipient" => "general"), array("recipient" => "XXXXXX"))
      ))
    ),
    "customer" => array(
      "clientId" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "secretKey" => "xxxxxxxxxxxxxxxxxxxxxxxx"
    )
  )
);

$ch = curl_init("https://api.notify.eu/notification/send");
curl_setopt_array($ch, array(
    CURLOPT_POST => TRUE,
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
    CURLOPT_POSTFIELDS => json_encode($postBody)
));

$response = curl_exec($ch);

if ($response === FALSE){
    die(curl_error($ch));
}

$responseData = json_decode($response, TRUE);
?>
curl -i -H "Content-type: application/json" -X POST https://api.notify.eu/notification/send -d '
  {
    "message": {
      "notificationType": "marketing_slack",
      "language": "en",
      "params": {
        "content": "Hello world!"
      },
      "transport": [
        {
          "type": "notify_slack",
          "recipients": {
            "to": [{"recipient": "general"}, {"recipient": "XXXXXX"}],
          }
        }
      ],
      "customer": {
        "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "secretKey": "xxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
  '
Field Name Type Required Notes
message Object Yes Contains all data for sending a push notification.
message.notificationType  String Yes NotificationType is the title of the template you like to use.
message.language String No ISO 639 format.
message.params Object No Params is an object where keys are the name of the placeholders you use in the content of your template and where we map values to.
message.transport Object Yes
message.transport.type  String Yes This field is the name of the channel you created and like to use.
message.recipients Object Yes Recipients contains data about who will receive the notification.
message.recipients.to Array Yes Channel(s) you're sending message to. Value can be channel name or ID, e.g. [{"recipient": "general"}, {"recipient", "ZMLDJ3JAK"}]
Response

Example response:

{ "success": true, "identifier": "015da530-e867-11e8-9580-3b2b4d2b2a6b" }

Logs

Logs URL

https://app.notify.eu/logs

We offer you ultimate control over our API using the Notify logs functionality. You'll be able to check up on your sent notification to see if they have arrived at their destination, or if there's an error you'll need to solve.

API

alt text

Here you can find your succeeded API calls. Here you can continue filtering according to the type of transport you used to send the message.

A transport filter will look something like this.

alt text

In this case you'll select all the succeeded API calls with the 'Webhook' transport.

Errors

alt text

Here you can find all your failed API calls. An error example can be viewed below.

alt text

In this case the content template cannot be found. To solve this error you can just create a template with a title that's equal to the Notification type in the API call.

Content

alt text

These API calls include their own content and do not need a template linked to the message.

An example of the content can be seen below.

alt text

Filtering

When you have a large amount of logs you can use the filtering system to find the log you require.

Filter fields

alt text

Field Explanation
From/to You can set a period between which the notificion has been received.
ClientId Here you can filter using the clientID used in the notification.
Receiver This free textfield uses the email of the person on the receiving end to filter the notifications.
Language If you want to browse through notifications in a specific language you can use this modifier.
Content You can use the content if you want to filter in more detail.
Notification type You can use the notification type filter to find messages linked to a specific template.
Identifier If you want to find a specific notification you can use an identifier as follows: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Log details

alt text

Here you can see an example of a filtered overview of the logs. when you click one of the logs you are taken to a detail page with more information about the notification.