Skip to content

SDKs

Official client libraries to integrate in minutes.

Node.js

Typed client for Node.js and TypeScript with automatic retries.

v3.4.1Node 18+
Install
npm install @baap/notify
Quickstart · index.ts
import { BaapNotify } from "@baap/notify";

const client = new BaapNotify({ apiKey: process.env.BAAP_API_KEY, baseUrl: "" });

await client.notifications.send({
  application: "HRMS",
  event: "leave.approved",
  recipients: ["usr_1024"],
  channels: ["email", "inApp"],
  variables: { name: "Asha", days: 3 },
});

Python

Sync and async client for Python applications.

v2.8.0Python 3.9+
Install
pip install baap-notify
Quickstart · main.py
import os
from baap_notify import BaapNotify

client = BaapNotify(api_key=os.environ["BAAP_API_KEY"], base_url="")

client.notifications.send(
    application="HRMS",
    event="leave.approved",
    recipients=["usr_1024"],
    channels=["email", "inApp"],
    variables={"name": "Asha", "days": 3},
)

Java

Builder-style client for JVM services and Spring Boot.

v1.12.3Java 17+
Install
implementation("com.baap:notify-sdk:1.12.3")
Quickstart · Main.java
BaapNotify client = BaapNotify.builder()
    .apiKey(System.getenv("BAAP_API_KEY"))
    .baseUrl("")
    .build();

client.notifications().send(SendRequest.builder()
    .application("HRMS")
    .event("leave.approved")
    .recipients(List.of("usr_1024"))
    .channels(List.of("email", "inApp"))
    .variable("name", "Asha")
    .build());

.NET

Async client for ASP.NET Core and .NET workers.

v2.1.0.NET 8
Install
dotnet add package Baap.Notify
Quickstart · Program.cs
var client = new BaapNotifyClient(new BaapNotifyOptions
{
    ApiKey = Environment.GetEnvironmentVariable("BAAP_API_KEY"),
    BaseUrl = "",
});

await client.Notifications.SendAsync(new SendNotification
{
    Application = "HRMS",
    Event = "leave.approved",
    Recipients = ["usr_1024"],
    Channels = ["email", "inApp"],
});

PHP

Composer package for Laravel, Symfony and plain PHP.

v1.6.2PHP 8.1+
Install
composer require baap/notify
Quickstart · send.php
<?php
use Baap\Notify\Client;

$client = new Client(getenv('BAAP_API_KEY'), ['base_url' => '']);

$client->notifications->send([
    'application' => 'HRMS',
    'event' => 'leave.approved',
    'recipients' => ['usr_1024'],
    'channels' => ['email', 'inApp'],
]);

Go

Idiomatic, context-aware client for Go services.

v0.9.4Go 1.21+
Install
go get github.com/baap/notify-go
Quickstart · main.go
client := notify.NewClient(os.Getenv("BAAP_API_KEY"), notify.WithBaseURL(""))

_, err := client.Notifications.Send(ctx, &notify.SendRequest{
    Application: "HRMS",
    Event:       "leave.approved",
    Recipients:  []string{"usr_1024"},
    Channels:    []string{"email", "inApp"},
})
if err != nil {
    log.Fatal(err)
}