← All NIPs

NIP-C7

Chats

DraftEvents

Kind 9 is a chat message. To reply, send another kind 9 that quotes the earlier message with a q tag, so chats stay a simple ordered stream.

At a glance

Status
In use and still allowed to change.
Kinds
Tags
  • q
Last changed
May 28, 2026

Try it

Edit the form or the JSON: both stay in sync, the badge says whether the result is valid, and tapping any field explains it.

Examples
Valid 1 note

Not signed yet · Demo keys only. These personas' secret keys are public on purpose.

Form
Jan 1, 2025, 12:00 AM UTC

Content

The message text. A reply may start with a nostr: link to the quoted message.

Tags

No tags yet.

Add tag

How this NIP works

Step 1 of 4

A chat message

A kind 9 event whose content is the message text. Nothing else is required.

In the course

No course chapter covers this NIP yet. The editor above is the quickest way in.

Builds on

Used by

See also

Specification

Specification text is quoted in English from the nostr-protocol/nips repository. Our explanations and the interface are translated. Source on GitHub at commit 0046368

Read the spec98 words, quoted from the repository at commit 0046368.

A chat message is a kind 9 event.

{
  "kind": 9,
  "content": "GM",
  "tags": []
}

A reply to a kind 9 is an additional kind 9 which quotes the parent using a q tag.

{
  "kind": 9,
  "content": "nostr:nevent1...\nyes",
  "tags": [
    ["q", <event-id>, <relay-url>, <pubkey>]
  ]
}

Clients that render a "chat view" as a stream of ordered events MUST only fetch kind 9 events in order to prevent missing context across implementations. Other content types MAY be quoted within in a kind 9 following NIP 18.