AlphornAlphorn Docs

API Reference

Alphorn HTTP API for sending notifications.

Alphorn provides a simple HTTP API. No SDK required — any HTTP client works.

Send Notification

POST /api/webhooks/{webhook_id}

Headers

HeaderValue
Content-Typeapplication/json, text/plain, or omit for auto-detection

JSON Body

{
  "title": "Notification title",
  "message": "Notification body text",
  "priority": 3,
  "tags": ["tag1", "tag2"],
  "payload": {}
}

Parameters

FieldTypeRequiredDescription
titlestringNoShort title for the notification
messagestringYesThe notification body
priorityintegerNo1 (min) to 5 (max), defaults to 3
tagsstring[]NoArray of tags for filtering
payloadobjectNoArbitrary JSON data, forwarded to channels and available for filtering

Response

{
  "id": "msg_abc123",
  "status": "queued"
}

Status Codes

CodeDescription
200Notification queued successfully
400Invalid payload
404Webhook not found
429Rate limit exceeded

Slack-Compatible Format

For easy migration from Slack incoming webhooks:

POST /api/webhooks/{webhook_id}
Content-Type: application/json

{
  "text": "Notification message"
}

Plain Text

POST /api/webhooks/{webhook_id}
Content-Type: text/plain

Your notification message here

Rate Limits

Rate limits depend on your plan:

PlanLimit
Free3,000 messages/month
Pro25,000 messages/month
Business500,000 messages/month

Additional message packs are available on Pro and Business plans.

Examples

cURL

curl -X POST https://app.alphorn.dev/api/webhooks/wh_abc123 \
  -H "Content-Type: application/json" \
  -d '{"title": "Alert", "message": "Disk space low", "priority": 4}'

JavaScript (fetch)

await fetch("https://app.alphorn.dev/api/webhooks/wh_abc123", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    title: "Alert",
    message: "Disk space low",
    priority: 4,
  }),
});

Python (requests)

import requests

requests.post(
    "https://app.alphorn.dev/api/webhooks/wh_abc123",
    json={
        "title": "Alert",
        "message": "Disk space low",
        "priority": 4,
    },
)

Go

package main

import (
	"bytes"
	"encoding/json"
	"net/http"
)

func main() {
	payload, _ := json.Marshal(map[string]interface{}{
		"title":    "Alert",
		"message":  "Disk space low",
		"priority": 4,
	})

	http.Post(
		"https://app.alphorn.dev/api/webhooks/wh_abc123",
		"application/json",
		bytes.NewBuffer(payload),
	)
}

PHP

$ch = curl_init('https://app.alphorn.dev/api/webhooks/wh_abc123');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'title' => 'Alert',
        'message' => 'Disk space low',
        'priority' => 4,
    ]),
    CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
curl_close($ch);

Ruby

require 'net/http'
require 'json'

uri = URI('https://app.alphorn.dev/api/webhooks/wh_abc123')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = {
  title: 'Alert',
  message: 'Disk space low',
  priority: 4
}.to_json

http.request(request)

On this page