← All NIPs

NIP-37

Draft Events

DraftEvents

Save unfinished posts of any kind on relays without anyone else reading them: the draft is encrypted to yourself with NIP-44 inside a kind 31234 wrap, with optional checkpoints and a private relay list.

At a glance

Status
In use and still allowed to change.
Kinds
Tags
  • a
  • d
  • k
  • relay
Last changed
May 18, 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.

What to build

How the parts connect: Saving a draft

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

NIP-44 ciphertext of the JSON draft, encrypted to the author's own pubkey. Empty = deleted.

Encrypted with NIP44

Tags

  1. d Required

    Identifier of this draft, so later saves replace it.

  2. k Required

    Kind of the draft inside. Required.

  3. expiration Recommended

    When relays may delete the draft (NIP-40). Recommended.

    Apr 1, 2025, 12:00 AM UTC
Add tag

How this NIP works

Step 1 of 5

Encrypt the draft to yourself

The unsigned draft event is turned into JSON, encrypted with NIP-44 from your key to your own key, and put in the content of a kind 31234. Only you can read it.

In the course

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

Builds on

Replaces

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 spec245 words, quoted from the repository at commit 0046368.

This NIP defines kind 31234 as an encrypted storage for unsigned draft events of any other kind.

The draft is JSON-stringified, NIP44-encrypted to the signer's public key and placed inside the .content.

k tags identify the kind of the draft.

{
  "kind": 31234,
  "tags": [
    ["d", "<identifier>"],
    ["k", "<kind of the draft event>"], // required
    ["expiration", "now + 90 days"] // recommended
  ],
  "content": nip44Encrypt(JSON.stringify(draft_event)),
  // other fields
}

A blanked .content field signals that the draft has been deleted.

NIP-40 expiration tags are recommended.

Clients SHOULD publish kind 31234 events to relays listed on kind 10013 below.

Checkpoints

kind:1234 defines checkpoints that belong to a parent kind:31234 event. These can serve to provide a revision history of a parent event.

{
  "kind": 1234,
  "tags": [
    ["a", "31234:<pubkey>:<identifier>"]
  ],
  "content": nip44Encrypt(JSON.stringify(draft_event)),
}

Relay List for Private Content

Kind 10013 indicates the user's preferred relays to store private events like Draft Wraps.

The event MUST include a list of relay URLs in private tags. Private tags are JSON Stringified, NIP44-encrypted to the signer's keys and placed inside the .content of the event.

{
  "kind": 10013,
  "tags": [],
  "content": nip44Encrypt(
    JSON.stringify(
      [
        ["relay", "wss://myrelay.mydomain.com"]
      ]
    )
  )
  //...other fields
}

It's recommended that Private Storage relays SHOULD be NIP-42-authed and only allow downloads of events signed by the authed user.

Clients MUST publish kind 10013 events to the author's NIP-65 write relays.