Skip to content

Message Types Reference

Nostr clients and relays communicate over WebSocket connections using JSON-arrays. Each message is identified by its type string. The tables below list every standardised message type.

These messages are sent from clients to relays.

TypeDescriptionDefined In
EVENTused to publish eventsNIP-01
REQused to request events and subscribe to new updatesNIP-01
CLOSEused to stop previous subscriptionsNIP-01
AUTHused to send authentication eventsNIP-42
COUNTused to request event countsNIP-45

These messages are sent from relays to clients.

TypeDescriptionDefined In
EOSEused to notify clients all stored events have been sentNIP-01
EVENTused to send events requested to clientsNIP-01
NOTICEused to send human-readable messages to clientsNIP-01
OKused to notify clients if an EVENT was successfulNIP-01
CLOSEDused to notify clients that a REQ was ended and whyNIP-01
AUTHused to send authentication challengesNIP-42
COUNTused to send requested event counts to clientsNIP-45