skirl

ntfy compatibility reference

What Skirl must accept so that anything able to send to or read from ntfy works by changing the server URL: the developer reference, with each test and ntfy's own answer. For people using ntfy's apps and tools with Skirl, and moving from an ntfy server, see ntfy's apps and tools; for every error code Skirl answers, with its text, Error messages.

Source: summaries of https://docs.ntfy.sh/publish/ and https://docs.ntfy.sh/subscribe/api/ read on 2026-11-22; both pages re-read on 2026-11-24 for M1, and behaviour checked against a running ntfy v2.38.2 (see Golden run at the end). For M2, https://docs.ntfy.sh/publish/#authentication and https://docs.ntfy.sh/config/ (access control, tokens, rate limiting, proxies) were re-read on 2026-11-24, and ntfy v2.38.2 was run with auth enabled (see Golden run (M2)). Where the docs and the server disagree, the server's behaviour is recorded.

Publish#

Endpoints#

  • PUT or POST /<topic> — request body is the message. Topic names [-_A-Za-z0-9], max 64 characters.
  • POST or PUT / — JSON body. Fields: topic (required), message (default "triggered"), title, tags, priority, actions, click, attach, markdown, icon, filename, delay, timezone, email, call, sequence_id.
  • GET /<topic>/publish (aliases /send, /trigger) — all parameters as query arguments; with none, the message is "triggered".
  • PUT /<topic> with a binary body — attachment upload.

Parameters#

Header names are case-insensitive. Query parameter names are lowercase.

Header Aliases Meaning
X-Message Message, m Message body
X-Title Title, t Title
X-Priority Priority, prio, p 1–5 or min / low / default / high / max (urgent)
X-Tags Tags, Tag, ta Comma-separated tags and emoji short codes
X-Delay Delay, X-At, At, X-In, In Timestamp, duration or natural language; minimum 10 s, maximum 3 days
X-Timezone Timezone Zone used to read X-Delay
X-Actions Actions, Action Up to 3 actions: view, http, broadcast, copy; JSON or short format
X-Click Click URL opened when the notification is tapped
X-Attach Attach, a URL of an external attachment
X-Filename Filename, file, f Attachment file name
X-Icon Icon Notification icon URL
X-Markdown Markdown, md Enable Markdown; Content-Type: text/markdown does the same
X-Sequence-ID Sequence-ID, SID Identifier used to update, clear or delete later
X-Cache Cache no disables caching of the message
Authorization — See Auth

Header values encoded per RFC 2047 are accepted.

Update, clear, delete#

  • POST /<topic>/<sequence_id> — update.
  • PUT or GET /<topic>/<sequence_id>/clear (alias /read) — emits message_clear (mark read / dismiss).
  • DELETE /<topic>/<sequence_id> or GET /<topic>/<sequence_id>/delete — emits message_delete.

Limits to mirror as defaults#

  • Message body 4096 bytes; larger bodies become an attachment.
  • Title 1 KB. Tags 512 bytes. Attachment 15 MB.

Accept but ignore in v1 (must not return an error)#

X-Firebase, X-UnifiedPush (up), X-Poll-ID. (X-Template is applied since M6c: see Message templates.)

Refused, as by an ntfy without them configured#

X-Email (X-E-Mail, Email, E-Mail, mail, e; JSON email) → 400 40001. X-Call (Call; JSON call) → 400 40032. E-mail is checked before everything else, call next.

Subscribe#

Endpoints#

  • GET /<topic>/json — newline-delimited JSON, one message per line.
  • GET /<topic>/sse — Server-Sent Events.
  • GET /<topic>/ws — WebSocket, same JSON objects as /json.
  • GET /<topic>/raw — message body only, one line per message; keepalives are empty lines.
  • Several topics: comma-separated in the path.

Parameters (also accepted as headers)#

Parameter Aliases Meaning
poll po Return cached messages and close
since si Duration, Unix timestamp, message ID, all, latest or none
scheduled sched Include messages scheduled for later
id — Filter: exact message ID
message m Filter: exact message text
title t Filter: exact title
priority prio, p Filter: comma-separated priorities, any match
tags tag, ta Filter: comma-separated tags, all must match

Events#

open, keepalive (every 45 s), message, message_delete, message_clear, poll_request.

Message fields#

id, time, expires, event, topic, sequence_id, message, title, tags, priority, click, actions, attachment { name, url, type, size, expires }.

Health#

