Chapter A4 - Messaging
A4
Nostr Implementation Possibility - Hex № A4

Public Messages

A signed plaintext message to one or more users - delivered to their inbox relays, shown on notification screens, with no threads and no privacy.

1 Overview

Sometimes you want to say something to someone, not about something. A reply needs a root note. A NIP-17 direct message needs encryption and gift wraps. This NIP defines a third option: the public message, event kind 24.

A public message is a plain NIP-01 event. The content holds the message text. One or more p tags name the receivers. That is the whole format.

The design target is the notification screen. A client shows the message as a notification. The user replies from the same screen. The client does not fetch chat history, because there is none. There are no message chains, no threads, no thread roots, and no chatrooms. Messages start and continue without any syntactic connection to each other.

Hint!

Think of kind 24 as a postcard. It is addressed to someone, anyone who handles it can read it, and it does not come bound in an album. If you need an envelope, use NIP-17 instead.

2 The Kind 24 Event

Kind 24 is a regular event under the NIP-01 storage classes. Relays store all of them. The wire format is:

Wire format - kind 24 public message
{
  "pubkey": <sender pubkey>,
  "kind": 24,
  "tags": [
    ["p", <receiver pubkey>, <relay URL>]
    ... one "p" tag per receiver ...
  ],
  "content": <message in plain text>
  ... plus the usual id, created_at, sig ...
}
Field and tag reference
ItemRule
kindAlways 24.
contentThe message, in plain text.
pOne tag per receiver: ["p", <receiver>, <relay-url>]. One or more receivers.
eMust not be used. There are no threads to point at.
Warning!

Do not add e tags to a kind 24 event. A public message never references a parent. A reply to a public message is just another public message with a p tag for the other user.

Tech Note

The source spec fences its event template as YAML (it was jsonc until 2026-06) and the template contains a trailing comma. It is not valid JSON as written. Build the event as a normal NIP-01 JSON object with id, created_at, and sig included.

3 Delivery and Display

Routing follows the NIP-65 outbox model, but in the inbox direction. Clients must send the event to the NIP-65 inbox relays of each receiver. Clients must also send it to the outbox relay of the sender.

Sender client Inbox relay receiver A Inbox relay receiver B Outbox relay sender Client A notification Client B notification EVENT k24 REQ #p
Fig. A4-1 — Delivery routing. The sender writes to every receiver's inbox relays plus the sender's own outbox relay. Receivers watch their inboxes for p tags.

Display rules are just as strict as routing rules:

  • Kind 24 is designed to be shown on notification screens. Users reply from there.
  • The goal is that clients support this feature without chat history. No thread, no thread root, no chatroom exists in this system.
  • Kind 24 is not designed to be displayed on feeds.
  • Anyone can see and reply to a message, even a message that is not for them.
Thread (kind 1) root reply reply "e" tags chain each reply to a parent Public messages (kind 24) msg msg msg no links - only "p" tags name receivers
Fig. A4-2 — No chains. Threads link events together. Public messages never do. Each message stands alone.

4 Advanced Support

Kind 24 composes with several other NIPs. The rules below come straight from the spec:

Interop rules
FeatureLevelRule
expirationRECOMMENDEDAdd a NIP-40 expiration tag. Without a chatroom, old messages stop making sense as time goes on.
qMAYUse a NIP-18 quote-repost q tag when the content cites an event with a NIP-21 URI.
k (reactions)MUSTA NIP-25 reaction to a public message must carry a k tag with value 24.
k (zaps)MUSTA NIP-57 zap on a public message must include the k tag with value 24.
nevent linksMUSTA NIP-21 link that uses a NIP-19 nevent1 must include a kind of 24. Clients are not expected to render non-kind:24 links natively.
imetaSHOULDAdd NIP-92 imeta tags for image and video links in the content.

The q tag has the standard NIP-18 shape:

Quote tag format
["q", <event-id> or <event-address>, <relay-url>, <pubkey-if-a-regular-event>]
Tech Note

The reaction and zap rules place a MUST on other kinds (NIP-25 kind 7 and NIP-57 zap requests), not on kind 24 itself. A kind 24 publisher cannot enforce them. Clients that react to or zap public messages carry the obligation.

5 Warnings

Warning!

There must be no expectation of privacy in kind 24. A public message is just a public reply without a root note. Every relay and every user can read it.

Do not confuse this kind with kind 14 rumors in NIP-17 direct messages. A kind 14 rumor is unsigned and travels sealed and gift-wrapped. A kind 24 event is signed and designed for public consumption. Never route private text through kind 24.

6 Worked Example

Alice thanks Bob for a talk. Her client signs a kind 24 event and publishes it to Bob's inbox relay and to her own outbox relay. Bob's client watches his inbox for #p matches and raises a notification.

Event - full kind 24 message
{
  "id": "7ac66f21d3…",
  "pubkey": "a11ce4f2b9…",   // Alice
  "created_at": 1765990800,
  "kind": 24,
  "tags": [
    ["p", "b0bd7e881c…", "wss://inbox.bob.example"],
    ["expiration", "1766595600"]
  ],
  "content": "Great talk today. The relay section clicked for me.",
  "sig": "90c1f2ab44…"
}
Session transcript - delivery and reply
-- Alice's client, on wss://inbox.bob.example and her outbox relay --
→ ["EVENT", {"id":"7ac66f21d3…","kind":24,"tags":[["p","b0bd7e881c…",
     "wss://inbox.bob.example"],["expiration","1766595600"]],
     "content":"Great talk today. The relay section clicked for me.", …}]
← ["OK", "7ac66f21d3…", true, ""]

-- Bob's client, watching his inbox relay --
→ ["REQ", "notif", {"kinds":[24], "#p":["b0bd7e881c…"]}]
← ["EVENT", "notif", {"id":"7ac66f21d3…", "kind":24, …}]
← ["EOSE", "notif"]

-- Bob replies from the notification: a new standalone kind 24 --
→ ["EVENT", {"id":"c3d901aa72…","kind":24,"tags":[["p","a11ce4f2b9…",
     "wss://inbox.alice.example"]],"content":"Thanks! Come back next month.", …}]
← ["OK", "c3d901aa72…", true, ""]

Note the reply. It has no e tag and no reference to Alice's event. It is a fresh message with a p tag for Alice, sent to her inbox relays.

7 Version History

NIP-A4 is young and has barely changed since it landed. Notable changes, newest first:

  • 20262026-06Repository-wide cleanup switched the event template's code fence from jsonc to yaml. No rule changed.
  • Origin2025-12Vitor Pamplona proposed kind 24 public messages in PR #1988, complete with routing, notification-screen intent, and interop rules.

Original Proposal - Credits

AuthorVitor Pamplona
First commit2025-12-18 — “Public Messages (#1988)”
Pull requestnostr-protocol/nips #1988
Statusdraft - optional
SourceA4.md on GitHub - full change history

8 See Also

  • NIP-01 — the base event format and relay messages used here.
  • NIP-65 — the inbox and outbox relay lists that route public messages.
  • NIP-17 — private direct messages; use these when privacy matters.
  • NIP-40 — the expiration tag recommended for every public message.
  • NIP-18 — the q quote tag for citing events in the content.
  • NIP-21 and NIP-19 — nostr: URIs and nevent1 entities for citations.
  • NIP-25 and NIP-57 — reactions and zaps, which must tag k = 24.
  • NIP-92 — imeta tags for image and video links.