🔔Subscribe to NWC Notifications

POST https://api.getalby.com/nwc/nip47/notifications

Notifies about 23196 kind events (NWC notifications) of the connection pubkey from the wallet service.

Request Body

NameTypeDescription

relayUrl

string

If no relay is provided, it uses the default relay (wss://relay.getalby.com/v1)

webhookUrl*

string

Webhook URL to publish events

walletPubkey*

string

Pubkey of the NWC Wallet Provider

connectionPubkey*

string

Public key of the user (derived from secret in NWC connection string)

Response

{
  "subscription_id": "f370d1fc-x0x0-x0x0-x0x0-8f68fa12f32c",
  "webhookUrl": "https://your.webhook.url"
}

Response to Webhook URL

{
  "id": "a16ycf4a01bcxx........xxxxx",
  "pubkey": "a16y69effexxxx........xxxxx",
  "created_at": 1709033612,
  "kind": 23196,
  "tags": [
      [
          "p",
          "f490f5xxxxx........xxxxx"
      ],
      [
          "e",
          "a41aefxxxxx........xxxxx"
      ]
  ],
  "content": "<encrypted content>",
  "sig": "<signature>"
}

Last updated

Logo

Your bitcoin & nostr companion / from 🐝 with 🧡