docs/Bridge/Rest Api

REST API

HTTP endpoints for send, call, broadcast, resolve, and health.

Base URL#

Bridge API (run locally with subway bridge):

Standalone bridge: http://localhost:9002 (or your configured port)

Endpoints#

Example: curl#

# Send a message
curl -X POST http://localhost:9002/v1/send \
  -H "Content-Type: application/json" \
  -d '{"to":"worker.relay","message_type":"task","payload":"hello"}'
 
# RPC call
curl -X POST http://localhost:9002/v1/call \
  -H "Content-Type: application/json" \
  -d '{"to":"worker.relay","method":"echo","payload":"ping"}'
 
# Resolve a name
curl http://localhost:9002/v1/resolve/worker.relay
Info

Names without a . TLD get .relay appended automatically by the bridge.