{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bare-bitcoin/json-schema/bare-bitcoin-send-bitcoin-request-schema.json",
  "title": "SendBitcoinRequest",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/bare-bitcoin-developers-openapi.json#/components/schemas/SendBitcoinRequest",
  "type": "object",
  "properties": {
    "destination": {
      "type": "string",
      "description": "The bitcoin destination to send funds to.\n Supported formats:\n - Bitcoin address (bech32, legacy-segwit, legacy)\n - Lightning invoice (bolt11)\n - Lightning address\n - Lightning LNURL"
    },
    "amountBtc": {
      "type": "number",
      "description": "The amount to send.\n This field is required for all destinations except Lightning invoices.\n If the destination is a Lightning invoice, the amount is derived from the\n invoice.",
      "format": "double"
    },
    "accountId": {
      "type": "string",
      "description": "The ID of the account to send from. If empty, the default account is used."
    },
    "isPayment": {
      "type": "boolean",
      "description": "Marks the transaction as a payment. This has consequences for how the\n transaction is exported for tax purposes. It has no effect on the\n bitcoin transaction itself."
    },
    "description": {
      "type": "string",
      "description": "Free-form text description of the withdrawal. Can be used to correlate with\n your own systems."
    },
    "tfrInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/Info"
        }
      ],
      "description": "Information about the recipient under the travel rule. Call\n GetBitcoinWithdrawalRequirements to check whether it is needed for this\n destination. full_name and postal address are always required when supplied,\n including for an organisation."
    },
    "idempotencyKey": {
      "maxLength": 128,
      "type": "string",
      "description": "Optional, case-insensitive identifier of up to 128 characters for this\n withdrawal attempt.\n Unique per user across all accounts and API credentials. Omitted or empty\n disables duplicate protection. Use an opaque value such as a random UUID.\n Creating another withdrawal with a stored key returns HTTP 409\n (AlreadyExists), even if the inputs differ. Validation errors can occur\n before duplicate detection. Keys do not expire and remain used if the\n withdrawal fails or is cancelled. A request that fails before storing a\n withdrawal does not consume its key. Retries still need a fresh API nonce\n and HMAC. The conflict message includes the existing withdrawal ID."
    }
  },
  "$defs": {
    "Info": {
      "type": "object",
      "properties": {
        "fullName": {
          "type": "string",
          "description": "Full name of the person, or registered name of the organisation, on the\n other side of the transfer. Required for both people and organisations."
        },
        "country": {
          "type": "string",
          "description": "Country of that person or organisation, as an ISO-3166-1 alpha-2 code."
        },
        "address": {
          "type": "string",
          "description": "Postal address of that person or organisation. For a withdrawal, the\n bitcoin address or invoice goes in SendBitcoinRequest.destination instead."
        },
        "nin": {
          "type": "string",
          "description": "National identity number of the person, or 9-digit Norwegian\n organisasjonsnummer of the organisation. Supply it for self-custody\n withdrawals. It can be omitted for withdrawals to an exchange."
        },
        "exchange": {
          "type": "string",
          "description": "Name of the exchange holding the account. For withdrawals, choose a name\n from ListSupportedWithdrawalExchanges. Leave empty for self-custody."
        },
        "selfCustody": {
          "type": "boolean",
          "description": "True when the destination is a wallet held outside an exchange. Otherwise\n set this to false and provide exchange."
        },
        "ownWallet": {
          "type": "boolean",
          "description": "True when the wallet or exchange account belongs to the Bare Bitcoin\n customer. False when it belongs to another person or organisation."
        }
      }
    }
  }
}