Skip to main content
POST
/
broadcast
Broadcast UTXO transaction (ZEC)
curl --request POST \
  --url https://api.leokit.dev/broadcast \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chain": "zcash",
  "tx_hex": "0500008085202f8901..."
}
'
{
  "status": 123,
  "data": {
    "txid": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.leokit.dev/llms.txt

Use this file to discover all available pages before exploring further.

Overview

/leokit/broadcast is a server-side proxy for broadcasting signed UTXO transactions on chains where public APIs don’t allow CORS from a browser. Currently the only supported chain is Zcash (ZEC), where the most reliable public node (NowNodes) requires a server-side API key. Use this endpoint when your client-side ZEC swap flow needs to push a signed transaction without exposing your NowNodes key.

Endpoint

POST /leokit/broadcast

Request

Headers

HeaderValue
Content-Typeapplication/json
Api-KeyYour API key

Body

FieldTypeRequiredDescription
chainstringYesChain identifier. Currently only zcash
tx_hexstringYesHex-encoded signed transaction

Response

Success (200)

{
  "data": {
    "txid": "f4d6c2..."
  },
  "status": 200
}
FieldDescription
txidConfirmed transaction ID returned by the upstream node

Errors

StatusCodeDescription
400BAD_REQUESTMissing/invalid tx_hex, or chain not in the supported list
405METHOD_NOT_ALLOWEDNon-POST request
502BROADCAST_FAILEDUpstream node rejected the broadcast (returned in error body)
503SERVICE_UNAVAILABLEServer has no NowNodes API key configured
See the error codes catalog for the full list.

Example

curl -X POST https://api.leokit.dev/leokit/broadcast \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "zcash",
    "tx_hex": "0500008085202f8901..."
  }'

Notes

  • Successful broadcasts return immediately once the upstream node accepts the transaction. Use /leokit/status to track confirmation.
  • ZEC transparent (t-) transactions are forwarded to NowNodes’ BlockBook sendtx endpoint. Shielded (z-) transactions are not yet supported by this proxy.
  • This endpoint is a thin pass-through: the same txid you’d get by calling NowNodes directly.

Authorizations

Api-Key
string
header
required

Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4

Body

application/json
chain
enum<string>
required

Currently only zcash is supported.

Available options:
zcash
tx_hex
string
required

Hex-encoded signed transaction.

Response

Broadcast accepted.

status
integer
required
data
object
required