Skip to main content
Use ntfy through Corsair: one client, typed API calls. Create an access token at https://ntfy.sh/account (or <your server>/account) under Manage access tokens. The token starts with tk_ and is shown once. The key can also be username:password, which is sent as HTTP Basic. A self-hosted server is set with the account’s base_url (or the serverUrl plugin option); leave it empty for ntfy.sh. A bad Authorization header is a 401 even on public topics, so check the key before anything else. With the anonymous: true option and no key, calls go out without credentials (open topics, signup). Credentials are only sent over https (or to localhost). Things to know before you send:
  • Real pushes. messages.send, messages.sendFile and messages.update deliver real push notifications to every subscriber of the topic and are marked destructive. email and call on a send also email or phone someone. On ntfy.sh a visitor can send 250 messages per rolling 24 hours. Failed sends are never replayed after a 5xx or a dropped connection, because a retry can duplicate a notification. A burst-limit 429 (42901, 42906, 42911) is retried twice; a spent daily quota (messages, emails, calls, bandwidth) never is.
  • Sequences. Publishing with sequenceId ([-_A-Za-z0-9]{1,64}) gives the message a stable id: publishing again with the same id updates it (the server keeps both versions), messages.clear marks it read and dismissed, and messages.delete tells subscribers to remove it. A scheduled message that has not gone out yet is cancelled and removed from the server; a delivered one stays in the cache with a delete event after it, and clients that support it remove the notification.
  • Polling, not webhooks. ntfy sends no webhooks: messages.poll reads the topic cache as NDJSON and returns the messages with event: "message". An unknown topic polls to an empty list, not an error. Use since (a duration like 10min, unix seconds, a message id, all or latest) as the cursor, and scheduled: true to list undelivered scheduled messages.
  • Priorities and actions. priority takes 1-5 or min|low|default|high|urgent; names are sent as their number, since the JSON publish takes an int only. actions takes up to 3 buttons of type view, http, broadcast or copy.
  • Attachments. messages.sendFile uploads a file (base64 in, PUT body out) and the message carries attachment.url; files.download fetches it by the id at the end of that URL. attach on messages.send links an external URL instead.
  • Account and admin routes. account.*, tokens.*, subscriptions.*, reservations.*, phoneNumbers.*, emails.*, billing.* and webPush.* act on the signed-in user. users.* and tiers.* need an admin. Routes for a feature the server has turned off (email, calls, payments, web push, signup) answer 400 or 404.
What you get:
  • 59 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

Poll a topic
Send a notification
See the full list on the API page.

What’s next

API reference

Every ntfy.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.