Skip to main content
POST
/
v1
/
notifications
/
send
Send notification
curl --request POST \
  --url http://localhost:3000/v1/notifications/send \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "title": "<string>",
  "body": "<string>",
  "channels": [
    "<string>"
  ],
  "recipients": [
    null
  ],
  "category": "<string>",
  "priority": "<string>",
  "data": null,
  "deepLink": "<string>",
  "imageUrl": "<string>",
  "thumbnailUrl": "<string>",
  "actionButtons": [
    {
      "action": "<string>",
      "label": "<string>"
    }
  ],
  "scheduledFor": "<string>",
  "expiresAt": "<string>",
  "groupKey": "<string>"
}
'
import requests

url = "http://localhost:3000/v1/notifications/send"

payload = {
"type": "<string>",
"title": "<string>",
"body": "<string>",
"channels": ["<string>"],
"recipients": [None],
"category": "<string>",
"priority": "<string>",
"data": None,
"deepLink": "<string>",
"imageUrl": "<string>",
"thumbnailUrl": "<string>",
"actionButtons": [
{
"action": "<string>",
"label": "<string>"
}
],
"scheduledFor": "<string>",
"expiresAt": "<string>",
"groupKey": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
title: '<string>',
body: JSON.stringify('<string>'),
channels: ['<string>'],
recipients: [null],
category: '<string>',
priority: '<string>',
data: null,
deepLink: '<string>',
imageUrl: '<string>',
thumbnailUrl: '<string>',
actionButtons: [{action: '<string>', label: '<string>'}],
scheduledFor: '<string>',
expiresAt: '<string>',
groupKey: '<string>'
})
};

fetch('http://localhost:3000/v1/notifications/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/notifications/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'title' => '<string>',
'body' => '<string>',
'channels' => [
'<string>'
],
'recipients' => [
null
],
'category' => '<string>',
'priority' => '<string>',
'data' => null,
'deepLink' => '<string>',
'imageUrl' => '<string>',
'thumbnailUrl' => '<string>',
'actionButtons' => [
[
'action' => '<string>',
'label' => '<string>'
]
],
'scheduledFor' => '<string>',
'expiresAt' => '<string>',
'groupKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "http://localhost:3000/v1/notifications/send"

payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"channels\": [\n \"<string>\"\n ],\n \"recipients\": [\n null\n ],\n \"category\": \"<string>\",\n \"priority\": \"<string>\",\n \"data\": null,\n \"deepLink\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"thumbnailUrl\": \"<string>\",\n \"actionButtons\": [\n {\n \"action\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"scheduledFor\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"groupKey\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("http://localhost:3000/v1/notifications/send")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"channels\": [\n \"<string>\"\n ],\n \"recipients\": [\n null\n ],\n \"category\": \"<string>\",\n \"priority\": \"<string>\",\n \"data\": null,\n \"deepLink\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"thumbnailUrl\": \"<string>\",\n \"actionButtons\": [\n {\n \"action\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"scheduledFor\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"groupKey\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:3000/v1/notifications/send")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"channels\": [\n \"<string>\"\n ],\n \"recipients\": [\n null\n ],\n \"category\": \"<string>\",\n \"priority\": \"<string>\",\n \"data\": null,\n \"deepLink\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"thumbnailUrl\": \"<string>\",\n \"actionButtons\": [\n {\n \"action\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"scheduledFor\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"groupKey\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "notificationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "error": "<string>"
}

Body

application/json
type
string
required
title
string
required
body
string
required
channels
string[]
required
recipients
null[]
required
category
string
priority
string
data
unknown
imageUrl
string
thumbnailUrl
string
actionButtons
object[]
scheduledFor
string
expiresAt
string
groupKey
string

Response

200 - application/json

Send result

success
boolean
required
notificationId
string<uuid>
error
string