GET /v1/health. In Skirl it reports healthy only if the database answers (ntfy's does not check the database).

Auth#

Accepted on publish and subscribe (session cookies never are; they belong to /api/v1):

  • Authorization: Basic with username and password.
  • Authorization: Bearer <token>.
  • Authorization: Basic with an empty username and the token as password.
  • ?auth= (alias ?authorization=) carrying the base64 of a whole Authorization header value; it wins over the header. ntfy reads it as unpadded URL-safe base64; Skirl also takes standard base64 and padding.

Other schemes and an empty header mean no credentials. Wrong credentials are 401 40101; no access, including no credentials on a private topic, is 403 40301; neither sends WWW-Authenticate. Every answer of the ntfy routes carries Access-Control-Allow-Origin: * (never -Allow-Credentials). Details in Golden run (M2).

Where Skirl differs on purpose#

What a user notices (private topics, retention, case-insensitive names, limited tokens, what is not there) is in ntfy's apps and tools. On the wire:

  • A publisher with workspace-wide publish rights can create a topic by publishing to it; topic-scoped tokens cannot.
  • Tokens have ntfy's format since M6a: tk_ and 29 characters of [a-z0-9], so tools that recognise an ntfy token by its prefix (Apprise) take Skirl's. Tokens made before M6a start skl_ and keep working. Skirl keeps only a token's hash, so lists show it masked (tk_••••••••4f2a).
  • Differences found in the golden runs are listed under Golden run (M1) and Golden run (M2).

Attachments (M6b)#

Checked against ntfy v2.38.2 with an attachment directory and a base URL set (test/compat/attachments_test.go runs against both):

  • A PUT/POST body becomes a file when a file name is given (X-Filename, Filename, file, f, query or header), when it is 4096 bytes or more, or when it is not valid UTF-8. 4095 bytes of text stay a message.
  • A file without a name is attachment.<ext>, the extension from the detected type (attachment.txt for text). A message that is only a file says You received a file: <name>; X-Message gives it a caption instead.
  • The message JSON carries attachment { name, type, size, expires, url }, url under the server's public address (else the address of the request): /file/<id>.<ext>. The extension in a link is ignored; the id decides.
  • X-Attach (Attach, a, JSON attach) links a file elsewhere: attachment { name, url } only. The name is the last part of the URL's path, or attachment; a file name overrides it, and the body is then the message. Not an absolute http/https URL → 400 40013.
  • Over the file size limit, or the publisher's or the server's total: 413 41301 attachment too large, or bandwidth limit reached, checked while the upload is read. Over the daily download volume: 429 42905 limit reached: daily bandwidth reached.
  • /file/ needs no sign-in, also on a server with auth-default-access: deny-all: the link is the secret. Uploading needs the right to publish.
  • Unknown file: 404 40401.

Where Skirl differs, on purpose:

  • File ids: 32 characters of base32, 160 random bits. ntfy uses the 12-character message id (about 71 bits). TestAttachmentIDAndExpiry.
  • Expiry: files are kept 7 days by default (Admin → Settings), never longer than the topic keeps the message. ntfy's default is 3 hours, too short for messages kept 30 days. TestAttachmentIDAndExpiry.
  • Serving: the type comes from the content (Go's http.DetectContentType, so an SVG is text/plain or text/xml, where ntfy says image/svg+xml). Only PNG, JPEG, GIF, WebP, MP4, MP3 and PDF are served inline with their type; everything else is application/octet-stream with Content-Disposition: attachment. Every answer has X-Content-Type-Options: nosniff, Content-Security-Policy: sandbox; default-src 'none' and Cross-Origin-Resource-Policy: same-site. ntfy sends every file as Content-Disposition: attachment, HTML as text/plain. TestAttachmentServing.
  • Range requests work (206). ntfy answers them with the whole file.
  • Daily volume: downloads count against it; ntfy counts uploads too.
  • Always on: Skirl has no switch to turn attachments off, so it never answers 400 40014.

Scheduled delivery (M6b)#

Checked against ntfy v2.38.2 (test/compat/delay_test.go runs against both; Skirl ports ntfy's util.ParseFutureTime and the checks of server.parseParams):

  • X-Delay, Delay, X-At, At, X-In, In (query delay, at, in; JSON delay). Read in this order: a Unix time; a duration (Go's, or N with d/days/h/hours/m/mins/minutes/s/secs/seconds, so 2 days); an RFC 3339 time; natural language (tomorrow, 3pm; a time already past today means tomorrow). A past Unix time is not refused at once: the next readers try it, so 0 is a duration of 0.
  • At least 10 seconds ahead (400 40005 invalid delay parameter: too small, please refer to the docs), at most the longest delay (ntfy's default and Skirl's: 3 days, exactly 3 days accepted; 400 40006 … too large …). Anything that does not read, a past RFC 3339 time and a past Unix time: 400 40004 invalid delay parameter: unable to parse delay.
  • X-Timezone, Timezone (JSON timezone): an IANA name, read only when a delay is set, and only for natural language. A bad one with a delay: 400 40059 invalid request: invalid timezone; without a delay it is ignored. No zone: the server's local zone.
  • Cache: no with a delay: 400 40002 cannot disable cache for delayed message (checked before the delay is read).
  • The answer is the message with time the time it comes due. Until then it is in no poll or stream; scheduled=1, sched=1 or the X-Scheduled/Scheduled header puts it in polls and replays. When due it reaches open streams with that time.

In Skirl a scheduled message is stored at once and reaches the inbox, unread counts and devices only when due, also after a restart (whatever came due while the server was stopped goes out at start, once). The longest delay is an admin setting. What the app offers: Scheduled delivery.

Action buttons (M6b)#

The wire is as in M1 (test/compat/actions_test.go: the short and JSON forms, view, http, broadcast, copy, at most three, ids and clear). The server never runs an action: http is run by the reader's browser through the service worker, as ntfy's own clients run it (method POST by default, headers and body as given, no cookies or referrer, the browser's CORS rules applying), and clear=true marks the message read only after the action succeeded. What each kind does in the app: Message features. What a push carries of them: Privacy.

Emoji tags (M6b)#

ntfy's routes send tags exactly as published, with no emoji member; its clients turn tags that are emoji short codes into emoji in front of the title (test/compat/emoji_test.go checks both servers). Skirl decides this on the server from gemoji 8.1.0's 1,913 short codes (internal/emoji, generated by make emoji), matching exactly as ntfy's clients do (warning is ⚠️, Warning is a label). Skirl's own message JSON adds emoji, a list of {"tag","char"} for the tags that are short codes, and keeps tags complete; push titles carry the emoji ("⚠️ Disk full", or before the topic name when there is no title). X-Icon is stored and returned as ntfy does (M1).

Message templates (M6c)#

Checked against ntfy v2.38.2's source and its container (test/compat/template_test.go runs against both; testdata/template_functions.json holds 708 cases with ntfy's answers, every function and builtin, the limits at and over each cap, the refused constructs and the error codes).

  • Switched on by X-Template, Template, Tpl or ?template=, ?tpl=. Any value ntfy reads as a boolean means inline: yes, 1, true, and also no, 0, false. Any other value names a template; a name that is not [-_A-Za-z0-9]+, or names none, is 400 40047 invalid request: template file not found.
  • Inline: the message (X-Message, m), title (t) and priority (p) parameters are templates applied to the JSON body, rendered in that order. Inside an inline template a literal \n is kept until after rendering. After rendering every text has its \n turned into newlines and is trimmed; an empty message is triggered; a missing field prints <no value>. A rendered priority that is no priority is 400 40007. With a template the Message parameter may be up to 32 KB (the template limit), not 4096 bytes.
  • The body: at most 128 KiB (413 41303 JSON body too large), and JSON (400 40042 invalid request: message body must be JSON if templating is enabled). A file name (X-Filename) or a link to a file (X-Attach) takes precedence: the body is then a file or the message, not template data. A GET publish with a template is 40042 (no body).
  • Errors: 40043 could not parse (with Go's text, e.g. template: :1: function "foo" not defined); 40044 define, block, template, call, html, js, urlquery refused; 40045 execution failed (with template message query parameter: … and Go's text); 40055 over 100 ms; 40056 a template over 32 KB; 40041 a rendered title or message over 4096 bytes; over 1 MiB of output is 40045 limit reached.
  • Functions: ntfy's 159, the same names and argument orders (internal/tmpl/funcs), and text/template's builtins, with ntfy's guarded print, println, printf (widths and precisions below 1000; no *, %[n], %p or list and dict arguments) and Sprig's slice. Date functions read the server's zone (UTC in the golden run).
  • Named templates: ntfy reads YAML files from template-dir; Skirl stores custom templates in its database (Admin → Templates, PUT /api/v1/admin/templates/{name}, skirl template set). An ntfy file with title, message and priority works unchanged (TestTemplateCustomThreePart; skirl template set <name> --file <file.yml>). A part a file does not set takes the request's (priority: the request's, as a template, as in ntfy). Skirl's built-in templates (alertmanager, grafana, github, gitea and forgejo, gitlab, slack, discord) are its own, not ntfy's, and are not compared.

Where Skirl differs on purpose (docs/specs/M6c.md):

Behaviour Skirl ntfy v2.38.2
Time limit 100 ms for all of a publish's renders together 100 ms for each of message, title and priority
Memory an allocation budget (4 MB of what calls build, per publish): limit/timeout-nested-range and limit/timeout-pipeline (each builds about 800 MB of lists) end with 40045 before the deadline no budget: those end with 40055
Renders at once 4, waiting up to 2 s, then 429 42972 no limit
Named templates a missing field prints nothing, reaching into a missing object is an error (use dig); also header, skip and event, and Skirl's parts (tags, click, sequence_id, actions, events, event, reply; ?events= with an unknown id is 400 40083) <no value>; three parts

Outside templates too, as ntfy (fixed in M6c): a \n in the Message parameter is a newline, and NULs are removed from the text.

Update, clear and delete (M6b)#

Checked against ntfy v2.38.2 (test/compat/sequence_test.go runs against both):

  • POST or PUT /<topic>/<sid> publishes a message of that sequence; the path wins over X-Sequence-ID. X-Sequence-ID, Sequence-ID, SID and JSON sequence_id name one too. Every version is stored and replayed.
  • PUT or GET /<topic>/<sid>/clear (or /read) answers {"id":…,"sequence_id":sid,"time":…,"expires":…,"event":"message_clear","topic":…}; DELETE /<topic>/<sid> or GET …/delete the same with message_delete. The event has its own 12-character id, is stored and replayed by polls, and is answered for a sequence id never used.
  • Streams: in JSON and WebSocket the event as answered; in SSE as an unnamed data: frame, as a message is (only open, keepalive and poll_request are named), so a browser's onmessage sees it; in raw an empty line. Subscribe filters treat it as a message with no priority (3), title or tags.
  • A sid that is not [-_A-Za-z0-9]{1,64} in the path: 404 40401 (no route), as is POST …/clear. Each needs the right to publish (403 40301).
  • An update replaces a version of the sequence still waiting for its time, and a delete cancels it; a clear leaves it.

In Skirl a clear marks every subscriber's copies read, and a delete removes the sequence's messages for everyone, with their files and delivery rows. A push's tag is t<topic id>:<sequence id>, so an update replaces the notification shown, and only in its own topic. A clear or a delete takes the notification down, as ntfy's Android app cancels it on message_clear and message_delete: a push that shows nothing to the Chromium-based and Firefox devices that were sent a version, and the next pushes name it for the others (A notification already showing). The answers to clear and delete are unchanged. What the app shows: Replacing a message.

Account API (M6a)#

The account calls integrations make, on ntfy's paths, authenticated like the other ntfy routes (Basic, Bearer, ?auth=; never cookies). Shapes captured from ntfy v2.38.2 with auth on, kept in internal/api/testdata/ntfy/ (tokens redacted); internal/api/ntfy_account_test.go compares Skirl's answers with them, and test/compat/account_test.go runs against both.

Who calls what, from their source:

  • Home Assistant 2026.11.3 (homeassistant/components/ntfy, aiontfy==0.8.6): GET /v1/account to sign in (and at every start, with its token, then every 15 minutes); POST /v1/account/token with {"label":"Home Assistant","expires":0}, skipped when the account is *; GET /v1/version at start and every 3 hours (coordinator.py: a 401 or 404 means "not shown"; anything else, such as a page that is not JSON, stops the integration's setup); publish is POST / with JSON; subscribing checks GET /<topics>/auth, then opens GET /<topics>/ws.
  • ntfy Android app (ApiService.kt): GET /<topic>/auth when a user adds a server with a user name; no account calls.
  • ntfy CLI (client/client.go): no account calls.
  • Apprise 2.3.0 and Uptime Kuma 2.5.12: no account calls; both publish with POST / and JSON.
Call What it does ntfy's answer
GET /v1/account the caller's account; anonymous gets {"username":"*","role":"anonymous",…} with 200 username, role (admin, user), tokens, limits, stats
POST /v1/account/token a new token of the caller's; body optional: label, expires (Unix seconds, 0 never, absent 72 hours). Skirl: with the user name and password only token, label, last_access, last_origin, expires
PATCH /v1/account/token token (empty: the one signed in with), label, expires; with neither, 72 hours more. Skirl: with the user name and password only the token, without its secret
DELETE /v1/account/token the token in X-Token (empty: the one signed in with) {"success":true}
GET /<topics>/auth whether the caller may read every listed topic {"success":true}, or 403 40301
GET /v1/version the server's build, to admins version, commit, date; anyone else 401 40101

Any other /v1/… path is 404 40401 in JSON, as in ntfy (before M6a Skirl served the web app there, which aiontfy cannot read).

Wrong credentials are 401 40101, no credentials on the token calls 401 40101.

Where Skirl answers differently:

  • Tokens are listed masked (tk_••••••••4f2a): Skirl keeps only their hash. A token's secret is in the answer to its creation only.
  • A token made without a label is named "Created by an ntfy client" (ntfy: no label). Tokens made here are unscoped (read and publish whatever the user may), count against the 100-token cap (409 40992) and show in the user's token list.
  • Making or changing a token (POST and PATCH /v1/account/token) needs the user name and password: Basic, or ?auth= carrying them. Any token gets 403 40301 in ntfy's error shape, full rights or not, however it is sent (Bearer, Basic with an empty user, ?auth=): a token never creates or extends tokens (the M2 rule). ntfy lets any token of the user do both. skirl-differs, TestAuthAccountTokenNeedsPassword. Home Assistant is not affected: it makes its token with the password.
  • Revoking (DELETE /v1/account/token) works with a full-rights token, as in ntfy, including the token revoking itself; a token limited to a topic or to reading or publishing gets 403 40301 (ntfy has no such tokens). GET /v1/account answers to any token.
  • expires in the past is 400 40074 (ntfy makes a token that has already expired).
  • An unknown token, or another user's, in PATCH or DELETE is 404 40490 (ntfy answers 500).
  • No sync_topic (ntfy's web app sync), and no last_origin on stored tokens (Skirl does not record it; only the creation answer has it).
  • limits: basis ip; messages per day from Skirl's request limit (17280 anonymous, as ntfy's default); messages_expiry_duration the default retention; the attachment limits in force (file size, the caller's total, expiry, daily download volume) and in stats what the caller's files take; e-mail, calls and reservations 0 (Skirl has none). stats counts are 0: Skirl keeps no per-user message counts.

Seen and not implemented, because no integration calls them:

  • POST /v1/account (sign-up): Skirl has no self sign-up; admins add people.
  • DELETE /v1/account, POST /v1/account/password, POST /v1/account/login, PATCH /v1/account/settings, POST/PATCH/DELETE /v1/account/subscription: ntfy's own web app; Skirl's web app has its own /api/v1 routes.
  • POST/DELETE /v1/account/reservation: ntfy topic reservations; Skirl has topic grants.
  • /v1/account/billing/*, /v1/tiers: payments and tiers.
  • /v1/account/phone*, /v1/account/email*, /v1/account/password/reset*: calls and e-mail, which Skirl does not have.
  • GET /v1/config: ntfy's web app configuration.
  • GET /v1/stats (aiontfy's stats(), which Home Assistant does not call): ntfy's message counters; Skirl keeps none.

Tools CI runs against Skirl#

Besides /test/compat against ntfy v2.38.2 itself, the integration jobs in .github/workflows/ci.yml run on every change:

Tool Checked with
curl, a shell function, Python (standard library) the snippets from Send to this topic, run as shown
Apprise Apprise 2.3.0's command line
Home Assistant's ntfy integration aiontfy 0.8.6, the library the integration uses, making its calls
Uptime Kuma the request its ntfy notification sends (2.5.12), reproduced
Grafana Grafana 13.3.2 in a container: its webhook contact point and a real alert rule
Prometheus Alertmanager Alertmanager 0.35.1 in a container: webhook, Slack and Discord receivers
Gitea (and Forgejo) Gitea 28.4.0 in a container: a push, a pull request and a merge
GitHub, GitLab their recorded webhook requests, replayed (neither can run in CI)

ntfy's phone apps were checked once, for R1, by sending against a real Skirl exactly the requests their source builds (ntfy-android v1.25.2, ntfy-ios v1.8.0), with the apps' own HTTP and JSON libraries; the apps themselves were not run on a phone. What came of it is in ntfy's apps and tools.

Deferred past v1#

Email send and receive, phone calls, UnifiedPush, Firebase, Matrix gateway, ntfy-style topic reservations, clustering.

Golden run (M1, 2026-11-24)#

make compat-golden runs /test/compat against binwiederhier/ntfy:v2.38.2 (sha256:ca35419d…e716) started with ntfy serve and default open access. Two settings differ from a bare ntfy serve:

  • Rate limits. The per-visitor request, subscription and topic-creation limits are raised so a test suite is not throttled.
  • Cache file. The message cache is a file (NTFY_CACHE_FILE). ntfy's default in-memory cache fails writes with HTTP 500 database table is locked: messages once it holds a few thousand messages, even with requests sent one at a time.

Result: 34 tests pass on both servers; 8 are tagged skirl-differs and skipped on ntfy (Skirl passes all 42). CI runs the same check on every PR.

Error responses#

Skirl uses ntfy's code, status and wording wherever ntfy has one. ntfy also sends a link to its docs; Skirl leaves link out until it has an API reference, except on the template errors (40041 to 40047, 40055, 40056), which carry ntfy's link to its templating docs, as ntfy's do. Codes ending in 70 to 99 are Skirl's own, for answers ntfy never gives. Every code, with its text and what a user does about it: Error messages. The cases the golden run compared:

Case HTTP Code
E-mail requested (any alias, query or JSON) 400 40001
Priority not 1–5 / a known name (publish or filter) 400 40007
since unparseable (including 1d) 400 40008
JSON publish: topic missing or malformed 400 40009
Reserved topic name 400 40010
/ws without an Upgrade header 400 40016
Actions invalid 400 40018
Icon not an http(s) URL 400 40021
JSON publish body not valid JSON (including a string priority) 400 40024
Phone call requested 400 40032
Sequence ID not [-_A-Za-z0-9]{1,64} 400 40049
Title over 1024 bytes 400 40057
Tags over 512 bytes in total (separators not counted) 400 40058
More than 150 topics in one subscription 400 40061
GET /{topic} from a non-browser (Skirl) / unknown route (ntfy) 404 40401
JSON publish body over 32 KB (Skirl's limit) 413 41303
Internal error 500 50001

Replay limit#

As in ntfy, a replay (poll=1 or any since=) returns per topic the newest messages whose sizes add up to at most 10 MiB, always at least one, and sends X-Messages-Truncated: 1 before the body when it left older messages out. The header is absent, not 0, otherwise. On WebSockets it travels on the 101 response.

A message's size is ntfy's Message.Size (v2.38.2, model/model.go):

  • the message's own fields: id, sequence id (which defaults to the id), event name, topic, title, body, click, icon and content type
  • every tag
  • each action's id, type, label, url, method, body, intent, value, and its header and extra keys and values

TestReplayCap checks that both servers cut at the same message. Skirl stores the size with each message and works out each topic's cut-off by reading only sizes, newest first, stopping once the budget is spent. It then streams the replay oldest-first in pages of 256 messages, so it never holds a whole topic in memory.

ntfy's actual behaviour, where the docs or the M1 spec said otherwise#

  • Filter values are matched exactly (case-sensitive). The docs' "all case-insensitive" refers to parameter names. Skirl now matches values exactly too; the M1 spec's case-insensitive reading was dropped.
  • An explicit Priority: 3 is echoed in the message JSON; priority is omitted only when not set. Skirl now does the same; the M1 spec's "omit 3" was dropped.
  • ti is not a title alias, although the "Message title" section lists it. The parameter table and the server agree on X-Title, Title, t.
  • A body of exactly 4096 bytes is already treated as an attachment: ntfy's practical limit is 4095 bytes.
  • A non-empty body wins over the Message header or m parameter; those are used only when the body is empty. Bodies are trimmed.
  • Tags: entries are trimmed, but a whitespace-only entry stays as "" (only entries empty before trimming are dropped). The 512-byte limit counts tag bytes, not the header.
  • Invalid UTF-8 in a title, tags or Message header is accepted and the bad bytes replaced with U+FFFD.
  • since: inclusive for timestamps (time >= since); a message ID replays from that message's second, leaving the message out, so one sent earlier in the same second comes again (Skirl replays only what was stored after it, so nothing comes twice); a deleted message's ID still replays what came after it, the delete included (ntfy keeps the row; Skirl keeps where it was until it would have expired); an unknown or expired message ID replays everything; only Go-style durations (30s, 10m, 1h30m), so 1d is invalid; since=latest is per topic.
  • Polls (poll=1) send no open event.
  • Framing: SSE open/keepalive records have an event: line, message records only data:. Raw streams send an empty line for open and keepalive and replace newlines in a body with spaces. ntfy sends no X-Accel-Buffering header (Skirl does, as the spec asks).
  • Message JSON: field order id, sequence_id, time, expires, event, topic, title, message, priority, tags, click, icon, actions, …, content_type; Markdown shows as "content_type":"text/markdown"; sequence_id appears only when it differs from id; actions get a 10-character id and always carry clear.
  • Responses use Content-Type: application/json without a charset and end with a newline.
  • /v1/health answers {"healthy":true,"role":"active"}; Skirl sends {"healthy":true} (clients read healthy).
  • Not in the M1 spec, present in ntfy: Access-Control-Allow-Origin: * on every response and OPTIONS preflight answers (Skirl has both from M2); Ratelimit headers; a daily replay-bandwidth limit (429, 42905); a per-visitor topic-creation limit (429, 42911; Skirl has it from M2).
  • ntfy reserves v1, static, app, docs, file, account, settings, login, signup, metrics (400, 40010). Skirl reserves all of these too, plus those in the next table.

Intended differences (tagged skirl-differs in /test/compat)#

Test Skirl ntfy
TestPublishWhitespaceTagsDropped whitespace-only tags dropped kept as ""
TestPublishSkirlTopicRules api, assets, setup, m, fonts, admin, inbox, topics, search reserved as well; subscribing to any reserved name → 400 40010; malformed topic → 400 40009 the extra names are ordinary topics; ntfy's own pages answer at its reserved names; malformed → 404 40401
TestTopicsAreCaseInsensitive topic names match case-insensitively; each client sees its own spelling Alerts and alerts are different topics
TestPublishIgnoredInM1 poll-id accepted and ignored Poll-ID becomes a poll_request event
TestPublishTitleMustBeUTF8 a title that is not valid UTF-8 → 400 40090 accepted, bad bytes replaced with U+FFFD
TestSequenceDeleteRemoves a delete removes the sequence's messages (and their files); polls show the message_delete event only keeps the messages and the event; clients drop them
TestSkirlGetRules GET /{topic} without Accept: text/html → 404 40401; malformed subscribe topic → 400 40009 serves the web app for both

Not covered by a test:

  • The HTTP Priority header that browsers send under RFC 9218 (u=4, i) is ignored instead of failing as an invalid priority.
  • Invalid UTF-8 in tags or in the Message parameter gets no error: the bad bytes become U+FFFD, as in ntfy.
  • (Settled in M2: CORS headers, WebSockets from any origin, and subscribing no longer creating topics; see the M2 run.)

Golden run (M2, 2026-11-24)#

make compat-golden now has two stages. compat-golden-open is the M1 run above (34 pass, 8 skirl-differs; the auth tests skip there). compat-golden-auth starts binwiederhier/ntfy:v2.38.2 with auth-file and auth-default-access: deny-all (and the M1 run's raised limits and cache file), creates two users, four tokens and six access entries with ntfy's own CLI (test/compat/ntfy-auth-fixtures.sh), runs the auth tests, and then, alone because it locks the address out, the failed-login limit. The limit numbers below come from further ntfy containers at default limits.

Result (M6a): 17 auth tests pass on both servers, the failed-login limit in its own run; 6 are tagged skirl-differs (Skirl passes all 23). TestAnonymousRequestLimit needs default limits, so it runs against Skirl only (in-process); ntfy's answer at its defaults is in the limits table. With SKIRL_COMPAT_SLOW=1, Skirl passes all 60 tests of the suite.

What ntfy returns#

Case HTTP Code, error
No credentials on a private topic: publish (body, JSON, GET), subscribe (json, sse, raw, ws) 403 40301 forbidden
Valid credentials without access (member, or member token) 403 40301 forbidden
Wrong password, unknown user, unknown/expired/removed token, undecodable Basic, Basic without a colon 401 40101 unauthorized
auth parameter that is not unpadded URL-safe base64 (padding, +, /, garbage) 500 50001 internal server error
A topic nobody has used, under deny-all 403 40301, byte-identical to a private topic's answer
WebSocket handshake without access 403 status only, no body
Lowercase bearer 401 40101 (lowercase basic works)
Bad credentials on /v1/health 401 40101
Authorization: Digest …, or empty — ignored: anonymous
  • WWW-Authenticate is never sent, on 401 or 403.
  • Access-Control-Allow-Origin: * is on every answer, errors included. OPTIONS (any path) answers 200 with Access-Control-Allow-Methods: GET, PUT, POST, PATCH, DELETE and Access-Control-Allow-Headers: *, and counts against the request limit.
  • Order of checks: credentials (401, or 429 42909), then the request limit (429 42901), then the topic name (400 40010), then access (403), then parameters (400). So Priority: 9 or since=nonsense on a private topic is a 403, while a JSON body that does not parse is a 400 40024 (it is read first, to find the topic).
  • auth parameter: ntfy decodes it with Go's base64.RawURLEncoding: URL-safe, no padding. The docs example happens to be valid in both alphabets.
  • ntfy's CLI: ntfy user add takes the password from NTFY_PASSWORD; ntfy token add [--expires] [--label] prints token tk_… created for user …; ntfy token remove <user> <token>; ntfy access <user|everyone> <topic> <read-write|read-only|write-only|deny>.

Limits, at ntfy's defaults#

Limit ntfy Code Retry-After Skirl
Requests 60, then 1 per 5 s; the 61st is refused (OPTIONS counts, health does not) 42901 5 same for anonymous; 600 and 1 per 0.5 s signed in
Failed credentials 30, then 1 per minute; the 31st attempt is refused, even with correct credentials; requests without credentials are unaffected 42909 about 60 10 per 10 minutes, then refused until the window ends, counted apart: bad tokens per address refuse that address's tokens; wrong passwords per address and user name refuse that name's password there, and count toward the address's tokens too (as in ntfy, so a token after wrong passwords is refused); 100 wrong passwords from an address refuse all its passwords
Open subscriptions 30 per address, shared by anonymous and signed-in requests from it 42903 none 30 anonymous, 300 per signed-in user
New topics 100, then 1 per minute, per address; anonymous requests count too, before access is checked 42911 about 60 signed-in only (anonymous callers cannot create topics): 100, then 1 per minute

ntfy also sends RateLimit-Policy and RateLimit headers; Skirl does not.

Intended differences (tagged skirl-differs)#

Test Skirl ntfy
TestAuthPreflightNamesAuthorization preflights list Authorization and every ntfy header by name Access-Control-Allow-Headers: *, which the Fetch standard never lets cover Authorization, so browsers refuse cross-origin requests with credentials
TestAuthParamAnyBase64 auth in either base64 alphabet, padded or not; undecodable → 401 40101 unpadded URL-safe only; anything else → 500 50001
TestAuthLowercaseScheme scheme names are case-insensitive (RFC 9110) bearer → 401
TestAuthHealthIgnoresCredentials /v1/health ignores credentials bad credentials → 401
TestAuthScopedToken tokens can be limited to one topic and to read and/or publish tokens grant the whole account
TestAuthAccountTokenNeedsPassword POST and PATCH /v1/account/token with any token: 403 40301; only a user name and password make or change tokens any token of the user may make and change tokens (200)

By design, from the M2 spec (not testable against ntfy):

  • Access model: per-topic grants and topic visibility (private, public_read, public_write, public) instead of ACL entries with * patterns. New topics are private.
  • Topic creation: by publishing, for admins, members with can_create_topics, and unscoped tokens of either that may publish; never anonymous. The creator gets read and publish. Subscribing never creates a topic; an admin may subscribe to one that does not exist yet and gets its first message.
  • Existence: a topic the caller may not use and one that does not exist get the same answer after the same single query. (A member who may create topics can still tell by publishing: that creates the topic. Accepted, see SPEC.md section 8.)
  • Open subscriptions are checked again at every keepalive: a revoked or expired token, a disabled or deleted user, a changed password (for a stream opened with one), a removed grant or a topic made private ends the stream (WebSockets close with 1008 "access ended").
  • WebSocket refusals carry the JSON error body; ntfy sends the status only.
  • Visitor: rate limits count per signed-in user, or per address (IPv4 /32, IPv6 /64) for anonymous requests and failed credentials. With --behind-proxy, the address is the right-most X-Forwarded-For hop that is not in --trusted-proxies, and the header counts only when the connection comes from a trusted proxy.
  • Passwords are Argon2id (ntfy: bcrypt); tokens start tk_ like ntfy's since M6a (skl_ before).

This page on GitHub