Notification Manager
All guides

Push Notification API

Send notifications programmatically to your connected channels and your console feed.

Endpoint

POST /api/v1/notifications/push

Headers

Header Value
Authorization Bearer <API_TOKEN>
Content-Type application/json

Request body

Field Type Required Description
message string yes The notification text (max 4000 characters).
title string no A short headline (max 191 characters). Defaults to Notification.
level string no One of info, success, warning, error. Defaults to info.
{
  "title": "Build Failed",
  "message": "Production deployment #412 failed during test execution.",
  "level": "error"
}

Response

201 Created

{
  "success": true,
  "id": "0b0a8f26-6f0e-4f5d-9a56-2a1f3a8f1c11",
  "tag": "jenkins logs",
  "deliveries": [
    { "channel": "TELEGRAM", "status": "SENT" },
    { "channel": "EMAIL", "status": "SENT" }
  ]
}

status is SENT or FAILED per channel. If you have no active channel, deliveries contains a single entry with "channel": null and "status": "NO_RECIPIENT". The notification is still saved and visible in the console.

Examples

cURL

curl -X POST https://monitor.applicanity.com/api/v1/notifications/push \
  -H "Authorization: Bearer sk_live_8f3a9b1c2d4e5f6a7b8c9d0e1f2a3b4c" \
  -H "Content-Type: application/json" \
  -d '{"title":"Build Failed","message":"Production deployment #412 failed.","level":"error"}'

Node.js

const res = await fetch('https://monitor.applicanity.com/api/v1/notifications/push', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.NOTIFY_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Build Failed',
    message: 'Production deployment #412 failed.',
    level: 'error',
  }),
});
console.log(await res.json());

Python

import os, requests

r = requests.post(
    "https://monitor.applicanity.com/api/v1/notifications/push",
    headers={"Authorization": f"Bearer {os.environ['NOTIFY_TOKEN']}"},
    json={
        "title": "Build Failed",
        "message": "Production deployment #412 failed.",
        "level": "error",
    },
    timeout=10,
)
print(r.json())

PHP

<?php
$ch = curl_init('https://monitor.applicanity.com/api/v1/notifications/push');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('NOTIFY_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'title' => 'Build Failed',
        'message' => 'Production deployment #412 failed.',
        'level' => 'error',
    ]),
]);
echo curl_exec($ch);

Error responses

Status Meaning
400 Invalid JSON, missing message, or invalid level.
401 Missing, invalid or revoked token.
403 The account is suspended.
429 Rate limit exceeded. Check the Retry-After header.
500 Unexpected server error.