Webhook API

How to send notifications to NotifyHub via Webhook API

v2.0RESTJSON

Quickstart

Execute in 3 operations

READY
01
Initialize Channel

Navigate to Channels → Create channel → Obtain webhook URL + auth token

02
POST /hooks/{token}

Transmit JSON payload: {"title": required, "body": optional, "url": optional}

03
Verify Delivery

Messages queued in Inbox → Pushed to all registered devices in real-time

API Specification

Single endpoint, minimal payload

POST
Endpoint→
/hooks/<token>
Header{}
Content-Type: application/json
Required*
title (max 200 chars)
Optional?
body / url (max 2000 chars each)
Request Body
[JSON]
{
  "title": "Deploy finished",
  "body": "main is live",
  "url": "https://example.com"
}
Response
[202]
HTTP/1.1 202 Accepted
Content-Type: application/json

{"id":"message-id"}

Code Examples

Start with cURL, scale to any language

BASH
cURL
curl -X POST https://notifyhub.karakuri-maker.com/hooks/YOUR_TOKEN \
  -H "Content-Type: application/json" \
  -d '{"title":"Deploy finished","body":"main is live","url":"https://example.com"}'
JAVASCRIPT
fetch API
const res = await fetch("https://notifyhub.karakuri-maker.com/hooks/YOUR_TOKEN", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    title: "Deploy finished",
    body: "main is live",
    url: "https://example.com",
  }),
});

if (!res.ok) {
  throw new Error(await res.text());
}

const data = await res.json();
// { id: "message-id" }

Error Codes & Security

Handle failures, respect limits

PROTECTED
Common Errors
400
title_required / invalid_request
404
invalid_token
429
rate_limited
Limits & Security
  • ▸Per token: 60/min, burst 20, 5,000/day
  • ▸Token is in URL. Regenerate if leaked.
  • ▸Reissue webhook URL in Channels.
END OF DOCUMENTATION