> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nostrapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Zap

> Intantly send Bitcoin to any Nostr account

### Body

<ParamField body="amount" type="number">
  Total amount of Bitcoin (in satoshis) that you wish to send to the recipient.
</ParamField>

<ParamField body="pubkey" type="string">
  The address of the recipient of the message -- can be a Nostr NIP05 address (e.g. [andre@zbd.gg](mailto:andre@zbd.gg)), or a Nostr public key in NPUB or HEX format.
</ParamField>

<ParamField body="relays" type="array">
  The array of relay URLs you wish to publish your zap to.
</ParamField>

<ParamField body="noteId" type="string" optional="true">
  If you wish to Zap a specific post / note by a given user you can pass that note ID here. The note MUST BELONG to the recipient of the Zap.
</ParamField>

<ParamField body="message" type="string" optional="true">
  If you wish to add a comment to the Zap transaction. This will be visible to the recipient/others.
</ParamField>

<ParamField body="when" type="number" optional="true">
  If you want to schedule the post to be published at a later time, you can pass a UNIX timestamp number here. If you do not pass this parameter, the post will be broadcast immediately.
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the call was successful. `true` if successful, `false` if not.
</ResponseField>

<ResponseField name="message" type="string">
  Message detailing the results of the operation.
</ResponseField>

<ResponseField name="data" type="object">
  The contents of the data response object.

  <Expandable title="Toggle">
    <ResponseField name="payment" type="object">
      Response information relating to the Bitcoin transaction (powered by ZEBEDEE API).

      <Expandable title="Toggle">
        <ResponseField name="zebedeeId" type="string">
          The ID of the transaction recorded on your ZEBEDEE account.
        </ResponseField>

        <ResponseField name="fee" type="string">
          The amount of Bitcoin paid out in fees for this transaction (in millisatoshis).
        </ResponseField>

        <ResponseField name="unit" type="string">
          The unit of the `amount` and `fee` property returned above.
        </ResponseField>

        <ResponseField name="request" type="string">
          The Bitcoin Lightning Network payment request from the recipient's address/wallet, which was paid behind the scenes.
        </ResponseField>

        <ResponseField name="processedAt" type="string">
          The timestamp at which this Bitcoin Lightning Network transaction settled.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="event" type="object">
      The contents of the actual Nostr event generated for this Zap (just for review purposes).

      <Expandable title="Toggle">
        <ResponseField name="kind" type="number">
          The `kind` of this Nostr event.
        </ResponseField>

        <ResponseField name="created_at" type="number">
          Timestamp of when this event was created/signed.
        </ResponseField>

        <ResponseField name="content" type="string">
          Content message for the Zap.
        </ResponseField>

        <ResponseField name="tags" type="array">
          Nostr-specific tags.
        </ResponseField>

        <ResponseField name="pubkey" type="string">
          The Nostr public key of the sender of this Zap.
        </ResponseField>

        <ResponseField name="id" type="string">
          The unique ID of this Nostr event.
        </ResponseField>

        <ResponseField name="sig" type="string">
          The cryptographic signature of this Nostr event.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://nostrapi.com/api/v1/zap' \
  --header 'Content-Type: application/json' \
  --header 'apikey: <YOUR_KEY_HERE>' \
  --data-raw '{
      "amount": 1,
      "pubkey": "npub1akngghxzy6d75y8szp6y44u5pxktwy5aj6zh6jl3ncp8d93fj2fq5mfxa8",
      "noteId": "note1j7eph95zj9lw53zjkth0ana2ntasuggxvnhhp6fyq9jnyzjxg2ts7q9m2n",
      "message": "GM NOSTR FAM",
      "relays": ["wss://nostr.zbd.gg", "wss://relay.damus.io"],
      "when": 1685405495
  }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json HTTP 200 - Success theme={null}
  {
    "success": true,
    "message": "Successfully zapped!",
    "data": {
      "payment": {
        "zebedeeId": "3304660e-f52d-4048-a456-f9c7e1af67da",
        "fee": "0",
        "amount": "1000",
        "unit": "msats",
        "request": "lnbc10n1pjf4lwzpp5qpkssfysk65sx3gvayr4g564y7rk4p5ey22fu9zru0xujrp3k4xqhp5kdgg0wujgzhrm09ptk9pqzqel5k6tuhc6s6ntey2nsr667gslgeqcqzzsxqzfvsp5fqclc4dfrpfx3vmurxjtkxvw6e8jvrg33kd7ge0mc65zu4dltszs9qyyssq2vr0y3x9n05fvg9lnddcskx7e94mkg3pvugcxs7nxm0qeun2lka5ytgfaehwrvy2khryr98wxwhyyqp5yg5r9zeaxku6t2sjr06hkpsqw2ny3n",
        "processedAt": "2023-06-27T15:18:27.246Z"
      },
      "event": {
        "kind": 9734,
        "created_at": 1687879106,
        "content": "zap zap zap zap",
        "tags": [
          [
            "p",
            "eda6845cc2269bea10f010744ad79409acb7129d96857d4bf19e027696299292"
          ],
          [
            "amount",
            "1000"
          ],
          [
            "relays",
            "wss://nostr.mutinywallet.com",
            "wss://relay.damus.io"
          ],
          [
            "e",
            "97b21b9682917eea4452b2eefecfaa9afb0e210664ef70e9240165320a464297"
          ]
        ],
        "pubkey": "74b337b934ca7ffe01553e32e4fddb5aeca42a5209df663f7ff6e41e7bb133eb",
        "id": "460db2bc6b1567a8c3d64726a654106cca316e295e581e5d38b51ef12f666779",
        "sig": "7d3edae69c122da4c79e5341c97fdb0e15e2517f2126d50c9491f543debe005a44e46cbe74f84e8bd21e7e2d2fa34aa9d2889b49ec1ab998ce7f0efdf5854d46"
      }
    }
  }
  ```
</ResponseExample>
